ALBA
|
#include <albaRefSys.h>
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) |
albaTransformBase * | GetTransform () |
albaMatrix * | GetMatrix () |
void | SetMatrix (vtkMatrix4x4 *matrix) |
void | SetMatrix (albaMatrix *matrix) |
void | SetRenderer (vtkRenderer *renderer) |
vtkRenderer * | GetRenderer () |
void | SetVME (albaVME *vme) |
albaVME * | GetVME () |
virtual void | Print (std::ostream &os, const int tabs) |
void | DeepCopy (const albaRefSys *source) |
void | Reset () |
Protected Member Functions | |
void | Initialize () |
Protected Attributes | |
albaAutoPointer< albaTransform > | m_Identity |
albaAutoPointer< albaTransformBase > | m_Transform |
vtkRenderer * | m_Renderer |
albaAutoPointer< albaVME > | m_VME |
int | m_Type |
class representing reference system
Definition at line 48 of file albaRefSys.h.
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.
albaRefSys::albaRefSys | ( | ) |
albaRefSys::albaRefSys | ( | int | type | ) |
albaRefSys::albaRefSys | ( | albaVME * | vme | ) |
albaRefSys::albaRefSys | ( | vtkMatrix4x4 * | matrix | ) |
albaRefSys::albaRefSys | ( | vtkRenderer * | ren | ) |
|
virtual |
void albaRefSys::operator= | ( | const albaRefSys & | source | ) |
copy constructor
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
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
void albaRefSys::SetTypeToCustom | ( | albaMatrix * | matrix | ) |
void albaRefSys::SetTypeToLocal | ( | albaVME * | vme = NULL | ) |
Set the reference system to the VME's abs matrix.
void albaRefSys::SetTypeToView | ( | vtkRenderer * | renderer = NULL | ) |
Set the reference system to VIEW.
Optionally a vtkRenderer can be passed.
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.
void albaRefSys::SetTypeToGlobal | ( | ) |
Set the reference system to identity.
|
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.
|
inline |
Get the type of reference system, which can be CUSTOM, GLOBAL, LOCAL,PARENT or VIEW.
Definition at line 128 of file albaRefSys.h.
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!!!!
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
albaMatrix * albaRefSys::GetMatrix | ( | ) |
return the matrix of this ref_sys (
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.
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.
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
|
inline |
return Renderer stored in this ref_sys
Definition at line 165 of file albaRefSys.h.
void albaRefSys::SetVME | ( | albaVME * | vme | ) |
Set the reference to the VME.
This is used for types LOCAL and GLOBAL to retrieve the transform
|
inline |
return the reference to the VME stored inside the RefSys
Definition at line 173 of file albaRefSys.h.
|
virtual |
Debug printing of internal data.
void albaRefSys::DeepCopy | ( | const albaRefSys * | source | ) |
DeepCopy the source matrix into the target.
The target is the object invoking the DeepCopy method
void albaRefSys::Reset | ( | ) |
Reset the class to default value.
|
protected |
internally used to set default values
|
protected |
Definition at line 192 of file albaRefSys.h.
|
protected |
the ref sys matrix
Definition at line 193 of file albaRefSys.h.
|
protected |
ref sys renderer
Definition at line 194 of file albaRefSys.h.
|
protected |
reference to VME
Definition at line 195 of file albaRefSys.h.
|
protected |
type of ref sys (CUSTOM, GLOBAL, LOCAL, PARENT, VIEW)
Definition at line 196 of file albaRefSys.h.