ALBA
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
albaRefSys Class Reference

#include <albaRefSys.h>

Collaboration diagram for albaRefSys:
Collaboration graph
[legend]

Public Types

enum  {
  CUSTOM = 0 , GLOBAL , PARENT , LOCAL ,
  VIEW
}
 

Public Member Functions

 albaRefSys ()
 
 albaRefSys (int type)
 
 albaRefSys (albaVME *vme)
 
 albaRefSys (vtkMatrix4x4 *matrix)
 
 albaRefSys (vtkRenderer *ren)
 
virtual ~albaRefSys ()
 
void operator= (const albaRefSys &source)
 
void SetTypeToCustom (albaTransformBase *transform=NULL)
 
void SetTypeToCustom (vtkMatrix4x4 *matrix)
 
void SetTypeToCustom (albaMatrix *matrix)
 
void SetTypeToLocal (albaVME *vme=NULL)
 
void SetTypeToView (vtkRenderer *renderer=NULL)
 
void SetTypeToParent (albaVME *vme)
 
void SetTypeToGlobal ()
 
void SetType (int type)
 
int GetType ()
 
void SetTransform (albaTransformBase *transform)
 
albaTransformBaseGetTransform ()
 
albaMatrixGetMatrix ()
 
void SetMatrix (vtkMatrix4x4 *matrix)
 
void SetMatrix (albaMatrix *matrix)
 
void SetRenderer (vtkRenderer *renderer)
 
vtkRenderer * GetRenderer ()
 
void SetVME (albaVME *vme)
 
albaVMEGetVME ()
 
virtual void Print (std::ostream &os, const int tabs)
 
void DeepCopy (const albaRefSys *source)
 
void Reset ()
 

Protected Member Functions

void Initialize ()
 

Protected Attributes

albaAutoPointer< albaTransformm_Identity
 
albaAutoPointer< albaTransformBasem_Transform
 
vtkRenderer * m_Renderer
 
albaAutoPointer< albaVMEm_VME
 
int m_Type
 

Detailed Description

class representing reference system

Todo:
  • costruttori che prende le costanti o matrice o transform o VME e si setta il modo. (FATTO!)
  • si deve tenere un puntatore al VME (FATTO!)
  • Set Renderer/VME/Transform etc che non cambia il modo (FATTO!)
  • write documentation
  • complete the PrintSelf
  • use a albaRenderer in place of vtkRenderer

Definition at line 48 of file albaRefSys.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CUSTOM 

auxiliar ref sys

GLOBAL 
PARENT 
LOCAL 

the local ref sys of the VME

VIEW 

the view ref sys

Definition at line 65 of file albaRefSys.h.

Constructor & Destructor Documentation

◆ albaRefSys() [1/5]

albaRefSys::albaRefSys ( )

◆ albaRefSys() [2/5]

albaRefSys::albaRefSys ( int  type)

◆ albaRefSys() [3/5]

albaRefSys::albaRefSys ( albaVME vme)

◆ albaRefSys() [4/5]

albaRefSys::albaRefSys ( vtkMatrix4x4 *  matrix)

◆ albaRefSys() [5/5]

albaRefSys::albaRefSys ( vtkRenderer *  ren)

◆ ~albaRefSys()

virtual albaRefSys::~albaRefSys ( )
virtual

Member Function Documentation

◆ operator=()

void albaRefSys::operator= ( const albaRefSys source)

copy constructor

◆ SetTypeToCustom() [1/3]

void albaRefSys::SetTypeToCustom ( albaTransformBase transform = NULL)

Set the reference system to CUSTOM.

A linear transform of the refsys must be provided, if not the GetTransform will provide the identity by default. Notice, the transform is referenced and not copied, thus its changes reflect into albaRefSys changes

◆ SetTypeToCustom() [2/3]

void albaRefSys::SetTypeToCustom ( vtkMatrix4x4 *  matrix)

Set the reference system to CUSTOM.

A linear transform of the refsys must be provided, if not the GetTransform will provide the identity by default. Notice, the matrix is referenced and not copied, thus its changes reflect into albaRefSys changes

◆ SetTypeToCustom() [3/3]

void albaRefSys::SetTypeToCustom ( albaMatrix matrix)

◆ SetTypeToLocal()

void albaRefSys::SetTypeToLocal ( albaVME vme = NULL)

Set the reference system to the VME's abs matrix.

◆ SetTypeToView()

void albaRefSys::SetTypeToView ( vtkRenderer *  renderer = NULL)

