Public Member Functions | Protected Member Functions

SubControlSelectionProcessor Class Reference

Search for all occurrences

#include <objmode.h>

Inheritance diagram for SubControlSelectionProcessor:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  SubControlSelectionProcessor (TransformCtrlApparatus *tc, Control *c, IObjParam *i)
BOOL  SupportTransformGizmo ()
  Transform Gizmo Interface.
void  DeactivateTransformGizmo ()
  Deactivates the transform gizmo.
void  SetSupportTransformGizmo (BOOL b)

Protected Member Functions

HCURSOR  GetTransformCursor ()

Constructor & Destructor Documentation

            : GenControlSelectionProcessor(tc,c,i) { 
                tproc = tc; supportTransformGizmo=FALSE; }

Member Function Documentation

HCURSOR GetTransformCursor ( ) [inline, protected, virtual]
BOOL SupportTransformGizmo ( ) [inline, virtual]

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.

{ return supportTransformGizmo; }
void DeactivateTransformGizmo ( ) [inline, virtual]

Deactivates the transform gizmo.

See the note in SupportTransformGizmo().

Reimplemented from MouseCallBack.

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

SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor
SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor SubControlSelectionProcessor