#include <mxsPlugin.h>
Public Member Functions |
|
MSGeomObjectXtnd (MSPluginClass *pc, BOOL loading) | |
~MSGeomObjectXtnd () | |
RefTargetHandle | Clone (RemapDir &remap) |
This method is used by 3ds Max to clone an
object. |
|
int | IsRenderable () |
Indicates whether the object may be
rendered. |
|
Mesh * | GetRenderMesh (TimeValue t, INode *inode, View &view, BOOL &needDelete) |
This method should be implemented by all
renderable GeomObjects. |
MSGeomObjectXtnd | ( | MSPluginClass * | pc, |
BOOL | loading | ||
) |
~MSGeomObjectXtnd | ( | ) | [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 MSPluginGeomObject.
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.
Reimplemented from MSPluginGeomObject.
{ return delegate->IsRenderable(); }
Mesh* GetRenderMesh | ( | TimeValue | t, |
INode * | inode, | ||
View & | view, | ||
BOOL & | needDelete | ||
) | [inline, virtual] |
This method should be implemented by all renderable GeomObjects.
It provides a mesh representation of the object for use by the renderer. Primitives that already have a mesh cached can just return a pointer to it (and set needDelete to FALSE). Implementations of this method which take a long time should periodically call View::CheckForRenderAbort() to see if the user has canceled the render. If canceled, the function can either return NULL, or return a non null pointer with the appropriate value for needDelete. (If needDelete is TRUE a non-null mesh will be deleted.)
t | The time to get the mesh. |
inode | The node in the scene. |
view | If the renderer calls this method it will pass the view information here. See Class View. |
needDelete | Set to TRUE if the renderer should delete the mesh, FALSE otherwise. |
Reimplemented from MSPluginGeomObject.
{ return delegate->GetRenderMesh(t, inode, view, needDelete); }