Update of /cvsroot/simspark/simspark/spark/oxygen/sceneserver
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14819
Modified Files:
Tag: projectx
camera.h
Log Message:
added LookAt() method (making the camera looking at a point)
Index: camera.h
===================================================================
RCS file: /cvsroot/simspark/simspark/spark/oxygen/sceneserver/camera.h,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** camera.h 5 Dec 2005 21:21:17 -0000 1.1
--- camera.h 8 May 2007 03:04:27 -0000 1.1.4.1
***************
*** 46,73 ****
/** sets viewpoint properties */
void SetViewport(int x, int y, int width, int height);
! int GetViewportX();
! int GetViewportY();
! int GetViewportWidth();
! int GetViewportHeight();
/** sets the field of view (FOV) */
! void SetFOV(const float fov);
/** sets the distance of the Z near plane */
! void SetZNear(const float zNear);
/** sets the distance of the Z far plane */
! void SetZFar(const float zFar);
/** adjusts the current FOV, i.e. adds a delta increment */
! void AdjustFOV(const float fov);
/** adjusts the distance of the Z near plane, i.e adds a delta
increment */
! void AdjustZNear(const float zNear);
/** adjusts the distance of the Z far plane, i.e adds a delta
increment */
! void AdjustZFar(const float zFar);
/** returns the field of View */
--- 46,74 ----
/** sets viewpoint properties */
void SetViewport(int x, int y, int width, int height);
!
! int GetViewportX() const;
! int GetViewportY() const;
! int GetViewportWidth() const;
! int GetViewportHeight() const;
/** sets the field of view (FOV) */
! void SetFOV(float fov);
/** sets the distance of the Z near plane */
! void SetZNear(float zNear);
/** sets the distance of the Z far plane */
! void SetZFar(float zFar);
/** adjusts the current FOV, i.e. adds a delta increment */
! void AdjustFOV(float fov);
/** adjusts the distance of the Z near plane, i.e adds a delta
increment */
! void AdjustZNear(float zNear);
/** adjusts the distance of the Z far plane, i.e adds a delta
increment */
! void AdjustZFar(float zFar);
/** returns the field of View */
***************
*** 90,93 ****
--- 91,99 ----
void DescribeFrustum(salt::Frustum& frustum) const;
+ /** turn the camera so that it looks to a given point.
+ * @param toPoint the point to look at
+ */
+ void LookAt(const salt::Vector3f& toPoint);
+
/** sets the view transform to be the inverted WorldTransform and
sets up the projection transform matrix
|