TBasicCamera Class Reference
[Base Classes for plugins]

Inheritance diagram for TBasicCamera:

I3DExCamera TBasicDataExchanger IMCUnknown TBasicUnknown IMCUnknown List of all members.

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 &resultOrigin, TVector3 &resultDirection) 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 void MCCOMAPI GetStandardCameraInfo (TStandardCameraInfo &cameraInfo) const
virtual MCCOMErr MCCOMAPI SetHalfWidth (real value)
virtual void MCCOMAPI SetRenderingUVBox (const TBBox2D &inUVBox)
virtual boolean MCCOMAPI InitDepthOfField ()

Detailed Description

Basic Camera class. Derive from this for a default implementation of I3DExCamera.
See also:
I3DExCamera


Member Function Documentation

virtual uint32 MCCOMAPI TBasicCamera::AddRef (   )  [inline, virtual]
 

Increments the reference count of the object

Reimplemented from TBasicUnknown.

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)

Parameters:
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).

Parameters:
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 &  resultOrigin,
TVector3 &  resultDirection
)  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.

Parameters:
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.

Parameters:
cameraInfo A reference to a structure where the definition of the camera is stored.

Implements I3DExCamera.

virtual boolean MCCOMAPI TBasicCamera::InitDepthOfField (   )  [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]
 

Deprecated:
Do not implement this method.

Implements I3DExCamera.

virtual boolean MCCOMAPI TBasicCamera::Project3DTo2D (  const TVector3 &  cameraPosition,
TVector3 &  screenPosition
)  const [virtual]
 

Projects a point on the screen.

Parameters:
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.
Returns:
true if the point has a projection on the screen, false otherwise.

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.

Parameters:
riid GUID of the interface
ppvObj A pointer to the pointer being returned.

Reimplemented from TBasicDataExchanger.

virtual MCCOMErr MCCOMAPI TBasicCamera::SetHalfWidth (  real  value  )  [virtual]
 

Sets the half width of a camera (Used by modelers)

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

Parameters:
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.

Parameters:
transform A reference to the Global Transform of the camera. You should not keep a pointer but copy it.

Implements I3DExCamera.


The documentation for this class was generated from the following file:
Generated on Mon Mar 14 12:29:06 2005 for Carrara SDK Doc by  doxygen 1.3.9.1