#include <mxsPlugin.h>
Public Member Functions |
|
MSPluginCamera () | |
MSPluginCamera (MSPluginClass *pc, BOOL loading) | |
~MSPluginCamera () | |
RefTargetHandle | Clone (RemapDir &remap) |
This method is used by 3ds Max to clone an
object. |
|
RefResult | EvalCameraState (TimeValue time, Interval &valid, CameraState *cs) |
This method is called to update the
CameraState and validity interval at the specified time.
|
|
void | SetOrtho (BOOL b) |
Sets whether the camera is on ortho mode or
not. |
|
BOOL | IsOrtho () |
Returns TRUE if the camera is in ortho mode
and FALSE if it is not. |
|
void | SetFOV (TimeValue time, float f) |
Sets the field-of-view of the camera at the
specified time. |
|
float | GetFOV (TimeValue t, Interval &valid=Interval(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.
|
|
void | SetTDist (TimeValue time, float f) |
Sets the target distance setting (for free
cameras) at the specified time. |
|
float | GetTDist (TimeValue t, Interval &valid=Interval(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. |
|
int | GetManualClip () |
Returns the manual clip flag. |
|
void | SetManualClip (int onOff) |
Sets the manual clip flag. |
|
float | GetClipDist (TimeValue t, int which, Interval &valid=Interval(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.
|
|
void | SetClipDist (TimeValue t, int which, float val) |
Sets the clipping distance of the specified
plane at the specified time. |
|
void | SetEnvRange (TimeValue time, int which, float f) |
Sets the environment range distance at the
specified time. |
|
float | GetEnvRange (TimeValue t, int which, Interval &valid=Interval(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. |
|
void | SetEnvDisplay (BOOL b, int notify=TRUE) |
Sets the environment range display flag.
|
|
BOOL | GetEnvDisplay (void) |
Retrieves the environment range display
setting. |
|
void | RenderApertureChanged (TimeValue t) |
This method is called on all cameras when
the render aperture width has changed. |
|
void | UpdateTargDistance (TimeValue t, INode *inode) |
This method is called on all target cameras
when the target distance has changed. |
|
int | UsesWireColor () |
This method determines if the object color
is used for display. |
|
GenCamera * | NewCamera (int type) |
void | SetConeState (int s) |
int | GetConeState () |
void | SetHorzLineState (int s) |
int | GetHorzLineState () |
void | Enable (int enab) |
BOOL | SetFOVControl (Control *c) |
void | SetFOVType (int ft) |
int | GetFOVType () |
Control * | GetFOVControl () |
int | Type () |
void | SetType (int tp) |
void | SetDOFEnable (TimeValue t, BOOL onOff) |
BOOL | GetDOFEnable (TimeValue t, Interval &valid=Interval(0, 0)) |
void | SetDOFFStop (TimeValue t, float fs) |
float | GetDOFFStop (TimeValue t, Interval &valid=Interval(0, 0)) |
Static Public Member Functions |
|
static RefTargetHandle | create (MSPluginClass *pc, BOOL loading) |
MSPluginCamera | ( | ) | [inline] |
{ }
MSPluginCamera | ( | MSPluginClass * | pc, |
BOOL | loading | ||
) |
~MSPluginCamera | ( | ) | [inline] |
{ DeleteAllRefsFromMe(); }
static RefTargetHandle create | ( | MSPluginClass * | pc, |
BOOL | loading | ||
) | [static] |
RefTargetHandle Clone | ( | RemapDir & | remap | ) | [virtual] |
This method is used by 3ds Max to clone an object.
class MyDerivedPlugin : public MyBasePlugin { const int MY_REFERENCE = 1; ReferenceTarget* Clone(RemapDir& remap) { ReferenceTarget* result = new MyDerivedPlugin(); BaseClone(this, result, remap); return result; } void BaseClone(ReferenceTarget* from, ReferenceTarget* to, RemapDir& remap) { if (!to || !from || from == to) return; MyBasePlugin::BaseClone(from, to, remap); to->ReplaceReference(MY_REFERENCE, remap->CloneRef(from->GetReference(MY_REFERENCE))); } };
This method should not be directly called by plug-ins. Instead, either RemapDir::CloneRef() or CloneRefHierachy() should be used to perform cloning. These methods ensure that the mapping from the original object to the clone is added to the RemapDir used for cloning, which may be used during backpatch operations
remap | - A RemapDir instance used for remapping references during a Clone. |
Reimplemented from ReferenceTarget.
Reimplemented in MSCameraXtnd.
RefResult EvalCameraState | ( | TimeValue | time, |
Interval & | valid, | ||
CameraState * | cs | ||
) | [inline, 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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ return REF_SUCCEED; }
void SetOrtho | ( | BOOL | b | ) | [inline, virtual] |
Sets whether the camera is on ortho mode or not.
b | Pass TRUE for ortho and FALSE for not ortho. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ }
BOOL IsOrtho | ( | ) | [inline, virtual] |
Returns TRUE if the camera is in ortho mode and FALSE if it is not.
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ return FALSE; }
void SetFOV | ( | TimeValue | t, |
float | f | ||
) | [inline, 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. |
Implements CameraObject.
Reimplemented in 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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ return 0.0f; }
void SetTDist | ( | TimeValue | t, |
float | f | ||
) | [inline, 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. |
Implements CameraObject.
Reimplemented in 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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ return 0.0f; }
int GetManualClip | ( | ) | [inline, virtual] |
Returns the manual clip flag.
This indicates the camera will perform clipping at its hither and yon distances.
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{return 0;}
void SetManualClip | ( | int | onOff | ) | [inline, 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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ }
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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ return 0.0f; }
void SetClipDist | ( | TimeValue | t, |
int | which, | ||
float | val | ||
) | [inline, 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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ }
void SetEnvRange | ( | TimeValue | time, |
int | which, | ||
float | f | ||
) | [inline, 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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ }
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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ return 0.0f; }
void SetEnvDisplay | ( | BOOL | b, |
int | notify =
TRUE |
||
) | [inline, 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. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ }
BOOL GetEnvDisplay | ( | void | ) | [inline, virtual] |
Retrieves the environment range display setting.
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ return FALSE; }
void RenderApertureChanged | ( | TimeValue | t | ) | [inline, virtual] |
This method is called on all cameras when the render aperture width has changed.
t | The time of the change. |
Implements CameraObject.
Reimplemented in MSCameraXtnd.
{ }
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 from CameraObject.
Reimplemented in MSCameraXtnd.
{ }
int UsesWireColor | ( | ) | [inline, virtual] |
This method determines if the object color is used for display.
Reimplemented from CameraObject.
Reimplemented in MSCameraXtnd.
{ return CameraObject::UsesWireColor(); } // TRUE if the object color is used for display
GenCamera* NewCamera | ( | int | type | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ return NULL; }
void SetConeState | ( | int | s | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ }
int GetConeState | ( | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ return 0; }
void SetHorzLineState | ( | int | s | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ }
int GetHorzLineState | ( | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ return 0; }
void Enable | ( | int | enab | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ }
BOOL SetFOVControl | ( | Control * | c | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ return FALSE; }
void SetFOVType | ( | int | ft | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ }
int GetFOVType | ( | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ return 0; }
Control* GetFOVControl | ( | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ return NULL; }
int Type | ( | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ return 0; }
void SetType | ( | int | tp | ) | [inline, virtual] |
Implements GenCamera.
Reimplemented in MSCameraXtnd.
{ }
void SetDOFEnable | ( | TimeValue | t, |
BOOL | onOff | ||
) | [inline, virtual] |
void SetDOFFStop | ( | TimeValue | t, |
float | fs | ||
) | [inline, virtual] |