Public Member Functions | Static Public Attributes

ManipulatorGizmo Class Reference

Search for all occurrences

Detailed Description

See also:
Class BaseInterfaceServer, Class PolyShape, Class Mesh, Class Point3, Class Point2, Class Matrix3, Class HitRegion, Class GraphicsWindow, Class ViewExp, Class INode, List of Marker Types, Hit Testing

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

This is the base class for the creation of manipulator gizmo objects and can hold a single Mesh, PolyLine, Marker, or Text gizmo.
Data Members:
private:

PolyShape* mpShape

The polyshape gizmo.

Mesh* mpMesh

The mesh gizmo.

Point3 mPosition

The position for markers and text.

MarkerType* mpMarkerType

The marker type for marker gizmos. See the List of Marker Types

MSTR* mpText

The string used for text gizmos

Point3 mUnselColor

The color of the gizmo when unselected.

Point3 mSelColor

The color of the gizmo when selected.

DWORD mFlags

Display and hit testing flags.

int mGizmoSize

The size of the gizmo in pixels for kGizmoScaleToViewport gizmos
Data Members:
Display and hit-test flags.

static const DWORD kGizmoDontDisplay

Don't display this gizmo, it is still hit-tested.

static const DWORD kGizmoDontHitTest

Don't hit test this gizmo, it is still displayed.

static const DWORD kGizmoScaleToViewport

Tells the gizmo to scale itself to have a constant size in the viewport. In this case, the system uses the mGizmoSize to determine how big the manipulator should be. It interprets mGizmoSize as pixels it this case. This flag only applies to mesh gizmo currently.

static const DWORD 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. Note: This is only supported for PolyShape, Marker and Text gizmos.

static const DWORD kGizmoUseScreenSpace

The coordinates are in screen space. Note: This is only supported for PolyShape, Marker and Text gizmos.

static const DWORD kGizmoActiveViewportOnly

Only display the gizmo in the active viewport.

#include <manipulator.h>

Inheritance diagram for ManipulatorGizmo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

ManipExport  ManipulatorGizmo ()
ManipExport  ManipulatorGizmo (PolyShape *pShape, DWORD flags, Point3 &unselColor, Point3 &selColor=GetSubSelColor())
ManipExport  ManipulatorGizmo (Mesh *pMesh, DWORD flags, Point3 &unselColor, Point3 &selColor=GetSubSelColor())
ManipExport  ManipulatorGizmo (MarkerType markerType, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor=GetSubSelColor())
ManipExport  ManipulatorGizmo (MCHAR *pText, Point3 &position, DWORD flags, Point3 &unselColor, Point3 &selColor=GetSubSelColor())
ManipExport  ~ManipulatorGizmo ()
ManipExport BOOL  HitTest (GraphicsWindow *pGW, HitRegion *pHR, ManipHitList *pHitList, Matrix3 *tm, IPoint2 pScreenPoint, int gizmoIndex)
ManipExport void  Render (ViewExp *pVpt, TimeValue t, INode *pNode, int flags, bool selected, BOOL isStandAlone)
ManipExport Box3  GetBoundingBox (INode *pNode, ViewExp *pVpt)

Static Public Attributes

static ManipExport const DWORD  kGizmoDontDisplay
static ManipExport const DWORD  kGizmoDontHitTest
static ManipExport const DWORD  kGizmoScaleToViewport
static ManipExport const DWORD  kGizmoUseRelativeScreenSpace
static ManipExport const DWORD  kGizmoUseScreenSpace
static ManipExport const DWORD  kGizmoActiveViewportOnly

Constructor & Destructor Documentation

ManipExport ManipulatorGizmo ( )
Remarks:
Constructor.
ManipExport ManipulatorGizmo ( PolyShape pShape,
DWORD  flags,
Point3 unselColor,
Point3 selColor = GetSubSelColor() 
)
Remarks:
Constructor. This constructor method is used to initialize a polyshape manipulator.
Parameters:
PolyShape* mpShape

