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

#include <albaMatrixPipe.h>

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

Public Member Functions

 albaMatrixPipe ()
 
virtual ~albaMatrixPipe ()
 
 albaTypeMacro (albaMatrixPipe, albaTransformBase)
 
void UpdateMatrixObserverOn ()
 
void UpdateMatrixObserverOff ()
 
void SetUpdateMatrixObserverFlag (bool flag)
 
bool GetUpdateMatrixObserverFlag ()
 
int SetVME (albaVME *vme)
 
albaVMEGetVME ()
 
virtual void SetTimeStamp (albaTimeStamp t)
 
albaTimeStamp GetTimeStamp ()
 
virtual unsigned long GetMTime ()
 
virtual bool Accept (albaVME *vme)
 
virtual const albaMatrixGetMatrix ()
 
albaMatrixPipeMakeACopy ()
 
virtual int DeepCopy (albaMatrixPipe *pipe)
 
virtual void Update ()
 
- Public Member Functions inherited from albaTransformBase
 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 ()
 
virtual void InternalUpdate ()=0
 

Protected Attributes

bool m_UpdateMatrixObserverFlag
 
bool m_Updating
 
albaVMEm_VME
 
- Protected Attributes inherited from albaTransformBase
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

bridge class between albaTransform pipeline and VME to compute VME output matrix.

albaMatrixPipe is an functional component representing a bridge between the ALBA pipeline mechanism for trasnformations (albaTransform) and the VME to produce an output a matrix representing the VME pose in space. The matrix pipe send an event to its listener (the VME) to rise the call of the PreUpdateMatrix() and UpdateMatrix() callback functions.

See also
albaMatrixInterpolator albaVME albaMatrixVector albaMatrixInterpolatorHold albaMatrixInterpolatorNearest
Todo:
  • to check the m_Updating effect and usefulness

Definition at line 38 of file albaMatrixPipe.h.

Constructor & Destructor Documentation

◆ albaMatrixPipe()

albaMatrixPipe::albaMatrixPipe ( )

◆ ~albaMatrixPipe()

virtual albaMatrixPipe::~albaMatrixPipe ( )
virtual

Member Function Documentation

◆ albaTypeMacro()

albaMatrixPipe::albaTypeMacro ( albaMatrixPipe  ,
albaTransformBase   
)

◆ UpdateMatrixObserverOn()

void albaMatrixPipe::UpdateMatrixObserverOn ( )
inline

Definition at line 46 of file albaMatrixPipe.h.

◆ UpdateMatrixObserverOff()

void albaMatrixPipe::UpdateMatrixObserverOff ( )
inline

Definition at line 47 of file albaMatrixPipe.h.

◆ SetUpdateMatrixObserverFlag()

void albaMatrixPipe::SetUpdateMatrixObserverFlag ( bool  flag)
inline

Definition at line 48 of file albaMatrixPipe.h.

◆ GetUpdateMatrixObserverFlag()

bool albaMatrixPipe::GetUpdateMatrixObserverFlag ( )
inline

Definition at line 49 of file albaMatrixPipe.h.

◆ SetVME()

int albaMatrixPipe::SetVME ( albaVME vme)

set the VME connected to this class.

return ALBA_ERROR if "vme" is not accepted

◆ GetVME()

albaVME * albaMatrixPipe::GetVME ( )
inline

return the VME this matrix pipe is connected to

Definition at line 54 of file albaMatrixPipe.h.

◆ SetTimeStamp()

virtual void albaMatrixPipe::SetTimeStamp ( albaTimeStamp  t)
virtual

Set the current time.

This makes the pipe to be recomputed.

◆ GetTimeStamp()

albaTimeStamp albaMatrixPipe::GetTimeStamp ( )

return the time stamp currently set to the pipe

◆ GetMTime()

virtual unsigned long albaMatrixPipe::GetMTime ( )
virtual

Get the MTime: this is the bit of magic that makes everything work.

Reimplemented from albaTransformBase.

Reimplemented in albaAbsMatrixPipe.

◆ Accept()

virtual bool albaMatrixPipe::Accept ( albaVME vme)
inlinevirtual

This function returns true if given VME is accepted by this Pipe.

Definition at line 66 of file albaMatrixPipe.h.

◆ GetMatrix()

virtual const albaMatrix & albaMatrixPipe::GetMatrix ( )
virtual

Redefined to avoid loops while updating.

Reimplemented from albaTransformBase.

◆ MakeACopy()

albaMatrixPipe * albaMatrixPipe::MakeACopy ( )

Make a copy of this pipe, also copying all parameters.

This is equivalent to NewInstance + DeepCopy BEWARE: the returned object has reference counter set to 0. This avoid the to do an extra Delete(), but requires to Register it to ensure keeping it alive.

◆ DeepCopy()

virtual int albaMatrixPipe::DeepCopy ( albaMatrixPipe pipe)
virtual

Copy from another pipe, the function return ALBA_ERROR if the specied pipe is not compatible.

◆ Update()

virtual void albaMatrixPipe::Update ( )
virtual

Redefined to send pre update event to the VME.

In the pre update event the VME can change pipe parameters

Reimplemented from albaTransformBase.

◆ InternalUpdate()

virtual void albaMatrixPipe::InternalUpdate ( )
protectedvirtual

To be redefined by subclasses to override Pipe behavior.

Implements albaTransformBase.

Reimplemented in albaAbsMatrixPipe.

Member Data Documentation

◆ m_UpdateMatrixObserverFlag

bool albaMatrixPipe::m_UpdateMatrixObserverFlag
protected

Definition at line 92 of file albaMatrixPipe.h.

◆ m_Updating

bool albaMatrixPipe::m_Updating
protected

Definition at line 93 of file albaMatrixPipe.h.

◆ m_VME

albaVME* albaMatrixPipe::m_VME
protected

pointer to VME

Definition at line 94 of file albaMatrixPipe.h.


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