ISimpleManipulator Class Reference

ISimpleManipulator Class Referenceabstract

#include <manipulator.h>

Class Description

See also
Class FPMixinInterface, Class SimpleManipulator, Class Interface, Class PolyShape, Class Mesh, Class Point3, Class Point2, Class ViewExp, Class IColorManager, Class Ray, Class ManipHitData, Enum MarkerType

Description:
The ISimpleManipulator class is an interface to SimpleManipulators with built-in ParamBlock2 support and a variety of additionally useful methods.
+ Inheritance diagram for ISimpleManipulator:

Public Types

enum  {
  clearPolyShapes, appendPolyShape, appendMesh, getMouseState,
  getLocalViewRay, updateShapes, onMouseMove, appendGizmo,
  appendMarker, appendText, getGizmoSize, setGizmoSize
}
 
enum  { mouseState, markerType }
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 

Public Member Functions

virtual void ClearPolyShapes ()=0
 
virtual void AppendPolyShape (PolyShape *pPolyShape, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan() ->GetColorAsPoint3(kManipulatorsSelected))=0
 
virtual void AppendGizmo (GizmoShape *pGizmoShape, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan() ->GetColorAsPoint3(kManipulatorsSelected))=0
 
virtual void AppendMesh (Mesh *pMesh, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan() ->GetColorAsPoint3(kManipulatorsSelected))=0
 
virtual void AppendMarker (MarkerType markerType, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan() ->GetColorAsPoint3(kManipulatorsSelected))=0
 
virtual void AppendText (const MCHAR *pText, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor=ColorMan() ->GetColorAsPoint3(kManipulatorsSelected))=0
 
virtual MouseState GetMouseState ()=0
 
virtual void GetLocalViewRay (ViewExp *pVpt, IPoint2 &m, Ray &viewRay)=0
 
virtual void UpdateShapes (TimeValue t, MSTR &toolTip)=0
 
virtual void OnMouseMove (TimeValue t, ViewExp *pVpt, IPoint2 &m, DWORD flags, ManipHitData *pHitData)=0
 
 VFN_0 (clearPolyShapes, ClearPolyShapes)
 
 VFN_6 (appendMesh, FPAppendMeshEx, TYPE_MESH, TYPE_INT, TYPE_POINT3_BV, TYPE_POINT3_BV, TYPE_bool, TYPE_INT)
 
 VFN_5 (appendGizmo, FPAppendGizmoEx, TYPE_INTERFACE, TYPE_INT, TYPE_POINT3_BV, TYPE_POINT3_BV, TYPE_bool)
 
 VFN_6 (appendMarker, FPAppendMarkerEx, TYPE_ENUM, TYPE_POINT3_BV, TYPE_INT, TYPE_POINT3_BV, TYPE_POINT3_BV, TYPE_bool)
 
 VFN_6 (appendText, FPAppendTextEx, TYPE_STRING, TYPE_POINT3_BV, TYPE_INT, TYPE_POINT3_BV, TYPE_POINT3_BV, TYPE_bool)
 
 VFN_2 (updateShapes, UpdateShapes, TYPE_TIMEVALUE, TYPE_TSTR_BR)
 
 FN_2 (getLocalViewRay, TYPE_RAY_BV, FPGetLocalViewRayEx, TYPE_POINT2_BV, TYPE_bool)
 
 RO_PROP_FN (getMouseState, GetMouseState, TYPE_ENUM)
 
ManipExport Ray FPGetLocalViewRay (Point2 &m)
 
ManipExport void FPAppendMesh (Mesh *pMesh, DWORD flags, Point3 &unselColor, Point3 &selColor)
 
ManipExport void FPAppendGizmo (FPInterface *pGizmo, DWORD flags, Point3 &unselColor, Point3 &selColor)
 
ManipExport void FPAppendMarker (int markerType, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor)
 
ManipExport void FPAppendText (const MCHAR *pText, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor)
 
ManipExport Ray FPGetLocalViewRayEx (Point2 &m, bool applyUIScaling)
 
ManipExport void FPAppendMeshEx (Mesh *pMesh, DWORD flags, Point3 &unselColor, Point3 &selColor, bool applyUIScaling, int gizmoSize)
 
