3ds Max C++ API Reference
SubModSelectionProcessor Class Reference

#include <objmode.h>

+ Inheritance diagram for SubModSelectionProcessor:

Public Member Functions

 SubModSelectionProcessor (TransformModBox *mc, BaseObject *o, IObjParam *i)
 
BOOL SupportTransformGizmo ()
 Transform Gizmo Interface. More...
 
void DeactivateTransformGizmo ()
 Deactivates the transform gizmo. More...
 
void SetSupportTransformGizmo (BOOL b)
 
- Public Member Functions inherited from GenModSelectionProcessor
 GenModSelectionProcessor (MouseCallBack *mc, BaseObject *o, IObjParam *i)
 
- Public Member Functions inherited from SelectionProcessor
 SelectionProcessor (MouseCallBack *m, IObjParam *i)
 
virtual CoreExport int proc (HWND hwnd, int msg, int point, int flags, IPoint2 m)
 Called to handle the mouse event processing whenever a mouse event happens. More...
 
CoreExport void pan (IPoint2 d)
 
- Public Member Functions inherited from MouseCallBack
virtual ~MouseCallBack ()
 
virtual int override (int mode)
 Override the default drag mode. More...
 
void setMouseManager (MouseManager *mm)
 
MouseManagergetMouseManager ()
 
virtual BOOL SupportAutoGrid ()
 Returns FALSE by default, and needs to be overridden by the mouse procs wishing to utilize the AutoGrid feature. More...
 
virtual BOOL TolerateOrthoMode ()
 Returns FALSE by default. More...
 
- 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 ()
 

Protected Member Functions

HCURSOR GetTransformCursor ()
 
- Protected Member Functions inherited from GenModSelectionProcessor
CoreExport BOOL HitTest (ViewExp *vpt, IPoint2 *p, int type, int flags)
 
BOOL AnyHits (ViewExp *vpt)
 
CoreExport void Select (ViewExp *vpt, BOOL all, BOOL isclear, BOOL isInvert)
 
CoreExport void DeSelect (ViewExp *vpt, BOOL all)
 
CoreExport void ClearSelection ()
 
CoreExport void CloneSelected (int initialCall=TRUE)
 
CoreExport void AbortClone ()
 
CoreExport void AcceptClone ()
 
- Protected Member Functions inherited from SelectionProcessor
IPoint2Offset ()
 
virtual void SelectChildren (ViewExp *vpt)
 
virtual bool HasOverrideDoubleClickProc () const
 By default, SelectChildren(ViewExp*) will be called when double click message is triggered. More...
 
virtual void OverrideDoubleClickProc (ViewExp *vpt, int flags)
 Override double click handle function. More...
 

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 GenModSelectionProcessor
BaseObjectobj
 
BOOL transformGizmoActive
 
- Protected Attributes inherited from SelectionProcessor
IObjParamip
 
- Protected Attributes inherited from BaseInterfaceServer
Tab< BaseInterface * > interfaces
 

Constructor & Destructor Documentation

◆ SubModSelectionProcessor()

SubModSelectionProcessor ( TransformModBox mc,
BaseObject o,
IObjParam i 
)
inline
263  : GenModSelectionProcessor(mc,o,i) {
264  tproc = mc; supportTransformGizmo=FALSE; }
GenModSelectionProcessor(MouseCallBack *mc, BaseObject *o, IObjParam *i)
Definition: objmode.h:249

Member Function Documentation

◆ GetTransformCursor()

HCURSOR GetTransformCursor ( )
inlineprotectedvirtual

Implements SelectionProcessor.

259 { return tproc ? tproc->GetTransformCursor() : LoadCursor(NULL, IDC_ARROW); }
#define NULL
Definition: autoptr.h:18
virtual HCURSOR GetTransformCursor()=0

◆ SupportTransformGizmo()

BOOL SupportTransformGizmo ( )
inlinevirtual

Transform Gizmo Interface.

Returns TRUE if the mouse proc supports a transform gizmo, FALSE if not. This method and DeactivateTransformGizmo() are normally implemented by the selection processor and the existing mouse procs. However, special implementation is possible as well. For that, because the transform gizmo depends on the Command Mode, the MouseCallback itself decides if it supports the use of the transform gizmo or not. When the node axis (or transform gizmo) is redrawn, the system will ask the command mode's mouse proc whether or not it supports transform gizmos. If it does, it will draw a gizmo instead of the regular node axis. The same procedure happens with the main selection processor in 3ds Max. When the mouse is moved, the selection processor itself asks if the MouseCallback supports transform gizmos or not. If so, it will hit test the gizmo in a MOUSE_FREEMOVE or MOUSE_POINT message. If any of the transform gizmos hit test flags are passed into the mouse procs hit tester, the transform gizmo should be hit tested as well (using Interface::HitTestTransformGizmo()). The default Implementation of this function is {return FALSE;}. When hit testing the gizmo, different flags will be passed in:

  • HIT_TRANSFORMGIZMO is passed in on a MOUSE_FREEMOVE message so that the axis is hit tested and it highlights if it is hit, but it doesn't actually switch the transform mode.
  • In case of a MOUSE_POINT, the flag will be HIT_SWITCH_GIZMO, and if the axis is hit, the 'hit' transform mode will be pushed on the transform mode stack.
  • When the mouse is released (MOUSE_POINT, pt==1 or MOUSE_ABORT), then the axis constraint should pop back to the existing one, and DeactivateTransformGizmo() is called. Inside DeactivateTransformGizmo() the normal implementation is to pop the axis mode back. It should also maintain a flag (set it if HitTestTransformGizmo() returns TRUE and the HIT_SWITCH_GIZMO is set, and clear it in DeactivateTransformGizmo()). The flag is needed because you should not call Interface::PopAxisMode() unless the axis mode was previously popped.

Reimplemented from MouseCallBack.

267 { return supportTransformGizmo; }

◆ DeactivateTransformGizmo()

void DeactivateTransformGizmo ( )
inlinevirtual

Deactivates the transform gizmo.

See the note in SupportTransformGizmo().

Reimplemented from MouseCallBack.

268  {
269  if (transformGizmoActive) {
271  transformGizmoActive = FALSE;
272  }
273  }
BOOL transformGizmoActive
Definition: objmode.h:237
virtual void DeactivateTransformGizmo()=0
IObjParam * ip
Definition: objmode.h:151

◆ SetSupportTransformGizmo()

void SetSupportTransformGizmo ( BOOL  b)
inline
276 { supportTransformGizmo = b; }