www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: paulscode on March 15, 2008, 12:45:50 am

Title: Camera position and orientation
Post by: paulscode on March 15, 2008, 12:45:50 am
Hello, I have another simple question.  I need to be able to access the camera's position, a look-at point, and a point in the up-direction.  Looking through the classes, it looks like the methods I will need to use are:

getPosition()        // World Position
getDirection()       // look-at *direction*
getYAxis()           // up-direction *normalized*

My theory is that to get a look-at point, I would add getDirection() to getPosition(), and to get a point in the up-direction, I would add getYAxis() to getPosition().  Since I will be using this idea in methods which are not related to graphics, it would be difficult for me to test if this theory is correct, so I thought it would be smart to ask the experts first ;D  Thanks!
Title: Re: Camera position and orientation
Post by: EgonOlsen on March 15, 2008, 10:32:08 am
Sound reasonable to me...