ManipExport void FPAppendGizmoEx (FPInterface *pGizmo, DWORD flags, Point3 &unselColor, Point3 &selColor, bool applyUIScaling)
 
ManipExport void FPAppendMarkerEx (int markerType, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor, bool applyUIScaling)
 
ManipExport void FPAppendTextEx (const MCHAR *pText, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor, bool applyUIScaling)
 
ManipExport FPInterfaceDescGetDesc ()
 
- Public Member Functions inherited from FPMixinInterface
 FPMixinInterface ()
 
virtual LifetimeType LifetimeControl ()
 
virtual CoreExport bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
CoreExport ~FPMixinInterface ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDescByID (Interface_ID id)
 
virtual Interface_ID GetID ()
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
virtual ActionTableGetActionTable ()
 
virtual void EnableActions (BOOL onOff)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPMixinInterface
 FPMixinInterface (const FPMixinInterface &rhs)
 
FPMixinInterfaceoperator= (const FPMixinInterface &rhs)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 
- Protected Attributes inherited from FPMixinInterface
Tab< InterfaceNotifyCallback * > * interfaceNotifyCBs
 

Member Enumeration Documentation

anonymous enum
Enumerator
clearPolyShapes 
appendPolyShape 
appendMesh 
getMouseState 
getLocalViewRay 
updateShapes 
onMouseMove 
appendGizmo 
appendMarker 
appendText 
getGizmoSize 
setGizmoSize 
1193  };
Definition: manipulator.h:1192
Definition: manipulator.h:1191
Definition: manipulator.h:1191
Definition: manipulator.h:1191
Definition: manipulator.h:1192
Definition: manipulator.h:1191
Definition: manipulator.h:1191
Definition: manipulator.h:1192
Definition: manipulator.h:1192
Definition: manipulator.h:1192
Definition: manipulator.h:1192
Definition: manipulator.h:1192
anonymous enum
Enumerator
mouseState 
markerType 
1195 { mouseState, markerType, };
Definition: manipulator.h:1195
Definition: manipulator.h:1195

Member Function Documentation

virtual void ClearPolyShapes ( )
pure virtual
Remarks
Implemented by the system.

Removes all of the current gizmos in the manipulator. This is normally called at the top of UpdateShapes() to clear out any previous gizmos before creating new ones.

Implemented in SimpleManipulator.

virtual void AppendPolyShape ( PolyShape pPolyShape,
DWORD  flags,
Point3 unselColor,
Point3 selColor = ColorMan() ->GetColorAsPoint3(kManipulatorsSelected) 
)
pure virtual
Remarks
Implemented by the system.

This method adds a new PolyShape gizmo to the manipulator. The shape is defined in the local coordinates of the node that owns the manipulator.
Parameters:
PolyShape* pPolyShape

A pointer to the poly shape to add.

DWORD flags = 0

The flags can have one or more of the following values:

kGizmoDontDisplay

Instruct the gizmo not to display. It will still hit-test.

kGizmoDontHitTest

Instruct the gizmo not to do any hit testing. It will still display.

kGizmoActiveViewportOnly

Only display the gizmo in the active viewport.

kGizmoUseRelativeScreenSpace

The coordinates are in normalized screen space. the X and Y values are in the range 0.0 to 1.0, and interpreted as percentages of screen space.

kGizmoUseScreenSpace

The coordinates are in screen space.

kGizmoApplyUIScaling

If the coordinates are in screen space, the coordinates are 100% dpi scaled values and will be internally converted to current dpi scaling.

Point3& unselColor = GetUIColor(COLOR_SEL_GIZMOS) < / b >

The color of the gizmo when unselected.

Point3& selColor = GetSubSelColor()

The color of the gizmo when selected.

Implemented in SimpleManipulator.

virtual void AppendGizmo ( GizmoShape pGizmoShape,
DWORD  flags,
Point3 unselColor,
Point3 selColor = ColorMan() ->GetColorAsPoint3(kManipulatorsSelected) 
)
pure virtual
Remarks
Implemented by the system.

This method adds a new GizmoShape to the manipulator. The shape is defined in the local coordinates of the node that owns the manipulator.
Parameters:
GizmoShape* pGizmoShape

A pointer to the gizmo shape to add.

DWORD flags = 0

The flags can have one or more of the following values:

