Public Member Functions | |
virtual MCCOMErr MCCOMAPI | QueryInterface (const MCIID &riid, void **ppvObj) |
virtual uint32 MCCOMAPI | AddRef () |
virtual MCCOMErr MCCOMAPI | SetTransform (const TTransform3D &transform) |
virtual boolean MCCOMAPI | CreateRay (const TVector2 &screenPosition, TVector3 &worldOrigin, TVector3 &worldDirection) const |
virtual boolean MCCOMAPI | CreateRay (const TVector2 &screenPosition, const TVector2 &screenDerivate, Ray3D &ray) const |
virtual boolean MCCOMAPI | CreateRay (const TVector2 &screenPosition, const TVector2 &screenDerivate, const TVector2 &lensPosition, Ray3D &ray) |
virtual boolean MCCOMAPI | IsProjectionAffine (void) const |
virtual boolean MCCOMAPI | PreProject3DTo2D (const TVector3 &cameraPosition, TVector4 &projectedPosition) const |
virtual boolean MCCOMAPI | Project3DTo2D (const TVector3 &cameraPosition, TVector3 &screenPosition) const |
virtual uint32 MCCOMAPI | GetPrimitiveID () const =0 |
virtual MCCOMErr MCCOMAPI | SetNearPlane (real32 value) |
virtual void MCCOMAPI | GetStandardCameraInfo (TStandardCameraInfo &cameraInfo) const |
virtual MCCOMErr MCCOMAPI | SetHalfWidth (real value) |
virtual void MCCOMAPI | SetRenderingUVBox (const TBBox2D &inUVBox) |
virtual boolean MCCOMAPI | InitDepthOfField (int32 &samplingQuality) |
Basic Camera class. Derive from this for a default implementation of I3DExCamera.
virtual uint32 MCCOMAPI TBasicCamera::AddRef | ( | ) | [inline, virtual] |
Increments the reference count of the object
Reimplemented from TBasicDataExchanger.
virtual boolean MCCOMAPI TBasicCamera::CreateRay | ( | const TVector2 & | screenPosition, | |
const TVector2 & | screenDerivate, | |||
const TVector2 & | lensPosition, | |||
Ray3D & | ray | |||
) | [virtual] |
Creates a ray for depth of field rendering. Note that you should call InitDepthOfField() first (and for every frame)
screenPosition | The position in screen coordinates. | |
screenDerivate | The delta of the position in screen coordinates (the derivate of the ray should be proportional to that). | |
lensPosition | The position on the lens (in [0,1]x[0,1]) | |
ray | The ray that is returned. |
Implements I3DExCamera.
virtual boolean MCCOMAPI TBasicCamera::CreateRay | ( | const TVector2 & | screenPosition, | |
const TVector2 & | screenDerivate, | |||
Ray3D & | ray | |||
) | const [virtual] |
Generates a ray through a given screen location with a given thickness (screenDerivate).
screenPosition | The position in screen coordinates. | |
screenDerivate | The delta of the position in screen coordinates (the derivate of the ray should be proportional to that). | |
ray | The ray that is returned. |
Implements I3DExCamera.
virtual boolean MCCOMAPI TBasicCamera::CreateRay | ( | const TVector2 & | screenPosition, | |
TVector3 & | worldOrigin, | |||
TVector3 & | worldDirection | |||
) | const [virtual] |
Generates a ray through a given screen location. Note that in this case the ray has no width. To get a ray with a width you should use the next call.
screenPosition | The position in screen coordinates. | |
worldOrigin | The origin of the ray that is returned. | |
worldDirection | The direction of the ray that is returned. |
Implements I3DExCamera.
virtual uint32 MCCOMAPI TBasicCamera::GetPrimitiveID | ( | ) | const [pure virtual] |
Returns an identificator for the camera.
Implements I3DExCamera.
virtual void MCCOMAPI TBasicCamera::GetStandardCameraInfo | ( | TStandardCameraInfo & | cameraInfo | ) | const [virtual] |
Returns the standard camera info used in the interactive renderers (in the 3D View). For perfomance reasons the interactive renderers use this function to get an approximation of the camera that is used to perform the rendering.
cameraInfo | A reference to a structure where the definition of the camera is stored. |
Implements I3DExCamera.
virtual boolean MCCOMAPI TBasicCamera::InitDepthOfField | ( | int32 & | samplingQuality | ) | [virtual] |
Inits the depth of field at the beginning of the rendering of a frame. Returns true if the camera has depth of field enabled.
Implements I3DExCamera.
virtual boolean MCCOMAPI TBasicCamera::IsProjectionAffine | ( | void | ) | const [virtual] |
Returns true if the projection is affine (if w component from projection is always 1.0)
Implements I3DExCamera.
virtual boolean MCCOMAPI TBasicCamera::PreProject3DTo2D | ( | const TVector3 & | cameraPosition, | |
TVector4 & | projectedPosition | |||
) | const [virtual] |
Implements I3DExCamera.
virtual boolean MCCOMAPI TBasicCamera::Project3DTo2D | ( | const TVector3 & | cameraPosition, | |
TVector3 & | screenPosition | |||
) | const [virtual] |
Projects a point on the screen.
cameraPosition | The point to project on the screen. (in Camera Coordinates) | |
screenPosition | The projection on the screen, the third coordinates is the z coordinates of the point in camera coordinates. |
Implements I3DExCamera.
virtual MCCOMErr MCCOMAPI TBasicCamera::QueryInterface | ( | const MCIID & | riid, | |
void ** | ppvObj | |||
) | [virtual] |
Check if the object supports a given interface and returns a pointer to that interface if it does. Note that QueryInterface will increment the reference count of the object by one if the interface is found.
riid | GUID of the interface | |
ppvObj | A pointer to the pointer being returned. |
Reimplemented from TBasicDataExchanger.
Sets the half width of a camera (Used by modelers)
Implements I3DExCamera.
Sets the near clipping plane of the camera
Implements I3DExCamera.
virtual void MCCOMAPI TBasicCamera::SetRenderingUVBox | ( | const TBBox2D & | inUVBox | ) | [inline, virtual] |
Notifies the camera of the screen coordinates bounding box that is going to be used during the rendering. The Camera should store that information and use it if needed in CreateRay()/PreProject3DTo2D()/Project3DTo2D() So far only the spherical camera needs this
inUVBox | The extent of the screen. |
Implements I3DExCamera.
virtual MCCOMErr MCCOMAPI TBasicCamera::SetTransform | ( | const TTransform3D & | transform | ) | [virtual] |
Gives the camera its global transform. This can be used to create a cache to speed up the calculation in CreateRay for instance.
transform | A reference to the Global Transform of the camera. You should not keep a pointer but copy it. |
Implements I3DExCamera.