Re: Moving objects

New Message Reply Date view Thread view Subject view Author view

Alejandro Saez (cano++at++krusty.engr.sgi.com)
Wed, 22 Oct 1997 15:23:11 -0500


On Jul 28, 6:48pm, Andrew Bailey wrote:
> Subject: Moving objects
> Hello to all,
>
> I have written a Performer application which will eventually evolve into
> a driving simulator, and I am currently wondering how to get some
> objects around the scene by themselves. I am using Performer2.2
> (although modelling is done in MultiGen1.4). I have a static car in the
> scene at the moment. The road has a line defined along the centre and I
> want the car to move along that line at a set speed. I have added the
> car in MultiGen, so at the moment it is lurking somewhere in the
> Performer scene graph. I have only been using Performer for a couple of
> months now but I am pretty confident with it (I think!).
>
> Anyway, I am searching the scene graph for the pfGeoSet which has the
> polyline in and I have managed to access the co-ordinates of the line
> (there are only 2 as it's a straight section of road). I have also
> calculated the correct XYZ position I want to move the car to (depending
> on the set speed) along the road. Now for my question.
>
> How do I update the co-ordinates of my "car" which is just sitting on
> the road at the moment?
> Should I not include the car in the MultiGen database, and instead add
> the object at runtime (the car is a stand alone .flt file I simply
> instanced in MultiGen)? I think this can be done.
> Or should I be searching for the car in the Performer scene graph and
> updating its transformation with my new co-ordinates? I think I will be
> needing some sort of DCS for the car anyway.
>
> Hope someone can understand all that!
> thanks,
> Andrew Bailey
>
>
>
>
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>-- End of excerpt from Andrew Bailey
I was going to answer this but I see Andy, Mario and Pete have already taken
care of it. I just wanted to add: If you have the road tool in Multigen, when
you create a road with it you can tell Multigen to write an ASCII path file.It
will have a lot of information regarding the path itself plus speed, LOD
information, ETC. You can use this tool to create roads that conform to U.S
regulations, define superelevetion angles, arc radius for curves, you can even
define a profile for the road in case you want more than just the surface of
the road but a solid concrete structure (think of a bridge or elevated hwy. ),
it will also seamlessly place and orient the road's textures and add repetitive
features, it can create several LODs for the road and will let you modify any
of the parameters (move/delete a segment, change textures, etc) and ... you
get the idea: is a nice tool and the generated path file will also include
orientation information that will always keep the vehicle driving the road
parallel to the road's centerline and the up vector parallel to the road's
normal vector. Even if you don't want it for road creation it renders itself
useful for the task of generating paths. I know it's not what you asked for...
but just in case you want to check it out.

By the way... there is something about the orientation angles in the path
files and Paradigm's vega orientation angles (and thus Performer... I guess)
something like heading having to have 180 degs. subtracted to work right. If
you decide to use it, tell me and I'll search to see what it was exactly.

-- 
------------------------------------------------------------------------
Alejandro Saez
Software Engineer
Silicon Chile S.A.
                                        Avda. Santa Maria 2560
E-mail: asaez++at++silicon.cl              	Providencia
Phone:  +56 (2) 203 3371 Ext. 107 		Santiago
Fax:    +56 (2) 203 3370                Chile
------------------------------------------------------------------------
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:57:45 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.