Randy Stiles (stiles++at++aic.lockheed.com)
Wed, 09 Oct 1996 10:28:53 -0700
You need to calculate the world matrix, from the root pfScene down
to the ship's dcs. Then multiply the desired point of the observer on the
ship against this world matrix.
It should be possible for you to make a subclass of pfDCS that updates the
view. Call it viewDCS. You make an instance of this class the child
of your ship dcs. Then you move the viewer relative to the ship by
setting this viewDCS's translation and orientation relative only to the ship.
The update is done by traversing the scene graph from the viewDCS up
to the pfSCene, post multiplying matrices to get a world matrix. Then
the translation and orientatin of this world matrix is used to
update the pfChanMat.
In your viewDCS class, you would handle semantics of which viewDCS owns
the viewer at any time, so that but one has ownership. We have done
something similar, so I know this approach works.
-Randy
--
// Randy Stiles mailto:stiles++at++aic.lockheed.com Orgn H142 Bldg 255
// Lockheed Martin Advanced Technology Center 3251 Hanover Street
// office: 415.354.5256 fax: 415.354.5235 Palo Alto, CA 94304-1192
// http://vet.parl.com/~vet/people/stiles/
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:45 PDT