![]() |
Polygon Crucher SDK - Documentation
Documentation
|
C3DCamera handles camera object. More...
C3DCamera handles camera object.
GetFinalObject returns a camera model in order to display the camera itself. Camera node contains the transformation matrix of the camera, that can be use to display this object.
Camera node matrix is the invert of the LookAt matrix (which can be used to position the scene in the front of camera).
#include <3DCamera.h>
Public Member Functions | |
C3DCamera (OBJECT_KINDOF kindOf=OBJECT_CAMERA) | |
C3DCAMERA_PROJECTION_TYPE | GetProjection () const |
void | SetProjection (C3DCAMERA_PROJECTION_TYPE v) |
SceneNodeID | GetTarget () const |
void | SetTarget (SceneNodeID v) |
bool | HasTarget () const |
double | GetVFov () const |
void | SetVFov (double radianAngle) |
double | GetAspectRatio () const |
void | SetAspectRatio (double v) |
double | GetNearClip () const |
void | SetNearClip (double v) |
double | GetFarClip () const |
void | SetFarClip (double v) |
void | SetNearFarClip (double vn, double vf) |
double | GetFocusDistance () const |
void | SetFocusDistance (double v) |
double | GetAperture () const |
void | SetAperture (double v) |
double | GetVOrthoZoom () const |
void | SetVOrthoZoom (double v) |
bool | IsDefined (unsigned int param) const |
virtual void | SetScene (C3DScene *scene) |
Attach scene and update guid for camera and its displayable. | |
virtual bool | IsFinalObject () const |
virtual C3DBaseObject * | GetFinalObject (bool detach=false, bool computeIfNeeded=true) |
Returns the object itself or any kind of object. For example for a patch it can returns a C3DObject or a C3DPatch if the patch is not subdivided. | |
virtual unsigned int | GetChecksum (unsigned int checksumFlags=CHECKSUM_ALL) const |
Return a value that is a simple way to check if the geometry changed between two call to the method. | |
![]() | |
virtual bool | DeleteFromNode () |
virtual void | PostSerialize (CXArchive &ar, bool lastCall) |
virtual void | Serialize (CXArchive &ar) |
C3DScene * | GetScene () const |
Get the associated object scene. | |
BaseObjectID | GetObjectID () const |
Return the node GUID depending on the scene. If no scene defined, CGuidMgr::UNDEFINED_GUID is returned. | |
int | GetInstanceCount () const |
Return the instance count. If the count then this is a single object that is referenced only one time in the scene. | |
bool | IsInstanciated () const |
return true if several instance of the object exists. The C3DSceneNode that reference these instances can be retrieved using C3DScene::GetInstancesByID | |
unsigned int | GetCustomDataChecksum (unsigned int ignoreCustomID,...) const |
For object which are not geometric object, the checksum could be made on CustomData, and you can ignore some ID might be ignored if they content runtime value that does not reflect a change of the content. The list must be terminated by 0. | |
virtual bool | NeedUpdate () const |
virtual bool | Update (C3DScene *scene, unsigned int updateMode) |
Information that have been invalidated are recomputed when calling this method.IsInstanciated. | |
virtual void | Invalidate (unsigned int objectInvalidationFlags, bool set=true) |
Notify that some information changed (combination of OBJECT_UPDATE_PROPERTIES invalidation flags) and invalidate related information, which will be updated in the Update call. The invalidated information is not destroyed until the next Update call. | |
virtual bool | InvalidateChannels (unsigned int channelType) |
Notify that channels that have cache should be recomputed (ie, UVW channel or normal channel for example). This give better control than Invalidate(OBJECT_INV_CHANNELS) which invalidate any channel information. We can specify with this method what need to be invalidated depending on the performed operation. Return true, if a cache has been invalidated. | |
unsigned int | GetInvalidateFlags () const |
Return the flags that have been invalidated. | |
bool | IsInvalidate (OBJECT_UPDATE_PROPERTIES flag) const |
Allow to know if an invalidate flag has been set. Invalidate flag is reset when Update is called. | |
longint | GetUpdateStamp (OBJECT_UPDATE_PROPERTIES flags) const |
Allow to know if the given flag changed between two call. | |
virtual bool | MatrixTransform (const C4x4Matrix &matrix) |
Transform the 3D information with the given matrix. The object should not be instanciated or all instance are modified. | |
C3DBaseObject * | Copy (int copyflags=OBJECT_COPY_DEFAULT, C3DObjectCreator *objectCreator=NULL) const |
void | SetFlag (OBJECT_PROPERTIES flag, bool set) |
void | SetFlags (unsigned int flags, bool set) |
bool | IsFlagSet (OBJECT_PROPERTIES flag) const |
bool | IsOneFlagSet (unsigned int flags) const |
bool | CheckFlags (unsigned int checkflags, bool allSetOrNoneSet) const |
virtual void | InheritFlags (const C3DBaseObject &srcObject, int copyflags=OBJECT_COPY_DEFAULT) |
This methods only inherits srcObject flags and custom data and optionaly objectGUID / instanceID if srcObject is to be replaced by the object. It does not modify the data structure. | |
CCustomData & | GetCustomData () |
const CCustomData & | GetCustomData () const |
operator C3DGeomObject * () const | |
Operators (cast operators, return NULL if object is this or if the type is incorrect It does not perform any geometric or topologic conversions. | |
operator C3DGroup * () const | |
Cf. C3DGeomObject*(). | |
operator C3DObject * () const | |
Cf. C3DGeomObject*(). | |
operator C3DCurve * () const | |
Cf. C3DGeomObject*(). | |
operator C3DPatch * () const | |
Cf. C3DGeomObject*(). | |
operator C3DDummy * () const | |
Cf. C3DGeomObject*(). | |
operator C3DLight * () const | |
Cf. C3DGeomObject*(). | |
operator C3DCamera * () const | |
Cf. C3DGeomObject*(). | |
bool | IsGeomObject () const |
return true if the object is an OBJECT_GEOM. Cf. OBJECT_KINDOF | |
OBJECT_KINDOF | GetKindOf () const |
return OBJECT_KINDOF, which defines the kind of object. | |
CXString | GetTypeString () const |
return a string containing the kind of the object ("curve", "camera"...) | |
![]() | |
virtual bool | Delete () |
int | GetRefCount () const |
int | AddRef () const |
Static Public Member Functions | |
static bool | LookAt (C4x4Matrix &matrix, const C3DPoint &eye, const C3DPoint &target, const C3DVector &up) |
Compute the lookAt matrix from the given vector. Equivalent to glLookAt. Invert this matrix if you intend to use it as the node matrix. | |
static bool | PositionMatrix (C4x4Matrix &matrix, const C3DPoint &eye, const C3DPoint &target, const C3DVector &up) |
Camera node position (invert of LookAt) | |
![]() | |
static C3DBaseObject * | Create (OBJECT_KINDOF kindOf) |
Allocates and creates a new empty object of the given type OBJECT_KINDOF. Uses xNew internally. | |
|
virtual |
Return a value that is a simple way to check if the geometry changed between two call to the method.
Reimplemented from C3DBaseObject.
|
inlinevirtual |
Returns the object itself or any kind of object. For example for a patch it can returns a C3DObject or a C3DPatch if the patch is not subdivided.
Reimplemented from C3DBaseObject.
Reimplemented from C3DBaseObject.
Attach scene and update guid for camera and its displayable.
Reimplemented from C3DBaseObject.