|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CCamera Class ReferenceA Camera node, based on a CTransform node.
More...
#include <camera.h>
Inheritance diagram for NL3D::CCamera
[legend]Collaboration diagram for NL3D::CCamera:
[legend]List of all members.
Public Types |
enum | TAnimValues {
OwnerBit = CTransform::AnimValueLast,
FovValue,
TargetValue,
RollValue,
AnimValueLast
} |
| Added values. More...
|
Public Methods |
void | setFrustum (const CFrustum &f) |
| Set the frustum of the camera. More...
|
const CFrustum& | getFrustum () const |
| Get the frustum of the camera. More...
|
void | setFrustum (float left, float right, float bottom, float top, float znear, float zfar, bool perspective= true) |
| Setup the camera mode as a perspective/ortho camera. NB: znear and zfar must be >0 (if perspective). More...
|
void | setFrustum (float width, float height, float znear, float zfar, bool perspective= true) |
| Setup the camera mode as a perspective/ortho camera. NB: znear and zfar must be >0 (if perspective). More...
|
void | getFrustum (float &left, float &right, float &bottom, float &top, float &znear, float &zfar) const |
| Get the camera frustum. More...
|
bool | isOrtho () const |
| Is a ortho camera? More...
|
bool | isPerspective () const |
| Is a perspective camera? More...
|
void | setPerspective (float fov, float aspectRatio, float znear, float zfar) |
| Setup a perspective camera, giving a fov in radians. More...
|
bool | enableFovAnimation (bool en, float aspectRatio= 4.0f / 3.0f) |
| enable FOV animation. More...
|
bool | enableTargetAnimation (bool en) |
| enable Target/Roll animation. More...
|
virtual IAnimatedValue* | getValue (uint valueId) |
| From IAnimatable. More...
|
virtual const char* | getValueName (uint valueId) const |
| From IAnimatable. More...
|
virtual ITrack* | getDefaultTrack (uint valueId) |
| Default Track Values for are identity (roll= 0, target= CVector::Null, fov=Pi/2). More...
|
virtual void | registerToChannelMixer (CChannelMixer *chanMixer, const std::string &prefix) |
| register camera channels (in global anim mode). More...
|
Static Public Methods |
void | registerBasic () |
| Call at the begining of the program, to register the model, and the basic observers. More...
|
const char* | getFovValueName () |
| Return the name of the fov track. More...
|
const char* | getTargetValueName () |
| Return the name of the target track. This target is in the parent space of camera. More...
|
const char* | getRollValueName () |
| Return the name of the roll track. More...
|
Protected Methods |
| CCamera () |
| Constructor. More...
|
virtual | ~CCamera () |
| Destructor. More...
|
virtual void | update () |
| Implement the update method. More...
|
Protected Attributes |
CFrustum | _Frustum |
Private Attributes |
bool | _FovAnimationEnabled |
bool | _TargetAnimationEnabled |
float | _FovAnimationAspectRatio |
CAnimatedValueFloat | _Fov |
CAnimatedValueVector | _Target |
CAnimatedValueFloat | _Roll |
Static Private Methods |
IModel* | creator () |
Static Private Attributes |
CTrackDefaultFloat | DefaultFov |
CTrackDefaultVector | DefaultTarget |
CTrackDefaultFloat | DefaultRoll |
Detailed Description
A Camera node, based on a CTransform node.
The camera look in his local Y direction (see CScene).
No observer is provided, since a camera:
- has default behavior of a transform.
- can't be clipped (well... :) ).
- is not lightable
- is not renderable
-
Author(s):
-
Lionel Berenguier , Nevrax France
-
Date:
-
2000
Definition at line 56 of file camera.h.
Member Enumeration Documentation
enum NL3D::CCamera::TAnimValues
|
|
|
Added values.
-
Enumeration values:
-
OwnerBit
|
|
FovValue
|
|
TargetValue
|
|
RollValue
|
|
AnimValueLast
|
|
Reimplemented from NL3D::ITransformable.
Definition at line 123 of file camera.h. |
Constructor & Destructor Documentation
NL3D::CCamera::CCamera (
|
) [protected]
|
|
NL3D::CCamera::~CCamera (
|
) [inline, protected, virtual]
|
|
Member Function Documentation
IModel * NL3D::CCamera::creator (
|
) [inline, static, private]
|
|
bool NL3D::CCamera::enableFovAnimation (
|
bool en,
|
|
float aspectRatio = 4.0f / 3.0f ) [inline]
|
|
|
enable FOV animation.
(default is false). see setPerspective(). znear and zfar are kept from previous setup. NB: as setPerspective(), fov is the full horizontal angle of camera (in radians).
Definition at line 91 of file camera.h. |
bool NL3D::CCamera::enableTargetAnimation (
|
bool en ) [inline]
|
|
|
enable Target/Roll animation.
(default is false). TTransform mode is forced to RotQuatMode. Roll is forced to 0. The camera builds the rot matrix from the animated target/roll.
Definition at line 100 of file camera.h. |
ITrack * NL3D::CCamera::getDefaultTrack (
|
uint valueId ) [virtual]
|
|
|
Default Track Values for are identity (roll= 0, target= CVector::Null, fov=Pi/2).
Reimplemented from NL3D::CTransform.
Definition at line 135 of file camera.cpp. |
const char * NL3D::CCamera::getFovValueName (
|
) [inline, static]
|
|
|
Return the name of the fov track.
NB: as setPerspective(), fov is the full horizontal angle of camera (in radians).
Definition at line 113 of file camera.h. |
void NL3D::CCamera::getFrustum (
|
float & left,
|
|
float & right,
|
|
float & bottom,
|
|
float & top,
|
|
float & znear,
|
|
float & zfar ) const
|
|
|
Get the camera frustum.
Definition at line 73 of file camera.cpp. |
const CFrustum & NL3D::CCamera::getFrustum (
|
) const [inline]
|
|
|
Get the frustum of the camera.
Definition at line 68 of file camera.h. |
const char * NL3D::CCamera::getRollValueName (
|
) [inline, static]
|
|
|
Return the name of the roll track.
Definition at line 117 of file camera.h. |
const char * NL3D::CCamera::getTargetValueName (
|
) [inline, static]
|
|
|
Return the name of the target track. This target is in the parent space of camera.
Definition at line 115 of file camera.h. |
const char * NL3D::CCamera::getValueName (
|
uint valueId ) const [virtual]
|
|
bool NL3D::CCamera::isOrtho (
|
) const
|
|
|
Is a ortho camera?
Definition at line 83 of file camera.cpp. |
bool NL3D::CCamera::isPerspective (
|
) const
|
|
|
Is a perspective camera?
Definition at line 88 of file camera.cpp. |
void NL3D::CCamera::registerBasic (
|
) [static]
|
|
|
Call at the begining of the program, to register the model, and the basic observers.
Reimplemented from NL3D::CTransform.
Definition at line 34 of file camera.cpp. |
void NL3D::CCamera::registerToChannelMixer (
|
CChannelMixer * chanMixer,
|
|
const std::string & prefix ) [virtual]
|
|
void NL3D::CCamera::setFrustum (
|
float width,
|
|
float height,
|
|
float znear,
|
|
float zfar,
|
|
bool perspective = true )
|
|
|
Setup the camera mode as a perspective/ortho camera. NB: znear and zfar must be >0 (if perspective).
Definition at line 63 of file camera.cpp. |
void NL3D::CCamera::setFrustum (
|
float left,
|
|
float right,
|
|
float bottom,
|
|
float top,
|
|
float znear,
|
|
float zfar,
|
|
bool perspective = true )
|
|
|
Setup the camera mode as a perspective/ortho camera. NB: znear and zfar must be >0 (if perspective).
Definition at line 58 of file camera.cpp. |
void NL3D::CCamera::setFrustum (
|
const CFrustum & f ) [inline]
|
|
|
Set the frustum of the camera.
Definition at line 66 of file camera.h. |
void NL3D::CCamera::setPerspective (
|
float fov,
|
|
float aspectRatio,
|
|
float znear,
|
|
float zfar )
|
|
|
Setup a perspective camera, giving a fov in radians.
-
Parameters:
-
fov
|
the horizontal angle of view, in radians. (Pi/2 as example) |
aspectRatio
|
the ratio horizontal/vertical (1.33 as example). |
znear
|
the front clipping plane distance. |
zfar
|
the back clipping plane distance. |
Definition at line 68 of file camera.cpp. |
void NL3D::CCamera::update (
|
) [protected, virtual]
|
|
Member Data Documentation
float NL3D::CCamera::_FovAnimationAspectRatio [private]
|
|
bool NL3D::CCamera::_FovAnimationEnabled [private]
|
|
CFrustum NL3D::CCamera::_Frustum [protected]
|
|
bool NL3D::CCamera::_TargetAnimationEnabled [private]
|
|
The documentation for this class was generated from the following files:
|
|