ALBA
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
albaGizmoROI Class Reference

#include <albaGizmoROI.h>

Inheritance diagram for albaGizmoROI:
Inheritance graph
[legend]
Collaboration diagram for albaGizmoROI:
Collaboration graph
[legend]

Public Member Functions

 albaGizmoROI (albaVME *input, albaObserver *listener=NULL, int constraintModality=albaGizmoHandle::BOUNDS, albaVME *parent=NULL, bool showShadingPlane=false)
 
virtual ~albaGizmoROI ()
 
virtual void SetInput (albaVME *vme)
 
virtual void OnEvent (albaEventBase *alba_event)
 
void Highlight (int component)
 
void HighlightOff ()
 
void Show (bool show)
 
void ShowHandles (bool show)
 
void ShowShadingPlane (bool show)
 
void ShowROI (bool show)
 
void SetConstrainRefSys (albaMatrix *constrain)
 
void SetBounds (double bounds[6])
 
double * GetBounds ()
 
void GetBounds (double bounds[6])
 
void Reset ()
 
void EnableMinimumHandleSize (bool value)
 
void SetMinimumHandleSize (double value)
 
void EnableMinimumDistanceBetweenGizmo (bool value)
 
- Public Member Functions inherited from albaGizmoInterface
void SetName (albaString name)
 
albaString GetName ()
 
virtual void SetInput (albaVME *vme)
 
albaVMEGetInput ()
 
void SetMediator (albaObserver *mediator)
 
albaObserverGetMediator ()
 
void SetAutoscale (bool autoscale)
 
bool GetAutoscale ()
 
void SetRenderWindowHeightPercentage (double percentage)
 
double GetRenderWindowHeightPercentage ()
 
void SetAlwaysVisible (bool alwaysVisible)
 
bool GetAlwaysVisible ()
 
void SetListener (albaObserver *listener)
 
albaObserverGetListener ()
 
virtual void OnEvent (albaEventBase *alba_event)
 
virtual void Show (bool show)
 
void SetModalityToLocal ()
 
void SetModalityToGlobal ()
 
int GetModality ()
 
virtual void SetAbsPose (albaMatrix *absPose)
 
virtual albaMatrixGetAbsPose ()
 
virtual albaGUIGetGui ()
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 

Protected Member Functions

void Highlight (int component, bool highlight)
 
void UpdateHandlePositions ()
 
void UpdateOutlineBounds ()
 
virtual void UpdateGizmosLength ()
 
