ALBA
|
#include <albaGizmoTranslate.h>
Public Member Functions | |
albaGizmoTranslate (albaVME *input, albaObserver *listener=NULL, bool BuildGUI=true) | |
virtual | ~albaGizmoTranslate () |
void | SetInput (albaVME *vme) |
void | SetRenderWindowHeightPercentage (double percentage) |
void | SetAutoscale (bool autoscale) |
void | SetAlwaysVisible (bool alwaysVisible) |
void | OnEvent (albaEventBase *alba_event) |
void | Show (bool show) |
void | Show (bool showX, bool showY, bool showZ) |
void | SetAbsPose (albaMatrix *absPose, albaTimeStamp ts=-1) |
albaMatrix * | GetAbsPose () |
void | SetRefSys (albaVME *refSys) |
albaVME * | GetRefSys () |
albaGUI * | GetGui () |
void | SetConstraintModality (int axis, int constrainModality) |
int | GetConstraintModality (int axis) |
void | SetStep (int axis, double step) |
int | GetStep (int axis) |
Public Member Functions inherited from albaGizmoInterface | |
void | SetName (albaString name) |
albaString | GetName () |
virtual void | SetInput (albaVME *vme) |
albaVME * | GetInput () |
void | SetMediator (albaObserver *mediator) |
albaObserver * | GetMediator () |
void | SetAutoscale (bool autoscale) |
bool | GetAutoscale () |
void | SetRenderWindowHeightPercentage (double percentage) |
double | GetRenderWindowHeightPercentage () |
void | SetAlwaysVisible (bool alwaysVisible) |
bool | GetAlwaysVisible () |
void | SetListener (albaObserver *listener) |
albaObserver * | GetListener () |
virtual void | OnEvent (albaEventBase *alba_event) |
virtual void | Show (bool show) |
void | SetModalityToLocal () |
void | SetModalityToGlobal () |
int | GetModality () |
virtual void | SetAbsPose (albaMatrix *absPose) |
virtual albaMatrix * | GetAbsPose () |
virtual albaGUI * | GetGui () |
Public Member Functions inherited from albaObserver | |
albaObserver () | |
virtual | ~albaObserver () |
virtual void | OnEvent (albaEventBase *e)=0 |
Protected Types | |
enum | AXIS { X = 0 , Y , Z } |
enum | PLANE { XNORMAL = 0 , YNORMAL , ZNORMAL } |
enum | ACTIVE_COMPONENT { NONE = -1 , X_AXIS = 0 , Y_AXIS , Z_AXIS , XN_PLANE , YN_PLANE , ZN_PLANE } |
Protected Member Functions | |
void | OnEventGizmoGui (albaEventBase *alba_event) |
void | OnEventGizmoComponents (albaEventBase *alba_event) |
void | Highlight (int component) |
void | SendTransformMatrixFromGui (albaEventBase *alba_event) |
Protected Member Functions inherited from albaGizmoInterface | |
albaGizmoInterface () | |
virtual | ~albaGizmoInterface () |
void | SendTransformMatrix (albaMatrix *matrix, int eventId, long arg) |
virtual void | OnEventGizmoGui (albaEventBase *alba_event) |
virtual void | OnEventGizmoComponents (albaEventBase *alba_event) |
Protected Attributes | |
albaGUIGizmoTranslate * | m_GuiGizmoTranslate |
albaGizmoTranslateAxis * | m_GTAxis [3] |
albaGizmoTranslatePlane * | m_GTPlane [3] |
int | m_ActiveGizmoComponent |
albaMatrix * | m_PivotPose |
bool | m_BuildGUI |
int | m_ConstraintModality [3] |
int | m_Step [3] |
Protected Attributes inherited from albaGizmoInterface | |
albaObserver * | m_Mediator |
albaString | m_Name |
albaVME * | m_InputVME |
int | m_Modality |
albaObserver * | m_Listener |
albaVME * | m_RefSysVME |
bool | m_Visibility |
double | m_RenderWindowHeightPercentage |
bool | m_AlwaysVisible |
bool | m_Autoscale |
Friends | |
class | albaGizmoTranslateTest |
Additional Inherited Members | |
Public Types inherited from albaGizmoInterface | |
enum | MODALITY { G_LOCAL = 0 , G_GLOBAL } |
Gizmo used to perform constrained translation along the x, yz axis or the xy, xz, yz plane.
This class create a translation gizmo composed of:
3 albaGizmoTranslateAxis 3 albaGizmoTranslatePlane
z ^ S2 | ----- | | | + SQ |S1 = | | x--------> y
3 x albaGizmoTranslateAxis 3 x albaGizmoTranslatePlane (single axis translation (single plane translation constrain) constrain)
^ |----- | |
= | |
| |
-----—>
and forward pose matrixes to the listener operation.
This object works by creating smaller components that are parented to the vme tree root ie works in global coordinates. in order to use it in your client create an instance of it and concatenate in post multiply modality matrix that this object is sending to the the vme you want to move.
Definition at line 80 of file albaGizmoTranslate.h.
|
protected |
|
protected |
Enumerator | |
---|---|
XNORMAL | |
YNORMAL | |
ZNORMAL |
Definition at line 157 of file albaGizmoTranslate.h.
|
protected |
Enumerator | |
---|---|
NONE | |
X_AXIS | |
Y_AXIS | |
Z_AXIS | |
XN_PLANE | |
YN_PLANE | |
ZN_PLANE |
Definition at line 158 of file albaGizmoTranslate.h.
albaGizmoTranslate::albaGizmoTranslate | ( | albaVME * | input, |
albaObserver * | listener = NULL , |
||
bool | BuildGUI = true |
||
) |
|
virtual |
|
virtual |
Set input vme for the gizmo.
Reimplemented from albaGizmoInterface.
void albaGizmoTranslate::SetRenderWindowHeightPercentage | ( | double | percentage | ) |
Superclass override.
void albaGizmoTranslate::SetAutoscale | ( | bool | autoscale | ) |
Superclass override.
void albaGizmoTranslate::SetAlwaysVisible | ( | bool | alwaysVisible | ) |
Superclass override.
|
virtual |
Events handling.
Reimplemented from albaGizmoInterface.
|
virtual |
Show the gizmo.
Reimplemented from albaGizmoInterface.
void albaGizmoTranslate::Show | ( | bool | showX, |
bool | showY, | ||
bool | showZ | ||
) |
Show the gizmo.
void albaGizmoTranslate::SetAbsPose | ( | albaMatrix * | absPose, |
albaTimeStamp | ts = -1 |
||
) |
Set/Get the gizmo pose.
|
virtual |
Get the gizmo abs pose.
Reimplemented from albaGizmoInterface.
void albaGizmoTranslate::SetRefSys | ( | albaVME * | refSys | ) |
Set the vme to be used as reference system, the vme is referenced; default ref sys is vme abs matrix.
albaVME * albaGizmoTranslate::GetRefSys | ( | ) |
|
inlinevirtual |
Return gui owned by the gizmo.
Reimplemented from albaGizmoInterface.
Definition at line 132 of file albaGizmoTranslate.h.
void albaGizmoTranslate::SetConstraintModality | ( | int | axis, |
int | constrainModality | ||
) |
Set the constraint modality for the given axis; allowed constraint modality are: LOCK, FREE, BOUNDS, SNAP_STEP, SNAP_ARRAY defined in albaInteractorConstraint.
int albaGizmoTranslate::GetConstraintModality | ( | int | axis | ) |
void albaGizmoTranslate::SetStep | ( | int | axis, |
double | step | ||
) |
Set the step value for snap step constraint type for the given axis.
int albaGizmoTranslate::GetStep | ( | int | axis | ) |
|
protectedvirtual |
Gizmo components events handling.
Reimplemented from albaGizmoInterface.
|
protectedvirtual |
Gizmo components events handling.
Reimplemented from albaGizmoInterface.
|
protected |
Highlight one component and dehighlight other components.
|
protected |
Send matrix to postmultiply to listener.
|
friend |
test friend
Definition at line 185 of file albaGizmoTranslate.h.
|
protected |
Definition at line 146 of file albaGizmoTranslate.h.
|
protected |
Array holding the three gizmo that performs translation on a vector.
Definition at line 165 of file albaGizmoTranslate.h.
|
protected |
Array holding the three gizmo that performs translation on a plane.
Definition at line 168 of file albaGizmoTranslate.h.
|
protected |
Register the active gizmo component at MOUSE_DOWN.
Definition at line 172 of file albaGizmoTranslate.h.
|
protected |
Pivot point position;.
Definition at line 176 of file albaGizmoTranslate.h.
|
protected |
Build Gizmo GUI.
Definition at line 182 of file albaGizmoTranslate.h.
|
protected |
register axis constraint modality
Definition at line 188 of file albaGizmoTranslate.h.
|
protected |
register step on axes
Definition at line 191 of file albaGizmoTranslate.h.