Set the reference system to VIEW.

Optionally a vtkRenderer can be passed.

◆ SetTypeToParent()

void albaRefSys::SetTypeToParent ( albaVME vme)

Set the reference system to the parent Abs matrix of a VME.

The argument is the VME to which the parent refers. If no parent exists GetTransform() return the identity. The VME is stored and changes to its parent reflect into ref sys changes.

◆ SetTypeToGlobal()

void albaRefSys::SetTypeToGlobal ( )

Set the reference system to identity.

◆ SetType()

void albaRefSys::SetType ( int  type)
inline

Set the type of reference system, which can be CUSTOM, GLOBAL, LOCAL, PARENT or VIEW.

Beware if you set directly the Type, you also have to provide a Transform or a Renderer or the VME

Definition at line 125 of file albaRefSys.h.

◆ GetType()

int albaRefSys::GetType ( )
inline

Get the type of reference system, which can be CUSTOM, GLOBAL, LOCAL,PARENT or VIEW.

Definition at line 128 of file albaRefSys.h.

◆ SetTransform()

void albaRefSys::SetTransform ( albaTransformBase transform)

Used to set the transform used for for the CUSTOM ref sys type.

Notice the provided object is referenced and not copied! The Transform member variable is used only for CUSTOM ref sys type!!!!

◆ GetTransform()

albaTransformBase * albaRefSys::GetTransform ( )

return a transform representing this RefSys, this could be either the internally stored transform (CUSTOM), the renderer's ViewTransform (VIEW), the VME AbsMatrixMatrixPipe (LOCAL) or an identity transform when in GLOBAL

◆ GetMatrix()

albaMatrix * albaRefSys::GetMatrix ( )

return the matrix of this ref_sys (

See also
GetTransform() )

◆ SetMatrix() [1/2]

void albaRefSys::SetMatrix ( vtkMatrix4x4 *  matrix)

Set the matrix relative to the ref_sys: albaTransform is created on the fly and stored in the Transform field to link the matrix.

This function follows same rules as the SetTransform() function.

◆ SetMatrix() [2/2]

void albaRefSys::SetMatrix ( albaMatrix matrix)

Set the matrix relative to the ref_sys: albaTransform is created on the fly and stored in the Transform field to link the matrix.

This function follows same rules as the SetTransform() function.

◆ SetRenderer()

void albaRefSys::SetRenderer ( vtkRenderer *  renderer)

Set the internal Renderer variable.

This has effect only if in VIEW mode. Notice the internal transform is set to point the active camera's ViewTransform

◆ GetRenderer()

vtkRenderer * albaRefSys::GetRenderer ( )
inline

return Renderer stored in this ref_sys

Definition at line 165 of file albaRefSys.h.

◆ SetVME()

void albaRefSys::SetVME ( albaVME vme)

Set the reference to the VME.

This is used for types LOCAL and GLOBAL to retrieve the transform

◆ GetVME()

albaVME * albaRefSys::GetVME ( )
inline

return the reference to the VME stored inside the RefSys

Definition at line 173 of file albaRefSys.h.

◆ Print()

virtual void albaRefSys::Print ( std::ostream &  os,
const int  tabs 
)
virtual

Debug printing of internal data.

◆ DeepCopy()

void albaRefSys::DeepCopy ( const albaRefSys source)

DeepCopy the source matrix into the target.

The target is the object invoking the DeepCopy method

◆ Reset()

void albaRefSys::Reset ( )

Reset the class to default value.

◆ Initialize()

void albaRefSys::Initialize ( )
protected

internally used to set default values

Member Data Documentation

◆ m_Identity

albaAutoPointer<albaTransform> albaRefSys::m_Identity
protected

Definition at line 192 of file albaRefSys.h.

◆ m_Transform

albaAutoPointer<albaTransformBase> albaRefSys::m_Transform
protected

the ref sys matrix

Definition at line 193 of file albaRefSys.h.

◆ m_Renderer

vtkRenderer* albaRefSys::m_Renderer
protected

ref sys renderer

Definition at line 194 of file albaRefSys.h.

◆ m_VME

albaAutoPointer<albaVME> albaRefSys::m_VME
protected

reference to VME

Definition at line 195 of file albaRefSys.h.

◆ m_Type

int albaRefSys::m_Type
protected

type of ref sys (CUSTOM, GLOBAL, LOCAL, PARENT, VIEW)

Definition at line 196 of file albaRefSys.h.


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