IWorkingPivot Class Reference

IWorkingPivot Class Referenceabstract

#include <IWorkingPivot.h>

Class Description

The interface to the functionality for using the Working Pivot.

This class contains key functionality for using the working pivot. You get this interface by calling GetIWorkingPivot().

+ Inheritance diagram for IWorkingPivot:

Public Member Functions

Use Mode Functions
virtual void SetUseMode (BOOL use)=0
 This function will put us in and out of the mode where the working pivot becomes the pivot for all objects in the scene. More...
 
virtual BOOL GetUseMode () const =0
 This function returns whether or not we are using the working pivot transform space, thus whether or not the working pivot is the pivot for all of the objects in the scene. More...
 
Edit Mode Functions
virtual void SetEditMode (BOOL edit)=0
 This function will put us in a mode where we can edit and move the working pivots location. More...
 
virtual BOOL GetEditMode () const =0
 This function gets whether or not we are in the mode where we can edit the working pivot. More...
 
virtual void SetPlacePivotViewMode (BOOL place, BOOL alignToView)=0
 This function puts us in a command mode where any click in the viewport will automatically move the working pivot to that position in screen space. More...
 
virtual BOOL GetPlacePivotViewMode () const =0
 This function returns whether or not we are in the place pivot command mode. More...
 
virtual void SetPlacePivotSurfaceMode (BOOL place, BOOL alignToView)=0
 This function puts us in a command mode where we will place the working pivot onto any surface in the scene, including grids. More...
 
virtual BOOL GetPlacePivotSurfaceMode () const =0
 This function returns whether or not we are in the place pivot on the auto grid command mode. More...
 
virtual BOOL GetPlacePivotAlignToView () const =0
 This function returns whether or not when we are in a place pivot mode if we are also aligning to the view. More...
 
Working-Pivot Option Functions
virtual void SetPinWorkingPivot (BOOL pin)=0
 This function sets the "Pin Working Pivot" option. More...
 
virtual BOOL GetPinWorkingPivot () const =0
 This function returns whether or not when we are using the Pin Working Pivot option. More...
 
Transform Functions
virtual void SetTM (Matrix3 &mat)=0
 This functions sets the world space transform of the working pivot. More...
 
virtual Matrix3 GetTM () const =0
 This function gets the world space transofrm of the working pivot. More...
 
Display Functions
virtual void SetAxisSize (float size)=0
 This function sets the axis display size of the working pivot when it's displayed when in use or being edited. More...
 
virtual float GetAxisSize () const =0
 This function gets the axis display size of the working pivot when it's displayed when in use or being edited. More...
 
virtual void SetShowCaddyEdit (BOOL show)=0
 This function sets whether the caddy will be displayed while in Edit mode. More...
 
virtual BOOL GetShowCaddyEdit () const =0
 This function gets the whether the caddy will be displayed while in Edit mode. More...
 
virtual void SetShowCaddyPlace (BOOL show)=0
 This function sets whether the caddy will be displayed while in Place mode. More...
 
virtual BOOL GetShowCaddyPlace () const =0
 This function gets the whether the caddy will be displayed while in Place mode. More...
 
Transformation Convenience Functions
virtual void AlignToView ()=0
 This function aligns the working pivot transform to the that of the active viewport. More...
 
virtual void ResetTM ()=0
 This function allows you to reset the working pivot's transform so that it matches that of the current selection. More...
 
virtual void ResetTM (INode *node)=0
 This function allows you to reset the working pivot's transform so that it matches that of a selected node that's passed in as a parameter. More...
 
FileIO (Internal Use Only)
virtual IOResult Save (ISave *iSave)=0
 Used internally. More...
 
virtual IOResult Load (ILoad *iLoad)=0
 Used internally. More...
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
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)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 
- 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...
 
- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClass * pc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Member Function Documentation

virtual void SetUseMode ( BOOL  use)
pure virtual

This function will put us in and out of the mode where the working pivot becomes the pivot for all objects in the scene.

Parameters
[in]useIf TRUE and we aren't using the working pivot transform space we do so, if FALSE and we are using the working pivot transform space then we stop. !
virtual BOOL GetUseMode ( ) const
pure virtual

This function returns whether or not we are using the working pivot transform space, thus whether or not the working pivot is the pivot for all of the objects in the scene.

Returns
Returns TRUE if we are using the working pivot transform space, FALSE otherwise. !
virtual void SetEditMode ( BOOL  edit)
pure virtual

This function will put us in a mode where we can edit and move the working pivots location.

While in this mode we can only transform the working pivot and not any other objects in the max scene.

Parameters
[in]editIf TRUE we enter a mode to transform the working pivot, if FALSE we leave the working pivot edit mode. !
virtual BOOL GetEditMode ( ) const
pure virtual

This function gets whether or not we are in the mode where we can edit the working pivot.

!\ return Return TRUE if we are in the mode where we can edit the working pivot, otherwise return FALSE. !

virtual void SetPlacePivotViewMode ( BOOL  place,
BOOL  alignToView 
)
pure virtual

This function puts us in a command mode where any click in the viewport will automatically move the working pivot to that position in screen space.

