|
|
|
|
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:
List of all members.
From Ianimatable. |
enum | TAnimValues {
OwnerBit = CTransform::AnimValueLast,
FovValue,
TargetValue,
RollValue,
AnimValueLast
} |
| Added values. 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...
|
Public Types |
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...
|
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 |
Static Private Methods |
IModel * | creator () |
Private Attributes |
bool | _FovAnimationEnabled |
bool | _TargetAnimationEnabled |
float | _FovAnimationAspectRatio |
CAnimatedValueFloat | _Fov |
CAnimatedValueVector | _Target |
CAnimatedValueFloat | _Roll |
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:
-
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 125 of file camera.h. |
Constructor & Destructor Documentation
NL3D::CCamera::CCamera |
( |
|
) |
[protected] |
|
virtual 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] |
|
bool NL3D::CCamera::enableTargetAnimation |
( |
bool |
en |
) |
[inline] |
|
ITrack * NL3D::CCamera::getDefaultTrack |
( |
uint |
valueId |
) |
[virtual] |
|
const char* NL3D::CCamera::getFovValueName |
( |
|
) |
[inline, static] |
|
void NL3D::CCamera::getFrustum |
( |
float & |
left, |
|
|
float & |
right, |
|
|
float & |
bottom, |
|
|
float & |
top, |
|
|
float & |
znear, |
|
|
float & |
zfar |
|
) |
const |
|
const CFrustum& NL3D::CCamera::getFrustum |
( |
|
) |
const [inline] |
|
const char* NL3D::CCamera::getRollValueName |
( |
|
) |
[inline, static] |
|
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 117 of file camera.h.
Referenced by getValueName. |
const char * NL3D::CCamera::getValueName |
( |
uint |
valueId |
) |
const [virtual] |
|
bool NL3D::CCamera::isOrtho |
( |
|
) |
const |
|
bool NL3D::CCamera::isPerspective |
( |
|
) |
const |
|
void NL3D::CCamera::registerBasic |
( |
|
) |
[static] |
|
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 65 of file camera.cpp.
References _Frustum, height, and width. |
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 60 of file camera.cpp.
References _Frustum. |
void NL3D::CCamera::setFrustum |
( |
const CFrustum & |
f |
) |
[inline] |
|
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 70 of file camera.cpp.
References _Frustum.
Referenced by update. |
void NL3D::CCamera::update |
( |
|
) |
[protected, virtual] |
|
|
Implement the update method.
Reimplemented from NL3D::CTransform.
Definition at line 163 of file camera.cpp.
References _Fov, _FovAnimationAspectRatio, _FovAnimationEnabled, _Frustum, _Roll, _Target, _TargetAnimationEnabled, FovValue, OwnerBit, RollValue, setPerspective, NL3D::ITransformable::setRotQuat, and TargetValue. |
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:
|
|