#include <mxsPlugin.h>
Public Member Functions |
|
MSPluginHelper () | |
MSPluginHelper (MSPluginClass *pc, BOOL loading) | |
~MSPluginHelper () | |
RefTargetHandle | Clone (RemapDir &remap) |
This method is used by 3ds Max to clone an
object. |
|
int | UsesWireColor () |
Implemented by the System. |
|
BOOL | NormalAlignVector (TimeValue t, Point3 &pt, Point3 &norm) |
Objects that don't support the
IntersectRay() method (such as helper objects) can implement
this method to provide a default vector for use with the normal
align command in 3ds Max. |
|
Static Public Member Functions |
|
static RefTargetHandle | create (MSPluginClass *pc, BOOL loading) |
MSPluginHelper | ( | ) | [inline] |
{ }
MSPluginHelper | ( | MSPluginClass * | pc, |
BOOL | loading | ||
) |
~MSPluginHelper | ( | ) | [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 MSHelperXtnd.
int UsesWireColor | ( | ) | [inline, virtual] |
Implemented by the System.
Returns TRUE to indicate the object color is used for display.
Reimplemented from HelperObject.
Reimplemented in MSHelperXtnd.
{ return HelperObject::UsesWireColor(); } // TRUE if the object color is used for display
Objects that don't support the IntersectRay() method (such as helper objects) can implement this method to provide a default vector for use with the normal align command in 3ds Max.
t | The time to compute the normal align vector. |
pt | The point of intersection. |
norm | The normal at the point of intersection. |
Reimplemented from HelperObject.
Reimplemented in MSHelperXtnd.
{ return HelperObject::NormalAlignVector(t, pt, norm); }