Re: [Plib-users] accessing the camera-/modelview-matrix
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2002-01-06 03:16:14
|
Volker Poplawski wrote: > well, these methods don't set the model-view-matrix directly, the transpose > and negate the given matrix and exchange the y- and z-axis before applying to > the cameraMatrix. That's true - but necessary if we are going to stick with the two concepts that: 1) SSG supports Z-is-up coordinate systems. (Sorry - that's how it is and it's not going to change) 2) You are positioning the camera in the world and not the world relative to the camera (which is what everyone expects when you position the camera). If you want to do it your way, you'll have to define an ssgTransform at the top of your scene graph and plug your matrix in there. That way it won't be inverted - but Z-is-up is still the rule. > Right now i'm using ssgSetCamera( myMatrix ) but i'have to do the > transposeAndNegate and exc. y-z on myMatrix first to have the operations > later reverted by ssgSetCamera(), somewhat sub-optimal... Well, you are probably only doing it once per frame - it should take less than a millionth of a second to execute - so I wouldn't sweat it. I don't see this as being worth the effort to add to the API something that you are almost certainly going to be the only user of - and can easily work around. ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://www.sjbaker.org http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |