ALBA
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
albaTransformBase Class Referenceabstract

#include <albaTransformBase.h>

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

Public Member Functions

 albaTransformBase ()
 
 ~albaTransformBase ()
 
 albaTransformBase (const albaTransformBase &)
 
 albaAbstractTypeMacro (albaTransformBase, albaReferenceCounted)
 
virtual void Print (std::ostream &os, const int indent=0) const
 
virtual const albaMatrixGetMatrix ()
 
albaMatrixGetMatrixPointer ()
 
void TransformPoint (const float in[3], float out[3])
 
void TransformPoint (const double in[3], double out[3])
 
void TransformNormalAtPoint (const float point[3], const float in[3], float out[3])
 
void TransformNormalAtPoint (const double point[3], const double in[3], double out[3])
 
void TransformVectorAtPoint (const float point[3], const float in[3], float out[3])
 
void TransformVectorAtPoint (const double point[3], const double in[3], double out[3])
 
virtual void Update ()
 
void Modified ()
 
virtual void InternalTransformPoint (const double in[3], double out[3])
 
virtual void InternalTransformPoint (const float in[3], float out[3])
 
virtual unsigned long GetMTime ()
 
virtual unsigned long GetUpdateTime ()
 
void SetTimeStamp (albaTimeStamp t)
 
albaTimeStamp GetTimeStamp ()
 
- Public Member Functions inherited from albaReferenceCounted
 albaReferenceCounted ()
 
virtual ~albaReferenceCounted ()
 
 albaAbstractTypeMacro (albaReferenceCounted, albaObject)
 
virtual void Delete ()
 
void Register (void *obj)
 
virtual void UnRegister (void *obj)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
- Public Member Functions inherited from albaObject
 albaObject ()
 
virtual ~albaObject ()
 
virtual void Delete ()
 
virtual const char * GetTypeName () const
 
virtual bool IsA (const char *type_name) const
 
virtual bool IsA (const albaTypeID &type_id) const
 
virtual albaObjectNewObjectInstance () const =0
 
virtual const albaTypeIDGetTypeId () const
 
virtual void Print (std::ostream &os, const int indent=0) const
 
 albaObject (const albaObject &c)
 
- Public Member Functions inherited from albaEventBroadcaster
 albaEventBroadcaster (void *owner=NULL)
 
virtual ~albaEventBroadcaster ()
 
 albaEventBroadcaster (const albaEventBroadcaster &c)
 
void AddObserver (albaObserver *obj)
 
void AddObserver (albaObserver &obj)
 
albaObserverCallbackAddObserverCallback (void(*f)(void *sender, albaID eid, void *clientdata, void *calldata))
 
bool RemoveObserver (albaObserver *obj)
 
void RemoveAllObservers ()
 
bool IsObserver (albaObserver *obj)
 
bool HasObservers ()
 
void GetObservers (std::vector< albaObserver * > &olist)
 
void InvokeEvent (albaEventBase &e)
 
void InvokeEvent (albaEventBase *e)
 
void InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL)
 
void SetChannel (albaID ch)
 
albaID GetChannel ()
 
virtual void SetListener (albaObserver *o)
 
- Public Member Functions inherited from albaEventSender
 albaEventSender ()
 
virtual void SetListener (albaObserver *o)
 
virtual albaObserverGetListener ()
 
virtual bool HasListener ()
 
virtual void InvokeEvent (albaEventBase &e)
 
virtual void InvokeEvent (albaEventBase *e)
 
virtual void InvokeEvent (void *sender, albaID id=ID_NO_EVENT, void *data=NULL)
 

Protected Member Functions

virtual void InternalUpdate ()=0
 

Protected Attributes

albaAutoPointer< albaMatrixm_Matrix
 
albaMTime m_MTime
 
albaMTime m_UpdateTime
 
albaMutexLock m_UpdateMutex
 
albaTimeStamp m_TimeStamp
 
- Protected Attributes inherited from albaReferenceCounted
int m_ReferenceCount
 
- Protected Attributes inherited from albaObject
bool m_HeapFlag
 
- Protected Attributes inherited from albaEventBroadcaster
albaObserversList m_Observers
 
albaID m_Channel
 
- Protected Attributes inherited from albaEventSender
albaObserverm_Listener
 

Additional Inherited Members

- Static Public Member Functions inherited from albaObject
static const char * GetStaticTypeName ()
 
static bool IsStaticType (const char *type_name)
 
static bool IsStaticType (const albaTypeID &type_id)
 
static const albaTypeIDGetStaticTypeId ()
 
static albaObjectSafeDownCast (albaObject *o)
 
- Protected Types inherited from albaEventBroadcaster
typedef std::list< albaObserver * > albaObserversList
 

Detailed Description

Superclass for Homogeneous transformations.

albaTransformBase is the superclass for ALBA geometric, and currently homogeneous only, transformations. The idea behind a albaTransformBase is the Update() method should always be called to update the output, which is a albaMatrix internally stored.

See also
albaTransform
Todo:
  • change SetTimeStamp to apply a Modified(), than change matrix pipes to not call it!!!
  • implement issuing of a MATRIX_UPDATED event: add an event source member

Definition at line 46 of file albaTransformBase.h.

Constructor & Destructor Documentation

◆ albaTransformBase() [1/2]

albaTransformBase::albaTransformBase ( )

◆ ~albaTransformBase()

albaTransformBase::~albaTransformBase ( )

◆ albaTransformBase() [2/2]

albaTransformBase::albaTransformBase ( const albaTransformBase )

copy constructor

