3ds Max C++ API Reference
Loading...
Searching...
No Matches
GizmoShape Class Reference

#include <manipulator.h>

+ Inheritance diagram for GizmoShape:

Public Types

enum  { startNewLine , appendPoint , transform }
 
- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease , immediateRelease , wantsRelease , serverControlled }
 

Public Member Functions

ManipExport GizmoShape ()
 
ManipExport void StartNewLine ()
 
ManipExport void AppendPoint (const Point3 &p)
 
ManipExport PolyShapeGetPolyShape ()
 
ManipExport void Transform (Matrix3 &tm)
 
 VFN_0 (startNewLine, StartNewLine)
 
 VFN_1 (appendPoint, AppendPoint, TYPE_POINT3_BV)
 
 VFN_1 (transform, Transform, TYPE_MATRIX3_BV)
 
ManipExport FPInterfaceDescGetDesc ()
 
ManipExport LifetimeType LifetimeControl ()
 
ManipExport BaseInterfaceAcquireInterface ()
 
ManipExport void ReleaseInterface ()
 
- 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 BaseInterfaceGetInterface (Interface_ID id)
 
virtual FPInterfaceDescGetDesc ()=0
 
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.
 
UtilExport BaseInterfaceGetInterface (Interface_ID id) override
 
virtual UtilExport Interface_ID GetID ()
 
virtual LifetimeType LifetimeControl ()
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=nullptr)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 
- 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
 

Detailed Description

See also
Class SimpleManipulator, Class ISimpleManipulator, Class FPMixinInterface, Class PolyLine, Class PolyShape

Description:
This class represents the main gizmo shape.

The Function Publishing interface to SimpleManipulators is defined as:

#define MANIP_GIZMO_INTERFACE Interface_ID(0x124e3169, 0xf067ad4)

Data Members:
private:

PolyShape mPolyShape;

The gizmo polyshape.

PolyLine mLine;

A poly line.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
startNewLine 
appendPoint 
transform 
@ transform
Definition: manipulator.h:178
@ startNewLine
Definition: manipulator.h:178
@ appendPoint
Definition: manipulator.h:178

Constructor & Destructor Documentation

◆ GizmoShape()

ManipExport GizmoShape ( )
inline
Remarks
Constructor.
Default Implementation:
{ mLine.Init(); }
145{ mLine.Init(); }
CoreExport void Init()
Initializes the PolyLine.

Member Function Documentation

◆ StartNewLine()

ManipExport void StartNewLine ( )
inline
Remarks
This method instructs the gizmo shape to start (append) a new line segment.
149 {
150 if (mLine.numPts > 0)
151 mPolyShape.Append(mLine);
152 mLine.Init();
153 }
int numPts
The number of points in the polyline.
Definition: polyshp.h:210
CoreExport void Append(PolyLine &l)
Appends the specified PolyLine to the end of the lines list.

◆ AppendPoint()

ManipExport void AppendPoint ( const Point3 p)
inline
Remarks
This method instructs the gizmo shape to append a new point to the line segment.
Parameters:
Point3& p

The vertex point to add.
159 {
160 mLine.Append(PolyPt(p));
161 }
CoreExport void Append(const PolyPt &p)
Appends the specified point to the polyline.
Represents a single point of a PolyLine.
Definition: polyshp.h:141

◆ GetPolyShape()

ManipExport PolyShape * GetPolyShape ( )
inline
Remarks
This method returns a pointer to the gizmo's poly shape.
164 {
165 if (mLine.numPts > 0)
166 mPolyShape.Append(mLine);
167 mLine.Init();
168 return &mPolyShape;
169 }

◆ Transform()

ManipExport void Transform ( Matrix3 tm)
Remarks
This method allows you to transform the gizmo shape.
Parameters:
Matrix3& tm

The transformation matrix.

◆ VFN_0()

VFN_0 ( startNewLine  ,
StartNewLine   
)

◆ VFN_1() [1/2]

VFN_1 ( appendPoint  ,
AppendPoint  ,
TYPE_POINT3_BV   
)

◆ VFN_1() [2/2]

VFN_1 ( transform  ,
Transform  ,
TYPE_MATRIX3_BV   
)

◆ GetDesc()

ManipExport FPInterfaceDesc * GetDesc ( )
virtual
Remarks
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

◆ LifetimeControl()

ManipExport LifetimeType LifetimeControl ( )
inlinevirtual
Remarks
This method allows inquiries into the actual lifetime policy of a client and provide a server-controlled delete notify callback.
Returns
One of the following LifetimeTypes:

noRelease

Do not call release, use interface as long as you like. This is the default.

immediateRelease

The interface is only good for one call. The release is implied so a call to release is not required.

wantsRelease

The clients are controlling the lifetime, so the interface needs a Release() when the client has finished.

serverControlled

The server controls the lifetime and will use the InterfaceNotifyCallback to inform the code when it is gone.
Default Implementation:
{ return noRelease; }

Reimplemented from FPMixinInterface.

189{ return wantsRelease; }
@ wantsRelease
Definition: baseinterface.h:104

◆ AcquireInterface()

ManipExport BaseInterface * AcquireInterface ( )
inlinevirtual
Remarks
This method is part of the interface reference management and can be implemented by dynamically allocated interfaces for ref-count based lifetime control). This method should return TRUE if it needs Release() to be called.
Default Implementation:
{ return false; }

Reimplemented from BaseInterface.

190{ return this; }

◆ ReleaseInterface()

ManipExport void ReleaseInterface ( )
virtual
Remarks
This method is called when a reference to this object is deleted.
Default Implementation:
{ }

Reimplemented from BaseInterface.