#include <manipulator.h>
Public Member Functions |
|
ManipExport | SimpleManipulator () |
ManipExport | SimpleManipulator (INode *pNode) |
ManipExport | ~SimpleManipulator () |
ManipExport int | NumRefs () |
Returns the total number of references this
ReferenceMaker can hold. |
|
ManipExport RefTargetHandle | GetReference (int i) |
Returns the 'i-th' reference. |
|
ManipExport RefResult | NotifyRefChanged (Interval changeInt, RefTargetHandle hTarget, PartID &partID, RefMessage message) |
Receives and responds to messages. |
|
ManipExport ObjectState | Eval (TimeValue time) |
This method is called to evaluate the object
and return the result as an
ObjectState. |
|
void | InitNodeName (MSTR &s) |
Implemented by the System. |
|
ManipExport Interval | ObjectValidity (TimeValue t) |
This method returns the validity interval of
the object as a whole at the specified time. |
|
ManipExport void | GetWorldBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box) |
This method returns the world space bounding
box for Objects (see below for the Sub-object gizmo or Modifiers
gizmo version). |
|
ManipExport void | GetLocalBoundBox (TimeValue t, INode *inode, ViewExp *vpt, Box3 &box) |
ManipExport void | GetDeformBBox (TimeValue t, Box3 &box, Matrix3 *tm, BOOL useSel) |
This method computes the bounding box in the
objects local coordinates or the optional space defined by tm.
|
|
ManipExport void | BeginEditParams (IObjParam *ip, ULONG flags, Animatable *prev) |
ManipExport void | EndEditParams (IObjParam *ip, ULONG flags, Animatable *next) |
ManipExport void | GetClassName (MSTR &s) |
Retrieves the name of the plugin class.
|
|
ManipExport int | NumSubs () |
ManipExport Animatable * | SubAnim (int i) |
ManipExport MSTR | SubAnimName (int i) |
ManipExport BaseInterface * | GetInterface (Interface_ID id) |
ManipExport int | HitTest (TimeValue t, INode *pNode, int type, int crossing, int flags, IPoint2 *pScreenPoint, ViewExp *pVpt) |
ManipExport int | Display (TimeValue t, INode *pNode, ViewExp *pVpt, int flags) |
ManipExport void | ClearPolyShapes () |
ManipExport void | AppendPolyShape (PolyShape *pPolyShape, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan()->GetColorAsPoint3(kManipulatorsSelected)) |
ManipExport void | AppendGizmo (GizmoShape *pGizmoShape, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan()->GetColorAsPoint3(kManipulatorsSelected)) |
ManipExport void | AppendMesh (Mesh *pMesh, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan()->GetColorAsPoint3(kManipulatorsSelected)) |
ManipExport void | AppendMarker (MarkerType markerType, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan()->GetColorAsPoint3(kManipulatorsSelected)) |
ManipExport void | AppendText (MCHAR *pText, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan()->GetColorAsPoint3(kManipulatorsSelected)) |
ManipExport MSTR & | GetManipName () |
ManipExport void | SetGizmoScale (float gizmoScale) |
ManipExport MSTR & | GetToolTip () |
ManipExport void | SetToolTipWnd (HWND hWnd) |
ManipExport void | SetToolTipTimer (UINT timer) |
ManipExport UINT | GetToolTipTimer () |
ManipExport HWND | GetToolTipWnd () |
ManipExport IParamBlock2 * | GetPBlock () |
virtual void | UpdateShapes (TimeValue t, MSTR &toolTip)=0 |
virtual ManipExport void | ManipulatorSelected () |
ManipExport void | SetManipTarget (RefTargetHandle hTarg) |
ManipExport RefTargetHandle | GetManipTarget () |
ManipExport void | SetMouseState (MouseState state) |
ManipExport MouseState | GetMouseState () |
ManipExport void | OnButtonDown (TimeValue t, ViewExp *pVpt, IPoint2 &m, DWORD flags, ManipHitData *pHitData) |
ManipExport void | OnMouseMove (TimeValue t, ViewExp *pVpt, IPoint2 &m, DWORD flags, ManipHitData *pHitData) |
ManipExport void | OnButtonUp (TimeValue t, ViewExp *pVpt, IPoint2 &m, DWORD flags, ManipHitData *pHitData) |
ManipExport DisplayState | MouseEntersObject (TimeValue t, ViewExp *pVpt, IPoint2 &m, ManipHitData *pHitData) |
ManipExport DisplayState | MouseLeavesObject (TimeValue t, ViewExp *pVpt, IPoint2 &m, ManipHitData *pHitData) |
ManipExport IPoint2 & | GetTipPos () |
ManipExport void | GetLocalViewRay (ViewExp *pVpt, IPoint2 &m, Ray &viewRay) |
ManipExport void | Invalidate () |
BOOL | UseSelectionBrackets () |
This method allows an object to choose
whether or not it will display selection brackets in shaded
viewports. |
|
ManipExport void | UnRegisterViewChange (BOOL fromDelete=FALSE) |
void | RegisterViewChange () |
void | SetResettingFlag (BOOL val) |
BOOL | GetResettingFlag () |
ManipExport void | KillToolTip () |
ManipExport Point3 | GetUnselectedColor () |
ManipExport BOOL | ActiveViewOnly () |
Static Public Attributes |
|
static ManipExport const int | kNoneSelected |
Protected Member Functions |
|
virtual ManipExport void | SetReference (int i, RefTargetHandle rtarg) |
Stores a
ReferenceTarget as its 'i-th' reference`. |
|
Protected Attributes |
|
int | mDispSelectedIndex |
MSTR | mToolTip |
float | mGizmoScale |
IParamBlock2 * | mpPblock |
Interval | mValid |
RefTargetHandle | mhTarget |
MouseState | mState |
BOOL | mActiveViewOnly |
BOOL | mResetting |
ManipExport SimpleManipulator | ( | ) |
ManipExport SimpleManipulator | ( | INode * | pNode | ) |
ManipExport ~SimpleManipulator | ( | ) |
ManipExport int NumRefs | ( | ) | [virtual] |
Returns the total number of references this ReferenceMaker can hold.
The plugin implements this method to indicate the total number of of references it can make. This includes all references whether they are NULL (inactive) or non-NULL (active) at the time when this method is called. A plugin can hold a variable number of references, thus the return value of this method is not to be cached and reused by client code.
Reimplemented from ReferenceMaker.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
ManipExport RefTargetHandle GetReference | ( | int | i | ) | [virtual] |
Returns the 'i-th' reference.
The plugin implements this method to return its 'i-th' reference. The plug-in simply keeps track of its references using an integer index for each one. This method is normally called by the system.
i | - The index of the reference to retrieve. Valid values are from 0 to NumRefs()-1. |
Reimplemented from ReferenceMaker.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
virtual ManipExport void SetReference | ( | int | i, |
RefTargetHandle | rtarg | ||
) | [protected, virtual] |
Stores a ReferenceTarget as its 'i-th' reference`.
The plugin implements this method to store the reference handle passed to it as its 'i-th' reference. In its implementation of this method, the plugin should simply assign the reference handle passed in as a parameter to the member variable that holds the 'i-th' reference. Other reference handling methods such as ReferenceMaker::DeleteReference(), or ReferenceMaker::ReplaceReference() should not be called from within this method. The plugin itself or other plugins should not call this method directly. The system will call this method when a new reference is created or an existing one is replaced by calling ReferenceMaker::ReplaceReference().
i | - The index of the reference to store. Valid values are from 0 to NumRefs()-1. |
rtarg | - The reference handle to store. |
Reimplemented from ReferenceMaker.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
ManipExport RefResult NotifyRefChanged | ( | Interval | changeInt, |
RefTargetHandle | hTarget, | ||
PartID & | partID, | ||
RefMessage | message | ||
) | [virtual] |
Receives and responds to messages.
A plugin which makes references must implement a method to receive and respond to messages broadcast by its dependents. This is done by implementing NotifyRefChanged(). The plugin developer usually implements this method as a switch statement where each case is one of the messages the plugin needs to respond to. The Method StdNotifyRefChanged calls this, which can change the partID to new value. If it doesn't depend on the particular message& partID, it should return REF_DONTCARE.
changeInt | - This is the interval of time over which the message is active. Currently, all plug-ins will receive FOREVER for this interval. |
hTarget | - This is the handle of the reference target the message was sent by. The reference maker uses this handle to know specifically which reference target sent the message. |
partID | - This contains information specific to the message passed in. Some messages don't use the partID at all. See the section List of Reference Messages for more information about the meaning of the partID for some common messages. |
message | - The message parameters passed into this method is the specific message which needs to be handled. |
Implements ReferenceMaker.
Reimplemented in MSPluginSimpleManipulator.
ManipExport ObjectState Eval | ( | TimeValue | t | ) | [virtual] |
This method is called to evaluate the object and return the result as an ObjectState.
When the system has a pointer to an object it doesn't know if it's a procedural object or a derived object. So it calls Eval() on it and gets back an ObjectState. A derived object managed by the system may have to call Eval() on its input for example. A plug-in (like a procedural object) typically just returns itself. A plug-in that does not just return itself is the Morph Object (/MAXSDK/SAMPLES/OBJECTS/MORPHOBJ.CPP). This object uses a morph controller to compute a new object and fill in an ObjectState which it returns.
t | Specifies the time to evaluate the object. |
{ return ObjectState(this); }
Implements Object.
void InitNodeName | ( | MSTR & | s | ) | [inline, virtual] |
Implemented by the System.
Sets the default node name to "Helper".
Reimplemented from HelperObject.
{s = GetObjectName();}
ManipExport Interval ObjectValidity | ( | TimeValue | t | ) | [virtual] |
This method returns the validity interval of the object as a whole at the specified time.
t | The time to compute the validity interval. |
Reimplemented from Object.
ManipExport void GetWorldBoundBox | ( | TimeValue | t, |
INode * | inode, | ||
ViewExp * | vp, | ||
Box3 & | box | ||
) | [virtual] |
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 BaseObject.
Reimplemented in MSSimpleManipulatorXtnd.
ManipExport void GetLocalBoundBox | ( | TimeValue | t, |
INode * | inode, | ||
ViewExp * | vp, | ||
Box3 & | box | ||
) | [virtual] |
Implements Manipulator.
Reimplemented in MSSimpleManipulatorXtnd.
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 Object.
ManipExport 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 Animatable.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
ManipExport 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 Animatable.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
ManipExport void GetClassName | ( | MSTR & | s | ) | [inline, 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.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
{s = GetObjectName();}
ManipExport int NumSubs | ( | ) | [inline, virtual] |
Reimplemented from Animatable.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
{ return 1; }
ManipExport Animatable* SubAnim | ( | int | i | ) | [inline, virtual] |
i | This is the index of the sub-anim to return. |
Reimplemented from Animatable.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
{ UNUSED_PARAM(i); return mpPblock; }
ManipExport MSTR SubAnimName | ( | int | i | ) | [virtual] |
i | The index of the parameter name to return |
Reimplemented from Animatable.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
ManipExport BaseInterface* GetInterface | ( | Interface_ID | id | ) | [virtual] |
Reimplemented from FPMixinInterface.
ManipExport int HitTest | ( | TimeValue | t, |
INode * | pNode, | ||
int | type, | ||
int | crossing, | ||
int | flags, | ||
IPoint2 * | pScreenPoint, | ||
ViewExp * | pVpt | ||
) | [virtual] |
Implements Manipulator.
Reimplemented in MSSimpleManipulatorXtnd.
Implements Manipulator.
Reimplemented in MSSimpleManipulatorXtnd.
ManipExport void ClearPolyShapes | ( | ) | [virtual] |
Implements ISimpleManipulator.
ManipExport void AppendPolyShape | ( | PolyShape * | pPolyShape, |
DWORD | flags, | ||
Point3 & | unselColor, | ||
Point3 & | selColor =
ColorMan()->GetColorAsPoint3(kManipulatorsSelected) |
||
) | [virtual] |
Implements ISimpleManipulator.
ManipExport void AppendGizmo | ( | GizmoShape * | pGizmoShape, |
DWORD | flags, | ||
Point3 & | unselColor, | ||
Point3 & | selColor =
ColorMan()->GetColorAsPoint3(kManipulatorsSelected) |
||
) | [virtual] |
Implements ISimpleManipulator.
ManipExport void AppendMesh | ( | Mesh * | pMesh, |
DWORD | flags, | ||
Point3 & | unselColor, | ||
Point3 & | selColor =
ColorMan()->GetColorAsPoint3(kManipulatorsSelected) |
||
) | [virtual] |
Implements ISimpleManipulator.
ManipExport void AppendMarker | ( | MarkerType | markerType, |
Point3 & | position, | ||
DWORD | flags, | ||
Point3 & | unselColor, | ||
Point3 & | selColor =
ColorMan()->GetColorAsPoint3(kManipulatorsSelected) |
||
) | [virtual] |
Implements ISimpleManipulator.
ManipExport void AppendText | ( | MCHAR * | pText, |
Point3 & | position, | ||
DWORD | flags, | ||
Point3 & | unselColor, | ||
Point3 & | selColor =
ColorMan()->GetColorAsPoint3(kManipulatorsSelected) |
||
) | [virtual] |
Implements ISimpleManipulator.
ManipExport MSTR& GetManipName | ( | ) | [inline, virtual] |
Implements Manipulator.
{return mToolTip; }
ManipExport void SetGizmoScale | ( | float | gizmoScale | ) | [inline] |
{ mGizmoScale = gizmoScale; }
ManipExport MSTR& GetToolTip | ( | ) | [inline] |
{ return mToolTip; }
ManipExport void SetToolTipWnd | ( | HWND | hWnd | ) | [inline] |
{ mToolTipWnd = hWnd; }
ManipExport void SetToolTipTimer | ( | UINT | timer | ) | [inline] |
{ mToolTipTimer = timer; }
ManipExport UINT GetToolTipTimer | ( | ) | [inline] |
{ return mToolTipTimer; }
ManipExport HWND GetToolTipWnd | ( | ) | [inline] |
{ return mToolTipWnd; }
ManipExport IParamBlock2* GetPBlock | ( | ) | [inline] |
{ return mpPblock; }
virtual void UpdateShapes | ( | TimeValue | t, |
MSTR & | toolTip | ||
) | [pure virtual] |
Implements ISimpleManipulator.
Implemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
virtual ManipExport void ManipulatorSelected | ( | ) | [inline, virtual] |
{};
ManipExport void SetManipTarget | ( | RefTargetHandle | hTarg | ) |
ManipExport RefTargetHandle GetManipTarget | ( | ) | [inline] |
{ return mhTarget; }
ManipExport void SetMouseState | ( | MouseState | state | ) | [inline] |
{ mState = state; }
ManipExport MouseState GetMouseState | ( | ) | [inline, virtual] |
Implements ISimpleManipulator.
{ return mState; }
ManipExport void OnButtonDown | ( | TimeValue | t, |
ViewExp * | pVpt, | ||
IPoint2 & | m, | ||
DWORD | flags, | ||
ManipHitData * | pHitData | ||
) | [virtual] |
Reimplemented from Manipulator.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
ManipExport void OnMouseMove | ( | TimeValue | t, |
ViewExp * | pVpt, | ||
IPoint2 & | m, | ||
DWORD | flags, | ||
ManipHitData * | pHitData | ||
) | [virtual] |
Reimplemented from Manipulator.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
ManipExport void OnButtonUp | ( | TimeValue | t, |
ViewExp * | pVpt, | ||
IPoint2 & | m, | ||
DWORD | flags, | ||
ManipHitData * | pHitData | ||
) | [virtual] |
Reimplemented from Manipulator.
Reimplemented in MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.
ManipExport DisplayState MouseEntersObject | ( | TimeValue | t, |
ViewExp * | pVpt, | ||
IPoint2 & | m, | ||
ManipHitData * | pHitData | ||
) | [virtual] |
Reimplemented from Manipulator.
ManipExport DisplayState MouseLeavesObject | ( | TimeValue | t, |
ViewExp * | pVpt, | ||
IPoint2 & | m, | ||
ManipHitData * | pHitData | ||
) | [virtual] |
Reimplemented from Manipulator.
ManipExport IPoint2& GetTipPos | ( | ) | [inline] |
{ return mToolTipPos; }
Implements ISimpleManipulator.
ManipExport void Invalidate | ( | ) | [inline] |
{ mValid = NEVER; }
BOOL UseSelectionBrackets | ( | ) | [inline, virtual] |
This method allows an object to choose whether or not it will display selection brackets in shaded viewports.
The method will return FALSE if no selection brackets are displayed or TRUE if it does display selection brackets.
Reimplemented from Object.
{ return FALSE; }
ManipExport void UnRegisterViewChange | ( | BOOL | fromDelete = FALSE |
) |
void RegisterViewChange | ( | ) |
void SetResettingFlag | ( | BOOL | val | ) | [inline] |
BOOL GetResettingFlag | ( | ) | [inline] |
ManipExport void KillToolTip | ( | ) |
ManipExport Point3 GetUnselectedColor | ( | ) |
ManipExport BOOL ActiveViewOnly | ( | ) | [inline] |
{ return mActiveViewOnly; }
ManipExport const int kNoneSelected
[static] |
int mDispSelectedIndex
[protected] |
float mGizmoScale
[protected] |
IParamBlock2* mpPblock
[protected] |
RefTargetHandle mhTarget
[protected] |
MouseState mState
[protected] |
BOOL mActiveViewOnly
[protected] |
BOOL mResetting
[protected] |