kGizmoDontDisplay

Instruct the gizmo not to display. It will still hit-test.

kGizmoDontHitTest

Instruct the gizmo not to do any hit testing. It will still display.

kGizmoActiveViewportOnly

Only display the gizmo in the active viewport.

kGizmoUseRelativeScreenSpace

The coordinates are in normalized screen space. the X and Y values are in the range 0.0 to 1.0, and interpreted as percentages of screen space.

kGizmoUseScreenSpace

The coordinates are in screen space.

kGizmoApplyUIScaling

If the coordinates are in screen space, the coordinates are 100% dpi scaled values and will be internally converted to current dpi scaling.

Point3& unselColor = GetUIColor(COLOR_SEL_GIZMOS)

The color of the gizmo when unselected.

Point3& selColor = GetSubSelColor()

The color of the gizmo when selected.

Implemented in SimpleManipulator.

virtual void AppendMesh ( Mesh pMesh,
DWORD  flags,
Point3 unselColor,
Point3 selColor = ColorMan() ->GetColorAsPoint3(kManipulatorsSelected) 
)
pure virtual
Remarks
Implemented by the system.

This method adds a new mesh to the manipulator. The mesh is defined in the local coordinates of the node that owns the manipulator.
Parameters:
Mesh* pMesh

A pointer to the mesh to add.

DWORD flags = 0

The flags can have one or more of the following values:

kGizmoDontDisplay

Instruct the gizmo not to display. It will still hit-test.

kGizmoDontHitTest

Instruct the gizmo not to do any hit testing. It will still display.

kGizmoActiveViewportOnly

Only display the gizmo in the active viewport.

kGizmoScaleToViewport

Instruct the gizmo to scale itself to have a constant size in the viewport. In this case the system will use the ManipulatorGizmo::mGizmoSize to determine how big the manipulator should be. It interprets mGizmoSize as pixels in this case.

Point3& unselColor = GetUIColor(COLOR_SEL_GIZMOS)

The color of the gizmo when unselected.

Point3& selColor = GetSubSelColor()

The color of the gizmo when selected.

Implemented in SimpleManipulator.

virtual void AppendMarker ( MarkerType  markerType,
Point3 position,
DWORD  flags,
Point3 unselColor,
Point3 selColor = ColorMan() ->GetColorAsPoint3(kManipulatorsSelected) 
)
pure virtual
Remarks
Implemented by the system.

This method adds a new marker to the manipulator.
Parameters:
MarkerType markerType

The marker type to add.

Point3& position

The position of the marker.

DWORD flags = 0

The flags can have one or more of the following values:

kGizmoDontDisplay

Instruct the gizmo not to display. It will still hit-test.

kGizmoDontHitTest

Instruct the gizmo not to do any hit testing. It will still display.

kGizmoActiveViewportOnly

Only display the gizmo in the active viewport.

kGizmoUseRelativeScreenSpace

The coordinates are in normalized screen space. the X and Y values are in the range 0.0 to 1.0, and interpreted as percentages of screen space.

kGizmoUseScreenSpace

The coordinates are in screen space.

kGizmoApplyUIScaling

If the coordinates are in screen space, the coordinates are 100% dpi scaled values and will be internally converted to current dpi scaling.

Point3& unselColor = GetUIColor(COLOR_SEL_GIZMOS)

The color of the gizmo when unselected.

Point3& selColor = GetSubSelColor()

The color of the gizmo when selected.

Implemented in SimpleManipulator.

virtual void AppendText ( const MCHAR pText,
Point3 position,
DWORD  flags,
Point3 unselColor,
Point3 selColor = ColorMan() ->GetColorAsPoint3(kManipulatorsSelected) 
)
pure virtual
Remarks
Implemented by the system.

This method adds a new text entry to the manipulator.
Parameters:
MCHAR* pText

The string containing the text to add.

Point3& position

The position of the text.

DWORD flags = 0

The flags can have one or more of the following values:

kGizmoDontDisplay

Instruct the gizmo not to display. It will still hit-test.

kGizmoDontHitTest

Instruct the gizmo not to do any hit testing. It will still display.

kGizmoActiveViewportOnly

Only display the gizmo in the active viewport.

kGizmoUseRelativeScreenSpace

