#include <gizmoimp.h>
Public Member Functions |
|
CoreExport | BoxGizmoObject () |
CoreExport | ~BoxGizmoObject () |
CoreExport CreateMouseCallBack * | GetCreateMouseCallBack () |
This method allows the system to retrieve a
callback object used in creating an object in the 3D viewports.
|
|
CoreExport void | BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev) |
CoreExport void | EndEditParams (IObjParam *ip, ULONG flags, Animatable *next) |
CoreExport MCHAR * | GetObjectName () |
CoreExport void | InitNodeName (MSTR &s) |
Implemented by the System. |
|
CoreExport void | GetClassName (MSTR &s) |
Retrieves the name of the plugin class.
|
|
CoreExport void | DeleteThis () |
Deletes an instance of this class. |
|
Class_ID | ClassID () |
Retrieves a constant that uniquely
identifies the plugin class. |
|
CoreExport RefTargetHandle | Clone (RemapDir &remap) |
This method is used by 3ds Max to clone an
object. |
|
Interval | ObjectValidity (TimeValue t) |
CoreExport void | InvalidateUI () |
CoreExport ParamDimension * | GetParameterDim (int pbIndex) |
CoreExport MSTR | GetParameterName (int pbIndex) |
CoreExport void | DrawGizmo (TimeValue t, GraphicsWindow *gw) |
CoreExport void | GetBoundBox (Matrix3 &mat, TimeValue t, Box3 &box) |
CoreExport BoxGizmoObject | ( | ) |
CoreExport ~BoxGizmoObject | ( | ) |
CoreExport CreateMouseCallBack* GetCreateMouseCallBack | ( | ) | [virtual] |
This method allows the system to retrieve a callback object used in creating an object in the 3D viewports.
This method returns a pointer to an instance of a class derived from CreateMouseCallBack. This class has a method proc() which is where the programmer defines the user/mouse interaction during the object creation phase.
Implements BaseObject.
CoreExport void BeginEditParams | ( | IObjParam * | ip, |
ULONG | flags, | ||
Animatable * | prev | ||
) | [virtual] |
ip | Interface pointer. The developer can use it to call methods such as AddRollupPage(). Note that this pointer is only valid between BeginEditParams() and EndEditParams(). It should not be used outside this interval. |
flags | Describe which branch of the command panel or dialog the item
is being edited in. The following are possible values: BEGIN_EDIT_CREATE Indicates an item is being edited in the create branch. BEGIN_EDIT_MOTION Indicates a controller is being edited in the motion branch. BEGIN_EDIT_HIERARCHY Indicates a controller is being edited in the Pivot subtask of the hierarchy branch. BEGIN_EDIT_IK Indicates a controller is being edited in the IK subtask of the hierarchy branch. BEGIN_EDIT_LINKINFO Indicates a controller is being edited in the Link Info subtask of the hierarchy branch. |
prev | Pointer to an Animatable object. This parameter may be used in the motion and hierarchy branches of the command panel. This pointer allows a plug-in to look at the ClassID of the previous item that was being edited, and if it is the same as this item, to not replace the entire UI in the command panel, but simply update the values displayed in the UI fields. This prevents the UI from 'flickering' when the current item begins its edit. For example, if you are in the motion branch and are looking at an item's PRS controller values, and then select another item that is displayed with a PRS controller, the UI will not change - only the values displayed in the fields will change. If however you selected a target camera that has a lookat controller (not a PRS controller) the UI will change because a different set of parameters need to be displayed. Note that for items that are edited in the modifier branch this field can be ignored. |
Reimplemented from GizmoObject.
CoreExport void EndEditParams | ( | IObjParam * | ip, |
ULONG | flags, | ||
Animatable * | next | ||
) | [virtual] |
ip | An interface pointer. The developer may use the interface
pointer to call methods such as DeleteRollupPage(). |
flags | The following flag may be set: END_EDIT_REMOVEUI If TRUE, the item's user interface should be removed. |
next | Animatable pointer. Can be used in the motion and hierarchy branches of the command panel. It allows a plug-in to look at the ClassID of the next item that was being edited, and if it is the same as this item, to not replace the entire UI in the command panel. Note that for items that are edited in the modifier branch this field can be ignored. |
Reimplemented from GizmoObject.
CoreExport MCHAR* GetObjectName | ( | ) | [virtual] |
Reimplemented from BaseObject.
CoreExport void InitNodeName | ( | MSTR & | s | ) | [virtual] |
CoreExport void GetClassName | ( | MSTR & | s | ) | [virtual] |
Retrieves the name of the plugin class.
This name is usually used internally for debugging purposes. For Material plug-ins this method is used to put up the material "type" name in the Material Editor.
s | Reference to a string filled in with the name of the plugin class |
Reimplemented from ReferenceTarget.
CoreExport void DeleteThis | ( | ) | [virtual] |
Deletes an instance of this class.
3ds Max calls this method when it needs to delete a plugin object (an instance of a class derived from Animatable). Similarly, plugins that need to delete instances of an Animatable or a class directly derived from it via an Animatable pointer, should call this method instead of calling directly operator delete. Following these rules will ensure that the same memory manager is used to allocate and deallocate the object. The default implementation of this method deletes the object. Plugin instances that never need to be deleted from the heap can overwrite this method to do nothing.
Reimplemented from Animatable.
Class_ID ClassID | ( | ) | [inline, virtual] |
Retrieves a constant that uniquely identifies the plugin class.
This method must return the unique ID for the plugin class. If two ClassIDs conflict, the system will only load the first conflicting one it finds. A program (gencid.exe) is provided to generate unique class id values.
Reimplemented from Animatable.
{return BOXGIZMO_CLASSID;}
CoreExport 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.
Interval ObjectValidity | ( | TimeValue | t | ) | [virtual] |
Reimplemented from GizmoObject.
CoreExport void InvalidateUI | ( | ) | [virtual] |
void SphereGizmoObject::InvalidateUI() { if (pmapParam) pmapParam->Invalidate(); }
Reimplemented from GizmoObject.
CoreExport ParamDimension* GetParameterDim | ( | int | pbIndex | ) | [virtual] |
ParamDimension *SphereGizmoObject::GetParameterDim(int pbIndex) { switch (pbIndex) { case PB_GIZMO_RADIUS: return stdWorldDim; default: return defaultDim; } }
Reimplemented from GizmoObject.
CoreExport MSTR GetParameterName | ( | int | pbIndex | ) | [virtual] |
Reimplemented from GizmoObject.
CoreExport void DrawGizmo | ( | TimeValue | t, |
GraphicsWindow * | gw | ||
) | [virtual] |
Reimplemented from GizmoObject.
void SphereGizmoObject::GetBoundBox(Matrix3 &mat, TimeValue t, Box3 &box) { float radius; int hemi; pblock->GetValue(PB_GIZMO_RADIUS,t,radius,FOREVER); pblock->GetValue(PB_GIZMO_HEMI,t,hemi,FOREVER); BoxLineProc proc(&mat); DrawSphere(proc,radius,hemi); box += proc.Box(); }
Reimplemented from GizmoObject.