void OnEventGizmoComponents (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

int m_ActiveGizmoComponent
 
int m_ConstraintModality
 
albaGizmoHandlem_GHandle [6]
 
double m_Center [6][3]
 
albaGizmoBoundingBoxm_OutlineGizmo
 
double m_Accumulator
 
double m_MinimumHandleSize
 
bool m_EnableMinimumHandleSize
 
bool m_EnableMinimumDistanceBetweenGizmo
 
- Protected Attributes inherited from albaGizmoInterface
albaObserverm_Mediator
 
albaString m_Name
 
albaVMEm_InputVME
 
int m_Modality
 
albaObserverm_Listener
 
albaVMEm_RefSysVME
 
bool m_Visibility
 
double m_RenderWindowHeightPercentage
 
bool m_AlwaysVisible
 
bool m_Autoscale
 

Friends

class albaGizmoROITest
 

Additional Inherited Members

- Public Types inherited from albaGizmoInterface
enum  MODALITY { G_LOCAL = 0 , G_GLOBAL }
 

Detailed Description

  5                   5

| | | | | | | | 0| 3 |1 3| 1 |2 | | | |
|_________| |_________| 4 4 Z Z ^ ^ | | ->X ->Y


  3

| | | | 0| 5 |1 | | |_________| 2 Y ^ | ->X

Gizmo composed of 6 albaGizmoHandle and 1 albaGizmoBoundingBox used to select a region of interest.

This object works by creating smaller components that are parented to the input vme ie works in local coordinates. In order to use it in your client create an instance of it and ask for the region of interest.

See also
albaGizmoHandle albaGizmoBoundingBox

Definition at line 77 of file albaGizmoROI.h.

Constructor & Destructor Documentation

◆ albaGizmoROI()

albaGizmoROI::albaGizmoROI ( albaVME input,
albaObserver listener = NULL,
int  constraintModality = albaGizmoHandle::BOUNDS,
albaVME parent = NULL,
bool  showShadingPlane = false 
)

◆ ~albaGizmoROI()

virtual albaGizmoROI::~albaGizmoROI ( )
virtual

Member Function Documentation

◆ SetInput()

virtual void albaGizmoROI::SetInput ( albaVME vme)
virtual

Set input vme for the gizmo.

Reimplemented from albaGizmoInterface.

◆ OnEvent()

virtual void albaGizmoROI::OnEvent ( albaEventBase alba_event)
virtual

Events handling.

Reimplemented from albaGizmoInterface.

◆ Highlight() [1/2]

void albaGizmoROI::Highlight ( int  component)

Highlight the given component and set highlight to false for the others.

◆ HighlightOff()

void albaGizmoROI::HighlightOff ( )

Set highlight to false for all gizmo components.

◆ Show()

void albaGizmoROI::Show ( bool  show)
virtual

Show the gizmo.

Reimplemented from albaGizmoInterface.

◆ ShowHandles()

void albaGizmoROI::ShowHandles ( bool  show)

Show gizmo handles.

◆ ShowShadingPlane()

void albaGizmoROI::ShowShadingPlane ( bool  show)

Show shading planes.

◆ ShowROI()

void albaGizmoROI::ShowROI ( bool  show)

Show gizmo cube.

◆ SetConstrainRefSys()

void albaGizmoROI::SetConstrainRefSys ( albaMatrix constrain)

Set the constrain ref sys.

◆ SetBounds()

void albaGizmoROI::SetBounds ( double  bounds[6])

Set/Get the gizmo bounds.

◆ GetBounds() [1/2]

double * albaGizmoROI::GetBounds ( )

◆ GetBounds() [2/2]

void albaGizmoROI::GetBounds ( double  bounds[6])

◆ Reset()

void albaGizmoROI::Reset ( )

Reset the gizmo.

◆ EnableMinimumHandleSize()

void albaGizmoROI::EnableMinimumHandleSize ( bool  value)
inline

Minimum handles size.

Definition at line 123 of file albaGizmoROI.h.

◆ SetMinimumHandleSize()

void albaGizmoROI::SetMinimumHandleSize ( double  value)
inline

Definition at line 124 of file albaGizmoROI.h.

◆ EnableMinimumDistanceBetweenGizmo()

void albaGizmoROI::EnableMinimumDistanceBetweenGizmo ( bool  value)
inline

Definition at line 125 of file albaGizmoROI.h.

◆ Highlight() [2/2]

void albaGizmoROI::Highlight ( int  component,
bool  highlight 
)
protected

Highlight one component of the gizmo and turn off the highlight others; setting highlight to false it is turned off to all gizmos' components.

◆ UpdateHandlePositions()

void albaGizmoROI::UpdateHandlePositions ( )
protected

After one handle movement recenter other handles.

◆ UpdateOutlineBounds()

void albaGizmoROI::UpdateOutlineBounds ( )
protected

Update gizmo outline bounds based on handles position.

This method must be called each time a gizmo handle is moved

◆ UpdateGizmosLength()

virtual void albaGizmoROI::UpdateGizmosLength ( )
protectedvirtual

Update the gizmos length.

This function determines how Gizmos will be resized while moving. Superclasses should redefine this in order to change the way gizmos are resized.

◆ OnEventGizmoComponents()

void albaGizmoROI::OnEventGizmoComponents ( albaEventBase alba_event)
protectedvirtual

Process events from gizmo components.

Reimplemented from albaGizmoInterface.

Friends And Related Function Documentation

◆ albaGizmoROITest

friend class albaGizmoROITest
friend

friend test

Definition at line 163 of file albaGizmoROI.h.

Member Data Documentation

◆ m_ActiveGizmoComponent

int albaGizmoROI::m_ActiveGizmoComponent
protected

Register the active gizmo component at MOUSE_DOWN.

Definition at line 133 of file albaGizmoROI.h.

◆ m_ConstraintModality

int albaGizmoROI::m_ConstraintModality
protected

Definition at line 150 of file albaGizmoROI.h.

◆ m_GHandle

albaGizmoHandle* albaGizmoROI::m_GHandle[6]
protected

Array holding the six gizmo handles.

Definition at line 153 of file albaGizmoROI.h.

◆ m_Center

double albaGizmoROI::m_Center[6][3]
protected

Definition at line 154 of file albaGizmoROI.h.

◆ m_OutlineGizmo

albaGizmoBoundingBox* albaGizmoROI::m_OutlineGizmo
protected

The gizmo bounding box.

Definition at line 155 of file albaGizmoROI.h.

◆ m_Accumulator

double albaGizmoROI::m_Accumulator
protected

Definition at line 157 of file albaGizmoROI.h.

◆ m_MinimumHandleSize

double albaGizmoROI::m_MinimumHandleSize
protected

Definition at line 158 of file albaGizmoROI.h.

◆ m_EnableMinimumHandleSize

bool albaGizmoROI::m_EnableMinimumHandleSize
protected

Definition at line 159 of file albaGizmoROI.h.

◆ m_EnableMinimumDistanceBetweenGizmo

bool albaGizmoROI::m_EnableMinimumDistanceBetweenGizmo
protected

Definition at line 160 of file albaGizmoROI.h.


The documentation for this class was generated from the following file: