Public Types | Public Member Functions

ISimpleManipulator Class Reference

Search for all occurrences

Detailed 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, List of Marker Types

Description:
This class is available in release 4.0 and later only.

The ISimpleManipulator class is an interface to SimpleManipulators with built-in ParamBlock2 support and a variety of additionally useful methods.

#include <manipulator.h>

Inheritance diagram for ISimpleManipulator:
Inheritance graph
[legend]

List of all members.

Public Types

enum   {
  clearPolyShapes, appendPolyShape, appendMesh, getMouseState,
  getLocalViewRay, updateShapes, onMouseMove, appendGizmo,
  appendMarker, appendText
}
enum   { mouseState, markerType }

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 (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
BEGIN_FUNCTION_MAP  VFN_0 (clearPolyShapes, ClearPolyShapes)
  VFN_4 (appendMesh, FPAppendMesh, TYPE_MESH, TYPE_INT, TYPE_POINT3_BV, TYPE_POINT3_BV)
  VFN_4 (appendGizmo, FPAppendGizmo, TYPE_INTERFACE, TYPE_INT, TYPE_POINT3_BV, TYPE_POINT3_BV)
  VFN_5 (appendMarker, FPAppendMarker, TYPE_ENUM, TYPE_POINT3_BV, TYPE_INT, TYPE_POINT3_BV, TYPE_POINT3_BV)
  VFN_5 (appendText, AppendText, TYPE_STRING, TYPE_POINT3_BV, TYPE_INT, TYPE_POINT3_BV, TYPE_POINT3_BV)
  VFN_2 (updateShapes, UpdateShapes, TYPE_TIMEVALUE, TYPE_TSTR_BR)
  FN_1 (getLocalViewRay, TYPE_RAY_BV, FPGetLocalViewRay, TYPE_POINT2_BV)
  RO_PROP_FN (getMouseState, GetMouseState, TYPE_ENUM)
END_FUNCTION_MAP 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 FPInterfaceDesc GetDesc ()

Member Enumeration Documentation

anonymous enum
anonymous enum

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.

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 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.

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 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.

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.

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 AppendText ( 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.

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 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, MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.

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, MSPluginSimpleManipulator, and MSSimpleManipulatorXtnd.

BEGIN_FUNCTION_MAP VFN_0 ( clearPolyShapes  ,
ClearPolyShapes   
)
VFN_4 ( appendMesh  ,
FPAppendMesh  ,
TYPE_MESH  ,
TYPE_INT  ,
TYPE_POINT3_BV  ,
TYPE_POINT3_BV   
)
VFN_4 ( appendGizmo  ,
FPAppendGizmo  ,
TYPE_INTERFACE  ,
TYPE_INT  ,
TYPE_POINT3_BV  ,
TYPE_POINT3_BV   
)
VFN_5 ( appendMarker  ,
FPAppendMarker  ,
TYPE_ENUM  ,
TYPE_POINT3_BV  ,
TYPE_INT  ,
TYPE_POINT3_BV  ,
TYPE_POINT3_BV   
)
VFN_5 ( appendText  ,
AppendText  ,
TYPE_STRING  ,
TYPE_POINT3_BV  ,
TYPE_INT  ,
TYPE_POINT3_BV  ,
TYPE_POINT3_BV   
)
VFN_2 ( updateShapes  ,
UpdateShapes  ,
TYPE_TIMEVALUE  ,
TYPE_TSTR_BR   
)
FN_1 ( getLocalViewRay  ,
TYPE_RAY_BV  ,
FPGetLocalViewRay  ,
TYPE_POINT2_BV   
)
RO_PROP_FN ( getMouseState  ,
GetMouseState  ,
TYPE_ENUM   
)
END_FUNCTION_MAP 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 FPInterfaceDesc* GetDesc ( ) [virtual]
Remarks:
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.


ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator
ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator ISimpleManipulator