3ds Max C++ API Reference
Loading...
Searching...
No Matches
manipulator.h File Reference
#include "iparamb2.h"
#include "iFnPub.h"
#include "polyshp.h"
#include "object.h"
#include "gfx.h"
#include "icolorman.h"

Classes

class  Plane
 
class  GizmoShape
 
class  IManipulatorMgr
 
class  Manipulator
 
class  ManipulatorGizmo
 
class  ISimpleManipulator
 
class  SimpleManipulator
 
class  ManipHitData
 This is a special storage class for hit records that keep track of which manipulator was hit. More...
 
class  SimpleManipHitData
 

Macros

#define ManipExport   __declspec(dllimport)
 
#define MANIP_PLANE_INTERFACE   Interface_ID(0x44460ea4, 0xbf73be6)
 
#define MANIP_GIZMO_INTERFACE   Interface_ID(0x124e3169, 0xf067ad4)
 
#define MANIP_MGR_INTERFACE   Interface_ID(0x2c450aa2, 0x7b9d0365)
 
#define SIMPLE_MANIP_INTERFACE   Interface_ID(0x617c41d4, 0x6af06a5f)
 

Enumerations

enum  DisplayState { kNoRedrawNeeded , kFullRedrawNeeded , kPostRedrawNeeded }
 
enum  MouseState { kMouseIdle , kMouseDragging , kMouseOverManip }
 

Functions

ManipExport MeshMakeSphere (const Point3 &pos, float radius, int segments)
 
ManipExport MeshMakeTorus (const Point3 &pos, float radius, float radius2, int segs, int sides)
 
ManipExport MeshMakeBox (const Point3 &pos, float l, float w, float h, int lsegs, int wsegs, int hsegs)
 
ManipExport void AddCubeShape (PolyShape &shape, const Point3 &pos, float size)
 

Macro Definition Documentation

◆ ManipExport

#define ManipExport   __declspec(dllimport)

◆ MANIP_PLANE_INTERFACE

#define MANIP_PLANE_INTERFACE   Interface_ID(0x44460ea4, 0xbf73be6)

◆ MANIP_GIZMO_INTERFACE

#define MANIP_GIZMO_INTERFACE   Interface_ID(0x124e3169, 0xf067ad4)

◆ MANIP_MGR_INTERFACE

#define MANIP_MGR_INTERFACE   Interface_ID(0x2c450aa2, 0x7b9d0365)

◆ SIMPLE_MANIP_INTERFACE

#define SIMPLE_MANIP_INTERFACE   Interface_ID(0x617c41d4, 0x6af06a5f)

Enumeration Type Documentation

◆ DisplayState

Enumerator
kNoRedrawNeeded 
kFullRedrawNeeded 
kPostRedrawNeeded 
@ kFullRedrawNeeded
Definition: manipulator.h:30
@ kPostRedrawNeeded
Definition: manipulator.h:30
@ kNoRedrawNeeded
Definition: manipulator.h:30

◆ MouseState

enum MouseState
Enumerator
kMouseIdle 
kMouseDragging 
kMouseOverManip 
1035 {
1036 kMouseIdle,
1039};
@ kMouseOverManip
Definition: manipulator.h:1038
@ kMouseIdle
Definition: manipulator.h:1036
@ kMouseDragging
Definition: manipulator.h:1037

Function Documentation

◆ MakeSphere()

ManipExport Mesh * MakeSphere ( const Point3 pos,
float  radius,
int  segments 
)
Remarks
This global function is available in release 4.0 and later only.

Creates a new mesh sphere at the given center position with the specified radius and segments count.
Parameters:
Point3& pos

The center point for the sphere in object space.

float radius

The radius for the sphere.

int segments

The number of segments for the sphere mesh.
Returns
A pointer to the sphere mesh. Developers are responsible for deleting this mesh when done.

◆ MakeTorus()

ManipExport Mesh * MakeTorus ( const Point3 pos,
float  radius,
float  radius2,
int  segs,
int  sides 
)
Remarks
This global function is available in release 4.0 and later only.

Create a mesh torus with the given center point, outer radius, inner radius, and segment counts along the two circular dimensions of the torus.
Parameters:
Point3& pos

The center point in object space.

float radius

The first radius.

float radius2

The second radius.

int segs

The segment count along the vertical circular dimension.

int sides

The segment count along the horizontal circular dimension.
Returns
A pointer to the torus mesh created. Developers are responsible for deleting this mesh when done with it.

◆ MakeBox()

ManipExport Mesh * MakeBox ( const Point3 pos,
float  l,
float  w,
float  h,
int  lsegs,
int  wsegs,
int  hsegs 
)
Remarks
This global function is available in release 4.0 and later only.

Creates a mesh box with the given center point, length, width and height as well as segment parameters.
Parameters:
Point3& pos

The box is built from this position in size along +X, +Y and +Z. This coordinate is in object space.

float l

The length of the box.

float w

The width of the box.

float h

The height of the box.

int lsegs

The number of segments in the length dimension.

int wsegs

The number of segments in the width dimension.

int hsegs

The number of segments in the height dimension.
Returns
A pointer to the box mesh. Developers are responsible for deleting this mesh when done.

◆ AddCubeShape()

ManipExport void AddCubeShape ( PolyShape shape,
const Point3 pos,
float  size 
)
Remarks
This global function is available in release 4.0 and later only.

Creates a new series of lines in the form of a cube and adds it to the specified PolyShape with the given position and side length size.
Parameters:
PolyShape& shape

The PolyShape to add the box shape to.

Point3& pos

The position for the center of the cube shape in object space.

float size

The size of one side of the cube in object space.
Data Members:
protected:

int mDispSelectedIndex;

The Index of manipulator that the mouse is over, for display.

MSTR mToolTip;

The tooltip text.

float mGizmoScale;

The scaling factor of the gizmo.

IParamBlock2 *mpPblock;

The Parameter Block 2 for the manipulator.

RefTargetHandle mhTarget;

The handle to the manipulator reference target.

MouseState mState;

The state of the mouse, which is one of the following:

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.

BOOL mActiveViewOnly;

This flag defines whether the manipulator is shown in the active viewport only.

Interval mValid;

The validity interval of the reference.