Parameters
placeIf TRUE and not in the place pivot view command mode then we enter the place pivot view command mode, if FALSE and we are in the place pivot view command mode then we exit that mode. Note that we aren't in the edit working pivot mode when entering this mode we enter edit working pivot mode automatically and then if we exit in this case we also turn off edit working pivot mode.
alignToViewIf TRUE and we are entering this mode then when we place the pivot it also automatically aligns to the current view of the viewport when you click. Also note that in this case it also sets the Align To View toggle in the 'Place Pivot To:' group in the Hierarchy panel. !
virtual BOOL GetPlacePivotViewMode ( ) const
pure virtual

This function returns whether or not we are in the place pivot command mode.

Returns
Returns TRUE if we are in the place pivot command mode, otherwise returns FALSE. Note that we will never be in the place pivot mode if not also in the edit working pivot mode. !
virtual void SetPlacePivotSurfaceMode ( BOOL  place,
BOOL  alignToView 
)
pure virtual

This function puts us in a command mode where we will place the working pivot onto any surface in the scene, including grids.

Parameters
placeIf TRUE and not in the place pivot on a surface command mode then we enter the place pivot on a surface command mode, if FALSE and we are in this command mode then we exit this mode. Note that we aren't in the edit working pivot mode when entering this mode then we enter edit working pivot mode automatically and then if we exit in this case we also turn off edit working pivot mode.
alignToViewIf TRUE and we are entering this mode then when we place the pivot by clicking it also automatically aligns to the current view of the viewport when you click. Also note that in this case it also sets the Align To View toggle in the 'Place Pivot To:' group in the Hierarchy panel. !
virtual BOOL GetPlacePivotSurfaceMode ( ) const
pure virtual

This function returns whether or not we are in the place pivot on the auto grid command mode.

Returns
Returns TRUE if we are in the place pivot on the auto grid command mode, otherwise returns FALSE. Note that we will never be in the place pivot on the auto grid mode if not also in the edit working pivot mode. !
virtual BOOL GetPlacePivotAlignToView ( ) const
pure virtual

This function returns whether or not when we are in a place pivot mode if we are also aligning to the view.

Returns
Returns TRUE if we are in a place pivot mode and we are aligning to the view, otherwise if we aren't in a place pivot mode or we are but we aren't aligning to the view it returns FALSE. !
virtual void SetPinWorkingPivot ( BOOL  pin)
pure virtual

This function sets the "Pin Working Pivot" option.

!

virtual BOOL GetPinWorkingPivot ( ) const
pure virtual

This function returns whether or not when we are using the Pin Working Pivot option.

Returns
Returns TRUE if the Pin Working Pivot is turned on, returns FALSE otherwise. !
virtual void SetTM ( Matrix3 mat)
pure virtual

This functions sets the world space transform of the working pivot.

When using the working pivot this will be the location about which pivoting will occur, and when editing the working pivot this is the location of where the pivot is when the mode is entered and exited.

Parameters
[in]matThe world space location of the working pivot. !
virtual Matrix3 GetTM ( ) const
pure virtual

This function gets the world space transofrm of the working pivot.

When using the working pivot this will be the location about which pivoting will occur, and when editing the working pivot this is the location of where the pivot is when the mode is entered and exited.

Returns
Returns the world space location of the working pivot. !
virtual void SetAxisSize ( float  size)
pure virtual

This function sets the axis display size of the working pivot when it's displayed when in use or being edited.

Parameters
sizeThe length of each working pivot axis in 3ds Max units. !
virtual float GetAxisSize ( ) const
pure virtual

This function gets the axis display size of the working pivot when it's displayed when in use or being edited.

Returns
Returns the length of each working pivot axis in 3ds Max units. !
virtual void SetShowCaddyEdit ( BOOL  show)
pure virtual

This function sets whether the caddy will be displayed while in Edit mode.

!

virtual BOOL GetShowCaddyEdit ( ) const
pure virtual

This function gets the whether the caddy will be displayed while in Edit mode.

!

virtual void SetShowCaddyPlace ( BOOL  show)
pure virtual

This function sets whether the caddy will be displayed while in Place mode.

!

virtual BOOL GetShowCaddyPlace ( ) const
pure virtual

This function gets the whether the caddy will be displayed while in Place mode.

!

virtual void AlignToView ( )
pure virtual

This function aligns the working pivot transform to the that of the active viewport.

It does this by changing the rotation of the working pivot transform to match the rotation of the active viewport. Note that this function does nothing if we aren't in the edit or use working pivot modes. !

virtual void ResetTM ( )
pure virtual

This function allows you to reset the working pivot's transform so that it matches that of the current selection.

After this function is called, the working pivots world space transformation will equal that of the current selection. Also note that this function does nothing if we aren't in the edit or use working pivot modes. !

virtual void ResetTM ( INode node)
pure virtual

This function allows you to reset the working pivot's transform so that it matches that of a selected node that's passed in as a parameter.

Parameters
nodeThe node whose world space transform the working pivot's transofrm will get set equal to. If the node is NULL, or if we aren't in the edit or use working pivot modes, then nothing will happen. Finally, the working pivot will match up with the node transform, not the object trnasform. !
virtual IOResult Save ( ISave iSave)
pure virtual

Used internally.

virtual IOResult Load ( ILoad iLoad)
pure virtual

Used internally.