The coordinates are in normalized screen space. the X and Y values are in the range 0.0 to 1.0, and interpreted as percentages of screen space.

kGizmoUseScreenSpace

The coordinates are in screen space.

kGizmoApplyUIScaling

If the coordinates are in screen space, the coordinates are 100% dpi scaled values and will be internally converted to current dpi scaling.

Point3& unselColor = GetUIColor(COLOR_SEL_GIZMOS)

The color of the gizmo when unselected.

Point3& selColor = GetSubSelColor()

The color of the gizmo when selected.

Implemented in SimpleManipulator.

virtual MouseState GetMouseState ( )
pure virtual
Remarks
This method returns the current status of the mouse.
Returns
One of the following values:

kMouseIdle

The mouse is idle, manipulator not active and the mouse is not over it.

kMouseDragging

The mouse is currently dragging the manipulator.

kMouseOverManip

The mouse is over the manipulator, but it is not being dragged.

Implemented in SimpleManipulator.

virtual void GetLocalViewRay ( ViewExp pVpt,
IPoint2 m,
Ray viewRay 
)
pure virtual
Remarks
This method gets the view ray going through the given screen coordinate. The result is in local coordinates of the owning INode.
Parameters:
ViewExp* pVpt

An interface that may be used to call methods associated with the viewports.

IPoint2& m

The screen coordinate.

Ray& viewRay

The returned local view ray.

Implemented in SimpleManipulator.

virtual void UpdateShapes ( TimeValue  t,
MSTR toolTip 
)
pure virtual
Remarks
This method gets called whenever the manipulator needs to update its gizmos. This is implemented by the manipulator to create the gizmos based on the current state of the node being manipulated.
Parameters:
TimeValue t

The time value at which the shapes should be updated.

MSTR& toolTip

The tooltip string.

Implemented in SimpleManipulator.

virtual void OnMouseMove ( TimeValue  t,
ViewExp pVpt,
IPoint2 m,
DWORD  flags,
ManipHitData pHitData 
)
pure virtual
Remarks
This method gets called when the mouse moves within the manipulator context.
Parameters:
TimeValue t

The time to display the object.

ViewExp* pVpt

An interface that may be used to call methods associated with the viewports.

IPoint2& m

The screen coordinates of the mouse.

DWORD flags

Not used, should be set to 0.

ManipHitData* pHitData

A pointer to the hitdata containing information on which manipulator was hit.

Implemented in SimpleManipulator.

VFN_0 ( clearPolyShapes  ,
ClearPolyShapes   
)
RO_PROP_FN ( getMouseState  ,
GetMouseState  ,
TYPE_ENUM   
)
ManipExport Ray FPGetLocalViewRay ( Point2 m)
ManipExport void FPAppendMesh ( Mesh pMesh,
DWORD  flags,
Point3 unselColor,
Point3 selColor 
)
ManipExport void FPAppendGizmo ( FPInterface pGizmo,
DWORD  flags,
Point3 unselColor,
Point3 selColor 
)
ManipExport void FPAppendMarker ( int  markerType,
Point3 position,
DWORD  flags,
Point3 unselColor,
Point3 selColor 
)
ManipExport void FPAppendText ( const MCHAR pText,
Point3 position,
DWORD  flags,
Point3 unselColor,
Point3 selColor 
)
ManipExport Ray FPGetLocalViewRayEx ( Point2 m,
bool  applyUIScaling 
)
ManipExport void FPAppendMeshEx ( Mesh pMesh,
DWORD  flags,
Point3 unselColor,
Point3 selColor,
bool  applyUIScaling,
int  gizmoSize 
)
ManipExport void FPAppendGizmoEx ( FPInterface pGizmo,
DWORD  flags,
Point3 unselColor,
Point3 selColor,
bool  applyUIScaling 
)
ManipExport void FPAppendMarkerEx ( int  markerType,
Point3 position,
DWORD  flags,
Point3 unselColor,
Point3 selColor,
bool  applyUIScaling 
)
ManipExport void FPAppendTextEx ( const MCHAR pText,
Point3 position,
DWORD  flags,
Point3 unselColor,
Point3 selColor,
bool  applyUIScaling 
)
ManipExport FPInterfaceDesc* GetDesc ( )
virtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.