3ds Max C++ API Reference
ManipulatorGizmo Class Reference

#include <manipulator.h>

+ Inheritance diagram for ManipulatorGizmo:

Public Member Functions

ManipExport ManipulatorGizmo ()
 
ManipExport ManipulatorGizmo (PolyShape *pShape, DWORD flags, const Point3 &unselColor, const Point3 &selColor=GetSubSelColor())
 
ManipExport ManipulatorGizmo (Mesh *pMesh, DWORD flags, const Point3 &unselColor, const Point3 &selColor=GetSubSelColor())
 
ManipExport ManipulatorGizmo (MarkerType markerType, Point3 &position, DWORD flags, const Point3 &unselColor, const Point3 &selColor=GetSubSelColor())
 
ManipExport ManipulatorGizmo (const MCHAR *pText, Point3 &position, DWORD flags, const Point3 &unselColor, const 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)
 
ManipExport void SetGizmoSize (int gizmoSize)
 
- Public Member Functions inherited from BaseInterfaceServer
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
virtual UtilExport int NumInterfaces () const
 
virtual UtilExport BaseInterfaceGetInterfaceAt (int i) const
 
virtual UtilExport ~BaseInterfaceServer ()
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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
 
static ManipExport const DWORD kGizmoApplyUIScaling
 
static ManipExport const int kDefaultGizmoSize
 

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 UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces
 

Detailed Description

See also
Class BaseInterfaceServer, Class PolyShape, Class Mesh, Class Point3,
Class Point2, Class Matrix3, Class HitRegion, Class GraphicsWindow, Class ViewExp, Class INode, Enum MarkerType, Hit Testing

Description:
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 MarkerType enum

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 kGizmoActiveViewportOnly

Only display the gizmo in the active viewport.

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.

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 kGizmoApplyUIScaling

If the coordinates are in screen space, the coordinates are 100% dpi scaled values and will be internally converted to current dpi scaling. Note: This is only supported for PolyShape, Marker and Text gizmos.

Constructor & Destructor Documentation

◆ ManipulatorGizmo() [1/5]

Remarks
Constructor.

◆ ManipulatorGizmo() [2/5]

ManipExport ManipulatorGizmo ( PolyShape pShape,
DWORD  flags,
const Point3 unselColor,
const 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.

◆ ManipulatorGizmo() [3/5]

ManipExport ManipulatorGizmo ( Mesh pMesh,
DWORD  flags,
const Point3 unselColor,
const 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.

◆ ManipulatorGizmo() [4/5]

ManipExport ManipulatorGizmo ( MarkerType  markerType,
Point3 position,
DWORD  flags,
const Point3 unselColor,
const Point3 selColor = GetSubSelColor() 
)
Remarks
Constructor. This constructor method is used to initialize a marker manipulator.
Parameters:
MarkerType markerType

The marker type. See the MarkerType enum.

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.

◆ ManipulatorGizmo() [5/5]

ManipExport ManipulatorGizmo ( const MCHAR pText,
Point3 position,
DWORD  flags,
const Point3 unselColor,
const 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.

◆ ~ManipulatorGizmo()

Remarks
Destructor.

Member Function Documentation

◆ HitTest()

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.

◆ Render()

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

◆ GetBoundingBox()

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:

◆ SetGizmoSize()

ManipExport void SetGizmoSize ( int  gizmoSize)
Remarks
Sets size of the gizmo in pixels for kGizmoScaleToViewport gizmos.
Parameters:
int gizmoSize

The gizmo size in pixels.

Member Data Documentation

◆ kGizmoDontDisplay

ManipExport const DWORD kGizmoDontDisplay
static

◆ kGizmoDontHitTest

ManipExport const DWORD kGizmoDontHitTest
static

◆ kGizmoScaleToViewport

ManipExport const DWORD kGizmoScaleToViewport
static

◆ kGizmoUseRelativeScreenSpace

ManipExport const DWORD kGizmoUseRelativeScreenSpace
static

◆ kGizmoUseScreenSpace

ManipExport const DWORD kGizmoUseScreenSpace
static

◆ kGizmoActiveViewportOnly

ManipExport const DWORD kGizmoActiveViewportOnly
static

◆ kGizmoApplyUIScaling

ManipExport const DWORD kGizmoApplyUIScaling
static

◆ kDefaultGizmoSize

ManipExport const int kDefaultGizmoSize
static