5#if !defined(AFX_3DCAMERA_H__5C85DAE7_BE95_4F8B_B661_B0CF9BE55255__INCLUDED_)
6#define AFX_3DCAMERA_H__5C85DAE7_BE95_4F8B_B661_B0CF9BE55255__INCLUDED_
15BEGIN_MOOTOOLS_NAMESPACE
34#define C3DCAMERA_DEFAULT_PROJECTION (CAMERA_PROJECTION_PERSPECTIVE)
36#define C3DCAMERA_DEFAULT_FOV (DEG2RAD(45.f))
37#define C3DCAMERA_DEFAULT_ASPECT_RATIO (1.f)
38#define C3DCAMERA_DEFAULT_ZOOM (1.f)
40#define C3DCAMERA_DEFAULT_NEAR_CLIP (-1.0f)
41#define C3DCAMERA_DEFAULT_FAR_CLIP (-1.0f)
43#define C3DCAMERA_DEFAULT_FOCUS_DISTANCE (0.f)
44#define C3DCAMERA_DEFAULT_APERTURE (8.f)
47typedef enum _CAMERA_PROJECTION_TYPE
XEnumType(
unsigned int)
49 CAMERA_PROJECTION_PERSPECTIVE = 0,
50 CAMERA_PROJECTION_ORTHOGRAPHIC,
52 CAMERA_NB_PROJECTION_TYPES,
77 bool HasTarget()
const;
79 double GetVFov()
const;
81 double GetAspectRatio()
const;
82 void SetAspectRatio(
double v);
84 double GetNearClip()
const;
85 void SetNearClip(
double v);
86 double GetFarClip()
const;
87 void SetFarClip(
double v);
88 void SetNearFarClip(
double vn,
double vf);
90 double GetFocusDistance()
const;
91 void SetFocusDistance(
double v);
92 double GetAperture()
const;
93 void SetAperture(
double v);
96 double GetVOrthoZoom()
const;
97 void SetVOrthoZoom(
double v);
99 bool IsDefined(
unsigned int param)
const;
102 virtual bool IsFinalObject()
const {
return false; }
106 GenerateDisplayable();
115 void GenerateDisplayable();
119END_MOOTOOLS_NAMESPACE
C3DBaseObject class which is the common base class for all object types.
OBJECT_KINDOF
Definition 3DBaseObject.h:28
@ OBJECT_CAMERA
C3DCamera.
Definition 3DBaseObject.h:38
Camera3DID
Definition 3DCamera.h:21
@ C3DCAMERA_TARGET
longuint
Definition 3DCamera.h:23
@ C3DCAMERA_ZOOM
double
Definition 3DCamera.h:26
@ C3DCAMERA_FAR_CLIP
double
Definition 3DCamera.h:28
@ C3DCAMERA_APERTURE
double (f/<ap>)
Definition 3DCamera.h:30
@ C3DCAMERA_NEAR_CLIP
double: distance in cm
Definition 3DCamera.h:27
@ C3DCAMERA_PROJECTION
int
Definition 3DCamera.h:22
@ C3DCAMERA_FOCUS_DISTANCE
double
Definition 3DCamera.h:29
@ C3DCAMERA_ASPECT_RATIO
double
Definition 3DCamera.h:25
@ C3DCAMERA_FOV
double (angle in radian for perspective, distance for orthographic)
Definition 3DCamera.h:24
The file contains C3DObject class definition which handles N-Gons polygonal object.
@ CHECKSUM_ALL
All is used for computing checksum.
Definition 3DType.h:433
This is the base class for any kind of object.
Definition 3DBaseObject.h:106
C3DCamera handles camera object.
Definition 3DCamera.h:61
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 in...
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 void SetScene(C3DScene *scene)
Attach scene and update guid for camera and its displayable.
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 o...
Definition 3DCamera.h:103
static bool PositionMatrix(C4x4Matrix &matrix, const C3DPoint &eye, const C3DPoint &target, const C3DVector &up)
Camera node position (invert of LookAt)
C3DObject handles polygonal mesh.
Definition 3DObject.h:24
The class allows to get access to the scene graph, node hierarchy, material.
Definition 3DScene.h:306
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27