Member Function Documentation

◆ albaAbstractTypeMacro()

albaTransformBase::albaAbstractTypeMacro ( albaTransformBase  ,
albaReferenceCounted   
)

◆ Print()

virtual void albaTransformBase::Print ( std::ostream &  os,
const int  indent = 0 
) const
virtual

print debug information for this object

Reimplemented from albaObject.

◆ GetMatrix()

virtual const albaMatrix & albaTransformBase::GetMatrix ( )
inlinevirtual

◆ GetMatrixPointer()

albaMatrix * albaTransformBase::GetMatrixPointer ( )
inline

return pointer to internal matrix (after updating).

BEWARE: do not change the matrix directly.

Definition at line 64 of file albaTransformBase.h.

◆ TransformPoint() [1/2]

void albaTransformBase::TransformPoint ( const float  in[3],
float  out[3] 
)
inline

Apply the transformation to a coordinate.

You can use the same array to store both the input and output point.

Definition at line 69 of file albaTransformBase.h.

◆ TransformPoint() [2/2]

void albaTransformBase::TransformPoint ( const double  in[3],
double  out[3] 
)
inline

Apply the transformation to a double-precision coordinate.


You can use the same array to store both the input and output point.

Definition at line 75 of file albaTransformBase.h.

◆ TransformNormalAtPoint() [1/2]

void albaTransformBase::TransformNormalAtPoint ( const float  point[3],
const float  in[3],
float  out[3] 
)

Apply the transformation to a normal at the specified vertex.

If the transformation is a vtkLinearTransform, you can use TransformNormal() instead.

◆ TransformNormalAtPoint() [2/2]

void albaTransformBase::TransformNormalAtPoint ( const double  point[3],
const double  in[3],
double  out[3] 
)

Apply the transformation to a normal at the specified vertex.

If the transformation is a vtkLinearTransform, you can use TransformNormal() instead.

◆ TransformVectorAtPoint() [1/2]

void albaTransformBase::TransformVectorAtPoint ( const float  point[3],
const float  in[3],
float  out[3] 
)

Apply the transformation to a vector at the specified vertex.

If the transformation is a vtkLinearTransform, you can use TransformVector() instead.

◆ TransformVectorAtPoint() [2/2]

void albaTransformBase::TransformVectorAtPoint ( const double  point[3],
const double  in[3],
double  out[3] 
)

Apply the transformation to a vector at the specified vertex.

If the transformation is a vtkLinearTransform, you can use TransformVector() instead.

◆ Update()

virtual void albaTransformBase::Update ( )
virtual

Update the transform to account for any changes which have been made.

You should not need to call this method yourself, it is called automatically whenever the transform needs an update. For redefining the transform behavior redefine InternalUpdate() function

Reimplemented in albaMatrixPipe.

◆ Modified()

void albaTransformBase::Modified ( )
inline

◆ InternalTransformPoint() [1/2]

virtual void albaTransformBase::InternalTransformPoint ( const double  in[3],
double  out[3] 
)
virtual

This will calculate the transformation without calling Update.

Meant for use only within other VTK classes.

◆ InternalTransformPoint() [2/2]

virtual void albaTransformBase::InternalTransformPoint ( const float  in[3],
float  out[3] 
)
virtual

◆ GetMTime()

virtual unsigned long albaTransformBase::GetMTime ( )
inlinevirtual

Make another transform of the same type.

Check for self-reference. Return current modification time.

Reimplemented in albaTransformFrame, albaAbsMatrixPipe, albaMatrixPipe, albaCameraTransform, and albaGizmoAutoscaleHelper.

Definition at line 130 of file albaTransformBase.h.

◆ GetUpdateTime()

virtual unsigned long albaTransformBase::GetUpdateTime ( )
inlinevirtual

return last update time

Definition at line 133 of file albaTransformBase.h.

◆ SetTimeStamp()

void albaTransformBase::SetTimeStamp ( albaTimeStamp  t)
inline

set the timestamp for the output matrix

Definition at line 136 of file albaTransformBase.h.

References albaEquals().

Referenced by albaTransform::SetMatrix().

Here is the call graph for this function:

◆ GetTimeStamp()

albaTimeStamp albaTransformBase::GetTimeStamp ( )
inline

Definition at line 138 of file albaTransformBase.h.

◆ InternalUpdate()

virtual void albaTransformBase::InternalUpdate ( )
protectedpure virtual

Perform any subclass-specific Update.

Implemented in albaTransform, albaTransformFrame, albaAbsMatrixPipe, albaMatrixPipe, albaCameraTransform, and albaGizmoAutoscaleHelper.

Member Data Documentation

◆ m_Matrix

albaAutoPointer<albaMatrix> albaTransformBase::m_Matrix
protected

internally stored matrix.

Definition at line 149 of file albaTransformBase.h.

◆ m_MTime

albaMTime albaTransformBase::m_MTime
protected

modification time

Definition at line 150 of file albaTransformBase.h.

Referenced by Modified().

◆ m_UpdateTime

albaMTime albaTransformBase::m_UpdateTime
protected

We need to record the time of the last update.

Definition at line 151 of file albaTransformBase.h.

◆ m_UpdateMutex

albaMutexLock albaTransformBase::m_UpdateMutex
protected

we also need to do mutex locking so updates don't collide.

Definition at line 152 of file albaTransformBase.h.

◆ m_TimeStamp

albaTimeStamp albaTransformBase::m_TimeStamp
protected

the timestamp to assign to the output matrix (default=0)

Definition at line 154 of file albaTransformBase.h.


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