#include <mxsPlugin.h>
Public Member Functions |
|
MSCameraXtnd (MSPluginClass *pc, BOOL loading) | |
~MSCameraXtnd () | |
RefTargetHandle | Clone (RemapDir &remap) |
This method is used by 3ds Max to clone an
object. |
|
int | Display (TimeValue t, INode *inode, ViewExp *vpt, int flags) |
This is called by the system to have the
item display itself (perform a quick render in viewport, using the
current TM). |
|
void | GetWorldBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &abox) |
This method returns the world space bounding
box for Objects (see below for the Sub-object gizmo or Modifiers
gizmo version). |
|
void | GetLocalBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &abox) |
This is the object space bounding box, the
box in the object's local coordinates. |
|
void | GetDeformBBox (TimeValue t, Box3 &abox, Matrix3 *tm, BOOL useSel) |
This method computes the bounding box in the
objects local coordinates or the optional space defined by tm.
|
|
int | HitTest (TimeValue t, INode *inode, int type, int crossing, int flags, IPoint2 *p, ViewExp *vpt) |
This method is called to determine if the
specified screen point intersects the item. |
|
void | Snap (TimeValue t, INode *inode, SnapInfo *snap, IPoint2 *p, ViewExp *vpt) |
Checks the point passed for a snap and
updates the SnapInfo
structure. |
|
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. |
|
void | SetMultiPassEffectEnabled (TimeValue t, BOOL enabled) |
Enables or disables the multi-pass effect.
|
|
BOOL | GetMultiPassEffectEnabled (TimeValue t, Interval &valid) |
Returns the enabled or disabled state of the
multi-pass effect setting for the camera. |
|
void | SetMPEffect_REffectPerPass (BOOL enabled) |
BOOL | GetMPEffect_REffectPerPass () |
void | SetIMultiPassCameraEffect (IMultiPassCameraEffect *pIMultiPassCameraEffect) |
The
IMultiPassCameraEffect should be checked to see if compatible
with the camera before being assigned. |
|
IMultiPassCameraEffect * | GetIMultiPassCameraEffect () |
Returns a pointer to the current multi-pass
camera effect. |
|
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)) |
MSCameraXtnd | ( | MSPluginClass * | pc, |
BOOL | loading | ||
) |
~MSCameraXtnd | ( | ) | [inline] |
{ DeleteAllRefsFromMe(); }
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 MSPluginCamera.
This is called by the system to have the item display itself (perform a quick render in viewport, using the current TM).
Note: For this method to be called the object's validity interval must be invalid at the specified time t. If the interval is valid, the system may not call this method since it thinks the display is already valid.
t | The time to display the object. |
inode | The node to display. |
vpt | An interface pointer that may be used to call methods associated with the viewports. |
flags | See Display Flags. |
Reimplemented from MSObjectXtnd< GenCamera, MSPluginCamera >.
This method returns the world space bounding box for Objects (see below for the Sub-object gizmo or Modifiers gizmo version).
The bounding box returned by this method does not need to be precise. It should however be calculated rapidly. The object can handle this by transforming the 8 points of its local bounding box into world space and take the minimums and maximums of the result. Although this isn't necessarily the tightest bounding box of the objects points in world space, it is close enough.
t | The time to compute the bounding box. |
inode | The node to calculate the bounding box for. |
vp | An interface pointer that can be used to call methods associated with the viewports. |
box | Contains the returned bounding box. |
Reimplemented from MSObjectXtnd< GenCamera, MSPluginCamera >.
This is the object space bounding box, the box in the object's local coordinates.
The system expects that requesting the object space bounding box will be fast.
t | The time to retrieve the bounding box. |
inode | The node to calculate the bounding box for. |
vp | An interface pointer that may be used to call methods associated with the viewports. |
box | Contains the returned bounding box. |
Reimplemented from MSObjectXtnd< GenCamera, MSPluginCamera >.
This method computes the bounding box in the objects local coordinates or the optional space defined by tm.
Note: If you are looking for a precise bounding box, use this method and pass in the node's object TM (INode::GetObjectTM()) as the matrix.
t | The time to compute the box. |
box | A reference to a box the result is stored in. |
tm | This is an alternate coordinate system used to compute the box. If the tm is not NULL this matrix should be used in the computation of the result. |
useSel | If TRUE, the bounding box of selected sub-elements should be computed; otherwise the entire object should be used. |
Reimplemented from MSObjectXtnd< GenCamera, MSPluginCamera >.
int HitTest | ( | TimeValue | t, |
INode * | inode, | ||
int | type, | ||
int | crossing, | ||
int | flags, | ||
IPoint2 * | p, | ||
ViewExp * | vpt | ||
) | [virtual] |
This method is called to determine if the specified screen point intersects the item.
The method returns nonzero if the item was hit; otherwise 0.
t | The time to perform the hit test. |
inode | A pointer to the node to test. |
type | The type of hit testing to perform. See Scene and Node Hit Test Types. for details. |
crossing | The state of the crossing setting. If TRUE crossing selection is on. |
flags | The hit test flags. See Scene and Node Hit Testing Flags for details. |
p | The screen point to test. |
vpt | An interface pointer that may be used to call methods associated with the viewports. |
Reimplemented from MSObjectXtnd< GenCamera, MSPluginCamera >.
Checks the point passed for a snap and updates the SnapInfo structure.
t | The time to check. |
inode | The node to check. |
snap | The snap info structure to update. |
p | The screen point to check. |
vpt | An interface pointer that may be used to call methods associated with the viewports. |
Reimplemented from MSObjectXtnd< GenCamera, MSPluginCamera >.
RefResult EvalCameraState | ( | TimeValue | time, |
Interval & | valid, | ||
CameraState * | cs | ||
) | [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. |
Reimplemented from MSPluginCamera.
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. |
Reimplemented from MSPluginCamera.
BOOL IsOrtho | ( | ) | [inline, virtual] |
Returns TRUE if the camera is in ortho mode and FALSE if it is not.
Reimplemented from MSPluginCamera.
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. |
Reimplemented from MSPluginCamera.
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. |
Reimplemented from MSPluginCamera.
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. |
Reimplemented from MSPluginCamera.
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. |
Reimplemented from MSPluginCamera.
int GetManualClip | ( | ) | [inline, virtual] |
Returns the manual clip flag.
This indicates the camera will perform clipping at its hither and yon distances.
Reimplemented from MSPluginCamera.
{ return delegate->GetManualClip(); }
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. |
Reimplemented from MSPluginCamera.
{ delegate->SetManualClip(onOff); }
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. |
Reimplemented from MSPluginCamera.
{ return delegate->GetClipDist(t, which, valid); }
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. |
Reimplemented from MSPluginCamera.
{ delegate->SetClipDist(t, which, val); }
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. |
Reimplemented from MSPluginCamera.
{ delegate->SetEnvRange(time, which, f); }
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. |
Reimplemented from MSPluginCamera.
{ return delegate->GetEnvRange(t, which, valid); }
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. |
Reimplemented from MSPluginCamera.
{ delegate->SetEnvDisplay(b, notify); }
BOOL GetEnvDisplay | ( | void | ) | [inline, virtual] |
Retrieves the environment range display setting.
Reimplemented from MSPluginCamera.
{ return delegate->GetEnvDisplay(); }
void RenderApertureChanged | ( | TimeValue | t | ) | [virtual] |
This method is called on all cameras when the render aperture width has changed.
t | The time of the change. |
Reimplemented from MSPluginCamera.
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 MSPluginCamera.
{ delegate->UpdateTargDistance(t, inode); }
int UsesWireColor | ( | ) | [virtual] |
This method determines if the object color is used for display.
Reimplemented from MSPluginCamera.
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 from CameraObject.
{ delegate->SetMultiPassEffectEnabled(t, enabled); }
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 from CameraObject.
{ return delegate->GetMultiPassEffectEnabled(t, valid); }
void SetMPEffect_REffectPerPass | ( | BOOL | enabled | ) | [inline, virtual] |
Reimplemented from CameraObject.
BOOL GetMPEffect_REffectPerPass | ( | ) | [inline, virtual] |
Reimplemented from CameraObject.
{ return delegate->GetMPEffect_REffectPerPass(); }
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 from CameraObject.
{ delegate->SetIMultiPassCameraEffect(pIMultiPassCameraEffect); }
IMultiPassCameraEffect* GetIMultiPassCameraEffect | ( | ) | [inline, virtual] |
Returns a pointer to the current multi-pass camera effect.
See Class IMultiPassCameraEffect.
Reimplemented from CameraObject.
{ return delegate->GetIMultiPassCameraEffect(); }
GenCamera* NewCamera | ( | int | type | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
void SetConeState | ( | int | s | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ delegate->SetConeState(s); }
int GetConeState | ( | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ return delegate->GetConeState(); }
void SetHorzLineState | ( | int | s | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ delegate->SetHorzLineState(s); }
int GetHorzLineState | ( | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ return delegate->GetHorzLineState(); }
void Enable | ( | int | enab | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
BOOL SetFOVControl | ( | Control * | c | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ return delegate->SetFOVControl(c); }
void SetFOVType | ( | int | ft | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ delegate->SetFOVType(ft); }
int GetFOVType | ( | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ return delegate->GetFOVType(); }
Control* GetFOVControl | ( | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ return delegate->GetFOVControl(); }
int Type | ( | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
void SetType | ( | int | tp | ) | [inline, virtual] |
Reimplemented from MSPluginCamera.
void SetDOFEnable | ( | TimeValue | t, |
BOOL | onOff | ||
) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ return delegate->GetDOFEnable(t, valid); }
void SetDOFFStop | ( | TimeValue | t, |
float | fs | ||
) | [inline, virtual] |
Reimplemented from MSPluginCamera.
{ return delegate->GetDOFFStop(t, valid); }