Re: [Plib-devel] LookAt
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-08-04 00:25:49
|
> Dave McClurg wrote: > > I ported gluLookAt to SSG, tested it, and committed the changes > > void ssgLookAt ( SGfloat eyex, SGfloat eyey, SGfloat eyez, > SGfloat centerx, SGfloat centery, SGfloat centerz, > SGfloat upx, SGfloat upy, SGfloat upz ) Good idea - but I have a couple of really minor gripes: I think it should be a member function of ssgContext where the other camera stuff lives - and rather than slavishly follow the OpenGL parameter list, we could be a bit more friendly and take three vectors as parameters instead of nine floats...something like: void ssgContext::setCameraLookAt ( sgVec3 eye, sgVec3 center, sgVec3 up ) ; ...then you could still have a non-member function that just works on _ssgCurrentContext... void ssgSetCameraLookAt ( sgVec3 eye, sgVec3 center, sgVec3 up ) ; ...that would be more in tune with the rest of the package. You could also overload it with a version that doesn't need the 'up' parameter and just takes it to be (0,0,1) - which is probably good for 99% of applications. -- Steve Baker HomeEmail: <sjb...@ai...> WorkEmail: <sj...@li...> HomePage : http://web2.airmail.net/sjbaker1 Projects : http://plib.sourceforge.net http://tuxaqfh.sourceforge.net http://tuxkart.sourceforge.net http://prettypoly.sourceforge.net |