This reference page is linked to from the following overview topics: Object Plug-ins, Lesson 2: The Scene Graph and Nodes, Overview: Scene Graph and Nodes, Deformable Objects, Cameras.
This is a base class from which camera plug-ins may be derived.
Methods of this class are used to get and set properties of the camera. All methods of this class are virtual. To ensure that the camera has a valid targDist during network rendering, be sure to call UpdateTargDistance( TimeValue t, INode* inode ); This call should be made PRIOR to cameraObj->EvalWorldState().
#include <object.h>
Public Member Functions |
|
SClass_ID | SuperClassID () |
Retrieves a constant representing the type
of the plugin. |
|
int | IsRenderable () |
Indicates whether the object may be
rendered. |
|
virtual void | InitNodeName (MSTR &s) |
This is the default name of the node when it
is created. |
|
virtual int | UsesWireColor () |
This method determines if the object color
is used for display. |
|
virtual RefResult | EvalCameraState (TimeValue time, Interval &valid, CameraState *cs)=0 |
This method is called to update the
CameraState and validity interval at the specified time.
|
|
virtual void | SetOrtho (BOOL b)=0 |
Sets whether the camera is on ortho mode or
not. |
|
virtual BOOL | IsOrtho ()=0 |
Returns TRUE if the camera is in ortho mode
and FALSE if it is not. |
|
virtual void | SetFOV (TimeValue t, float f)=0 |
Sets the field-of-view of the camera at the
specified time. |
|
virtual float | GetFOV (TimeValue t, Interval &valid=Interval(0, 0))=0 |
Returns the field-of-view setting of the
camera at the specified time and adjusts the validity interval of
the camera at this time to reflect the field-of-view parameter.
|
|
virtual void | SetTDist (TimeValue t, float f)=0 |
Sets the target distance setting (for free
cameras) at the specified time. |
|
virtual float | GetTDist (TimeValue t, Interval &valid=Interval(0, 0))=0 |
Returns the target distance setting of the
camera at the specified time and adjusts the validity interval of
the camera to reflect the target distance parameter. |
|
virtual int | GetManualClip ()=0 |
Returns the manual clip flag. |
|
virtual void | SetManualClip (int onOff)=0 |
Sets the manual clip flag. |
|
virtual float | GetClipDist (TimeValue t, int which, Interval &valid=Interval(0, 0))=0 |
Retrieves the clipping distance of the
specified plane at the specified time and modifies the validity
interval to reflect the setting of the clipping distance parameter.
|
|
virtual void | SetClipDist (TimeValue t, int which, float val)=0 |
Sets the clipping distance of the specified
plane at the specified time. |
|
virtual void | SetEnvRange (TimeValue time, int which, float f)=0 |
Sets the environment range distance at the
specified time. |
|
virtual float | GetEnvRange (TimeValue t, int which, Interval &valid=Interval(0, 0))=0 |
Retrieves the environment range distance at
the specified time and intersects the specified validity interval
with the interval of the environment range parameter. |
|
virtual void | SetEnvDisplay (BOOL b, int notify=TRUE)=0 |
Sets the environment range display flag.
|
|
virtual BOOL | GetEnvDisplay (void)=0 |
Retrieves the environment range display
setting. |
|
virtual void | RenderApertureChanged (TimeValue t)=0 |
This method is called on all cameras when
the render aperture width has changed. |
|
virtual void | UpdateTargDistance (TimeValue t, INode *inode) |
This method is called on all target cameras
when the target distance has changed. |
|
virtual void | SetMultiPassEffectEnabled (TimeValue t, BOOL enabled) |
Enables or disables the multi-pass effect.
|
|
virtual BOOL | GetMultiPassEffectEnabled (TimeValue t, Interval &valid) |
Returns the enabled or disabled state of the
multi-pass effect setting for the camera. |
|
virtual void | SetMPEffect_REffectPerPass (BOOL enabled) |
virtual BOOL | GetMPEffect_REffectPerPass () |
virtual void | SetIMultiPassCameraEffect (IMultiPassCameraEffect *pIMultiPassCameraEffect) |
The
IMultiPassCameraEffect should be checked to see if compatible
with the camera before being assigned. |
|
virtual IMultiPassCameraEffect * | GetIMultiPassCameraEffect () |
Returns a pointer to the current multi-pass
camera effect. |
SClass_ID SuperClassID | ( | ) | [inline, virtual] |
Retrieves a constant representing the type of the plugin.
Reimplemented from ReferenceTarget.
{ return CAMERA_CLASS_ID; }
int IsRenderable | ( | ) | [inline, virtual] |
Indicates whether the object may be rendered.
Some objects such as construction grids and helpers should not be rendered and can return zero.
Implements Object.
{ return(0);}
virtual void InitNodeName | ( | MSTR & | s | ) | [inline, virtual] |
This is the default name of the node when it is created.
s | The default name of the node is stored here. |
Implements Object.
Reimplemented in MSPluginObject< GenCamera >, and MSObjectXtnd< GenCamera, MSPluginCamera >.
{ s = _M("Camera"); }
virtual int UsesWireColor | ( | ) | [inline, virtual] |
This method determines if the object color is used for display.
Reimplemented from Object.
Reimplemented in MSPluginCamera, and MSCameraXtnd.
{ return FALSE; } // TRUE if the object color is used for display
virtual RefResult EvalCameraState | ( | TimeValue | time, |
Interval & | valid, | ||
CameraState * | cs | ||
) | [pure virtual] |
This method is called to update the CameraState and validity interval at the specified time.
time | Specifies the time to evaluate the camera. |
valid | The plug-in computes the validity interval of the camera at the specified time and stores the result here. |
cs | The camera state to update. See Structure CameraState. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void SetOrtho | ( | BOOL | b | ) | [pure virtual] |
Sets whether the camera is on ortho mode or not.
b | Pass TRUE for ortho and FALSE for not ortho. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual BOOL IsOrtho | ( | ) | [pure virtual] |
Returns TRUE if the camera is in ortho mode and FALSE if it is not.
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void SetFOV | ( | TimeValue | t, |
float | f | ||
) | [pure virtual] |
Sets the field-of-view of the camera at the specified time.
t | The time at which to set the field-of-view. |
f | The value to set in radians. |
Implemented in MSPluginCamera, and MSCameraXtnd.
Returns the field-of-view setting of the camera at the specified time and adjusts the validity interval of the camera at this time to reflect the field-of-view parameter.
t | The time to retrieve the field-of-view setting. |
valid | The validity interval to set. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void SetTDist | ( | TimeValue | t, |
float | f | ||
) | [pure virtual] |
Sets the target distance setting (for free cameras) at the specified time.
t | The time at which to set the target distance. |
f | The value to set. |
Implemented in MSPluginCamera, and MSCameraXtnd.
Returns the target distance setting of the camera at the specified time and adjusts the validity interval of the camera to reflect the target distance parameter.
t | The time to retrieve the target distance setting. |
valid | This validity interval is intersected with the validity interval of the target distance parameter. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual int GetManualClip | ( | ) | [pure virtual] |
Returns the manual clip flag.
This indicates the camera will perform clipping at its hither and yon distances.
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void SetManualClip | ( | int | onOff | ) | [pure virtual] |
Sets the manual clip flag.
This indicates the camera will perform clipping at its hither and yon distances.
onOff | The state of the manual clipping flag to set. Nonzero indicates clipping will be performed. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual float GetClipDist | ( | TimeValue | t, |
int | which, | ||
Interval & | valid = Interval(0, 0) |
||
) | [pure virtual] |
Retrieves the clipping distance of the specified plane at the specified time and modifies the validity interval to reflect the setting of the clipping distance parameter.
t | The time to retrieve the clipping distance. |
which | Indicates which distance to return. One of the values in Clipping Distances |
valid | The validity interval that this method will update to reflect the clipping distance interval. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void SetClipDist | ( | TimeValue | t, |
int | which, | ||
float | val | ||
) | [pure virtual] |
Sets the clipping distance of the specified plane at the specified time.
t | The time to set the clipping distance. |
which | Indicates which distance to set. One of the values in Clipping Distances |
val | The distance to set. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void SetEnvRange | ( | TimeValue | time, |
int | which, | ||
float | f | ||
) | [pure virtual] |
Sets the environment range distance at the specified time.
time | The time to set the environment range. |
which | Indicates which distance to set. One of the values in Environment Range Distances |
f | The distance to set. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual float GetEnvRange | ( | TimeValue | t, |
int | which, | ||
Interval & | valid = Interval(0, 0) |
||
) | [pure virtual] |
Retrieves the environment range distance at the specified time and intersects the specified validity interval with the interval of the environment range parameter.
t | The time to retrieve the environment range. |
which | Indicate which distance to set. One of the values in Environment Range Distances |
valid | The validity interval that this method will update to reflect the environment range setting. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void SetEnvDisplay | ( | BOOL | b, |
int | notify =
TRUE |
||
) | [pure virtual] |
Sets the environment range display flag.
This indicates if the camera will display its range settings.
b | The flag state to set. |
notify | If notify is TRUE, dependents of this message are sent the REFMSG_CHANGE message using NotifyDependents(FOREVER, PART_OBJ, REFMSG_CHANGE); Otherwise no notification is sent. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual BOOL GetEnvDisplay | ( | void | ) | [pure virtual] |
Retrieves the environment range display setting.
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void RenderApertureChanged | ( | TimeValue | t | ) | [pure virtual] |
This method is called on all cameras when the render aperture width has changed.
t | The time of the change. |
Implemented in MSPluginCamera, and MSCameraXtnd.
virtual void UpdateTargDistance | ( | TimeValue | t, |
INode * | inode | ||
) | [inline, virtual] |
This method is called on all target cameras when the target distance has changed.
For instance, a distance shown in the user interface may be updated in this method.
t | The time of the change. |
inode | The camera node. |
Reimplemented in MSPluginCamera, and MSCameraXtnd.
{ }
virtual void SetMultiPassEffectEnabled | ( | TimeValue | t, |
BOOL | enabled | ||
) | [inline, virtual] |
Enables or disables the multi-pass effect.
t | The time at which to enable the effect. |
enabled | TRUE for enabled; FALSE for disabled. |
Reimplemented in MSCameraXtnd.
{ }
virtual BOOL GetMultiPassEffectEnabled | ( | TimeValue | t, |
Interval & | valid | ||
) | [inline, virtual] |
Returns the enabled or disabled state of the multi-pass effect setting for the camera.
t | The time at which to get the setting. |
valid | The validity interfal for the setting. |
Reimplemented in MSCameraXtnd.
{ return FALSE; }
virtual void SetMPEffect_REffectPerPass | ( | BOOL | enabled | ) | [inline, virtual] |
virtual BOOL GetMPEffect_REffectPerPass | ( | ) | [inline, virtual] |
virtual void SetIMultiPassCameraEffect | ( | IMultiPassCameraEffect * | pIMultiPassCameraEffect | ) | [inline, virtual] |
The IMultiPassCameraEffect should be checked to see if compatible with the camera before being assigned.
pIMultiPassCameraEffect | The IMultiPassCameraEffect to assign. |
Reimplemented in MSCameraXtnd.
{ }
virtual IMultiPassCameraEffect* GetIMultiPassCameraEffect | ( | ) | [inline, virtual] |
Returns a pointer to the current multi-pass camera effect.
See Class IMultiPassCameraEffect.
Reimplemented in MSCameraXtnd.
{ return NULL; }