class SG_EXPORT osg::Camera: public osg::Referenced

Camera class for encapsulating the view position and orientation.

Inheritance:


Public Methods

[more] Camera()
[more]virtual ~Camera()
[more]void setFieldOfView(double fovy, double aspectRatio)
Set field of view and window aspect ratio.
[more]void setFieldOfViewY(double fovy)
[more]double getFieldOfViewY() const
[more]void setAspectRatio(double aspectRatio)
[more]double getAspectRatio() const
[more]void home()
hardwired home view for now, looking straight down the Z axis at the origin, with 'up' being the y axis
[more]void setView(Vec3 eyePoint, Vec3 lookPoint, Vec3 upVector)
Set the View, the up vector should be orthogonal to the look vector
[more]const Vec3& getEyePoint() const
get the eyepoint.
[more]const Vec3& getLookPoint() const
get the lookpoint.
[more]const Vec3& getUpVector() const
which way is up?
[more]Vec3 getSideVector() const
calculate side vector
[more]Vec3 getLookVector() const
calculate look vector
[more]float getFocalDistance() const
calculate focal distance
[more]void setNearPlane(double nearPlane)
set the near plane.
[more]double getNearPlane() const
get the near plane.
[more]void setFarPlane(double farPlane)
set the far plane.
[more]double getFarPlane() const
get the far plane.
[more]void draw_PROJECTION() const
Set up the OpenGL GL_PROJECTION matrix.
[more]void draw_MODELVIEW() const
Set up the OpenGL GL_MODELVIEW matrix.
[more]void mult(const Camera& camera, const Matrix& m)
post multiply a camera by matrix
[more]void mult(const Matrix& m, const Camera& camera)
pre multiply a camera by matrix
[more]void ensureOrthogonalUpVector()


Inherited from Referenced:

Public Methods

oReferenced& operator = (Referenced&)
ovoid ref()
ovoid unref()
oint referenceCount()

Protected Fields

oint _refCount


Documentation

Camera class for encapsulating the view position and orientation. This is the first implementation of osg::Camera class and currently is a perspective camera, but in future will be a base class from which PerpsectivCamera,FrustumCamera and OrthoCamera will be derived.
o Camera()

ovirtual ~Camera()

ovoid setFieldOfView(double fovy, double aspectRatio)
Set field of view and window aspect ratio. The parameters have the same meaning as their counterparts in gluPerspective(fovy,aspectRatio

ovoid setFieldOfViewY(double fovy)

odouble getFieldOfViewY() const

ovoid setAspectRatio(double aspectRatio)

odouble getAspectRatio() const

ovoid home()
hardwired home view for now, looking straight down the Z axis at the origin, with 'up' being the y axis

ovoid setView(Vec3 eyePoint, Vec3 lookPoint, Vec3 upVector)
Set the View, the up vector should be orthogonal to the look vector

oconst Vec3& getEyePoint() const
get the eyepoint.

oconst Vec3& getLookPoint() const
get the lookpoint.

oconst Vec3& getUpVector() const
which way is up?

oVec3 getSideVector() const
calculate side vector

oVec3 getLookVector() const
calculate look vector

ofloat getFocalDistance() const
calculate focal distance

ovoid setNearPlane(double nearPlane)
set the near plane.

odouble getNearPlane() const
get the near plane.

ovoid setFarPlane(double farPlane)
set the far plane.

odouble getFarPlane() const
get the far plane.

ovoid draw_PROJECTION() const
Set up the OpenGL GL_PROJECTION matrix. Enters the GL_PROJECTION mode, sets up matrix, then resets model GL_MODELVIEW, which is by OpenGL convention the default.

ovoid draw_MODELVIEW() const
Set up the OpenGL GL_MODELVIEW matrix. Enters the GL_MODELVIEW mode, sets matrix to identity and then sets matrix up according to camera, eye point, center point and upvector.

ovoid mult(const Camera& camera, const Matrix& m)
post multiply a camera by matrix

ovoid mult(const Matrix& m, const Camera& camera)
pre multiply a camera by matrix

ovoid ensureOrthogonalUpVector()


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.