The polyshape gizmo.

DWORD flags

Display and hit testing flags.

Point3& unselColor

The color of the gizmo when unselected.

Point3& selColor

The color of the gizmo when selected.
ManipExport ManipulatorGizmo ( Mesh pMesh,
DWORD  flags,
Point3 unselColor,
Point3 selColor = GetSubSelColor() 
)
Remarks:
Constructor. This constructor method is used to initialize a mesh manipulator.
Parameters:
Mesh* pMesh

The polyshape gizmo.

DWORD flags

Display and hit testing flags.

Point3& unselColor

The color of the gizmo when unselected.

Point3& selColor

The color of the gizmo when selected.
ManipExport ManipulatorGizmo ( MarkerType  markerType,
Point3 position,
DWORD  flags,
Point3 unselColor,
Point3 selColor = GetSubSelColor() 
)
Remarks:
Constructor. This constructor method is used to initialize a marker manipulator.
Parameters:
MarkerType markerType

The marker type. See the List of Marker Types

Point3& position

The marker position.

DWORD flags

Display and hit testing flags.

Point3& unselColor

The color of the gizmo when unselected.

Point3& selColor

The color of the gizmo when selected.
ManipExport ManipulatorGizmo ( MCHAR *  pText,
Point3 position,
DWORD  flags,
Point3 unselColor,
Point3 selColor = GetSubSelColor() 
)
Remarks:
Constructor. This constructor method is used to initialize a text manipulator.
Parameters:
MCHAR* pText

The text string for the manipulator

Point3& position

The manipulator position.

DWORD flags

Display and hit testing flags.

Point3& unselColor

The color of the gizmo when unselected.

Point3& selColor

The color of the gizmo when selected.
ManipExport ~ManipulatorGizmo ( )
Remarks:
Destructor.

Member Function Documentation

ManipExport BOOL HitTest ( GraphicsWindow pGW,
HitRegion pHR,
ManipHitList *  pHitList,
Matrix3 tm,
IPoint2  pScreenPoint,
int  gizmoIndex 
)
Remarks:
Used Internally.

This method is called when a hit test on a manipulator is needed.
Parameters:
GraphicsWindow* pGW

The graphics window where the hit test is done.

HitRegion* pHR

The hit region. See Class HitRegion.

ManipHitList* pHitList

A pointer to the hit list.

Matrix3* tm

The transformation matrix.

IPoint2 pScreenPoint

The screen point to test.

int gizmoIndex

The index of the gizmo.
Returns:
TRUE if the manipulator was hit, otherwise FALSE.
ManipExport void Render ( ViewExp pVpt,
TimeValue  t,
INode pNode,
int  flags,
bool  selected,
BOOL  isStandAlone 
)
Remarks:
This method will render the manipulator gizmo.
Parameters:
ViewExp* pVpt

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

TimeValue t

The time value to render at.

INode* pNode

A pointer to the node to render.

int flags

The manipulator flags.

bool selected

This flag sets the selected or unselected state. This will instruct the render process to use the proper color for the manipulator.

bool isStandAlone

This flag sets whether the manipulator is a stand alone manipulator (i.e. manipulators which manipulate themselves such as the slider manipulator).
ManipExport Box3 GetBoundingBox ( INode pNode,
ViewExp pVpt 
)
Remarks:
Used Internally.

This method returns the bounding box of the manipulator.
Parameters:
INode* pNode

A pointer to the node to calculate the bounding box for.

ViewExp* pVpt

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

Member Data Documentation

ManipExport const DWORD kGizmoDontDisplay [static]
ManipExport const DWORD kGizmoDontHitTest [static]
ManipExport const DWORD kGizmoScaleToViewport [static]
ManipExport const DWORD kGizmoUseRelativeScreenSpace [static]
ManipExport const DWORD kGizmoUseScreenSpace [static]
ManipExport const DWORD kGizmoActiveViewportOnly [static]

ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo
ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo ManipulatorGizmo