Equalizer  1.9.0
Parallel Rendering Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
eq::fabric::Observer< C, O > Class Template Reference

Base data transport class for observers. More...

#include <observer.h>

+ Inheritance diagram for eq::fabric::Observer< C, O >:
+ Collaboration diagram for eq::fabric::Observer< C, O >:

Public Types

typedef LeafVisitor< O > Visitor
 The observer visitor type. More...
 
- Public Types inherited from eq::fabric::Object
enum  DirtyBits {
  DIRTY_NAME = Serializable::DIRTY_CUSTOM << 0, DIRTY_USERDATA = Serializable::DIRTY_CUSTOM << 1, DIRTY_TASKS = Serializable::DIRTY_CUSTOM << 2, DIRTY_REMOVED = Serializable::DIRTY_CUSTOM << 3,
  DIRTY_SERIAL = Serializable::DIRTY_CUSTOM << 4, DIRTY_CUSTOM = Serializable::DIRTY_CUSTOM << 6, DIRTY_OBJECT_BITS = DIRTY_NAME | DIRTY_USERDATA
}
 The changed parts of the object since the last pack(). More...
 

Public Member Functions

Data Access
EQFABRIC_INL bool setHeadMatrix (const Matrix4f &matrix)
 Set the head matrix. More...
 
const Matrix4f & getHeadMatrix () const
 
EQFABRIC_INL void setEyePosition (const Eye eye, const Vector3f &pos)
 Set the position of the given eye relative to the observer. More...
 
EQFABRIC_INL const Vector3f & getEyePosition (const Eye eye) const
 
EQFABRIC_INL void setFocusDistance (const float focusDistance)
 Set the focal distance. More...
 
float getFocusDistance () const
 
EQFABRIC_INL void setFocusMode (const FocusMode focusMode)
 Set the focal mode. More...
 
FocusMode getFocusMode () const
 
EQFABRIC_INL void setOpenCVCamera (const int32_t index)
 Set the index of the OpenCV camera for tracking. More...
 
int32_t getOpenCVCamera () const
 
EQFABRIC_INL void setVRPNTracker (const std::string &index)
 Set the VRPN tracker device. More...
 
const std::string & getVRPNTracker () const
 
const C * getConfig () const
 
C * getConfig ()
 
ObserverPath getPath () const
 
Operations
EQFABRIC_INL VisitorResult accept (Visitor &visitor)
 Traverse this observer using a observer visitor. More...
 
EQFABRIC_INL VisitorResult accept (Visitor &visitor) const
 Const-version of accept(). More...
 
virtual void backup ()
 
virtual void restore ()
 
- Public Member Functions inherited from eq::fabric::Object
virtual EQFABRIC_API bool isDirty () const
 
virtual EQFABRIC_API uint128_t commit (const uint32_t incarnation=CO_COMMIT_NEXT)
 
virtual EQFABRIC_API void setName (const std::string &name)
 Set the name of the object. More...
 
EQFABRIC_API const std::string & getName () const
 
EQFABRIC_API void setUserData (co::Object *userData)
 Set user-specific data. More...
 
EQFABRIC_API co::Object * getUserData ()
 
EQFABRIC_API const co::Object * getUserData () const
 
EQFABRIC_API uint32_t getTasks () const
 Return the set of tasks this channel might execute in the worst case. More...
 
EQFABRIC_API uint32_t getSerial () const
 

Protected Types

enum  DirtyBits {
  DIRTY_EYE_POSITION = Object::DIRTY_CUSTOM << 0, DIRTY_HEAD = Object::DIRTY_CUSTOM << 1, DIRTY_FOCUS = Object::DIRTY_CUSTOM << 2, DIRTY_TRACKER = Object::DIRTY_CUSTOM << 3,
  DIRTY_OBSERVER_BITS
}
 

Protected Member Functions

EQFABRIC_INL Observer (C *config)
 
virtual void serialize (co::DataOStream &os, const uint64_t dirtyBits)
 
virtual void deserialize (co::DataIStream &is, const uint64_t dirtyBits)
 
virtual void setDirty (const uint64_t bits)
 
virtual uint64_t getRedistributableBits () const
 
- Protected Member Functions inherited from eq::fabric::Object
EQFABRIC_API Object ()
 Construct a new Object. More...
 
EQFABRIC_API Object (const Object &)
 Construct an unmapped, unregistered copy of an object. More...
 
virtual EQFABRIC_API ~Object ()
 Destruct the object. More...
 
EQFABRIC_API Objectoperator= (const Object &from)
 NOP assignment operator. More...
 
virtual bool hasMasterUserData ()
 
virtual uint32_t getUserDataLatency () const
 
EQFABRIC_API void setTasks (const uint32_t tasks)
 
virtual EQFABRIC_API void notifyDetach ()
 
EQFABRIC_API void postRemove (Object *child)
 
virtual void removeChild (const uint128_t &)
 
template<class C , class S >
void commitChild (C *child, S *sender, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChild (C *child, const uint32_t incarnation)
 
template<class C , class S >
void commitChildren (const std::vector< C * > &children, S *sender, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChildren (const std::vector< C * > &children, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChildren (const std::vector< C * > &children, const uint32_t incarnation)
 
template<class C >
void syncChildren (const std::vector< C * > &children)
 
template<class P , class C >
void releaseChildren (const std::vector< C * > &children)
 
EQFABRIC_API bool _cmdSync (co::ICommand &command)
 

Detailed Description

template<class C, class O>
class eq::fabric::Observer< C, O >

Base data transport class for observers.

See Also
eq::Observer

Definition at line 34 of file fabric/observer.h.

Member Typedef Documentation

template<class C, class O>
typedef LeafVisitor< O > eq::fabric::Observer< C, O >::Visitor

The observer visitor type.

Version
1.0

Definition at line 38 of file fabric/observer.h.

Member Function Documentation

template<class C, class O>
EQFABRIC_INL VisitorResult eq::fabric::Observer< C, O >::accept ( Visitor visitor)

Traverse this observer using a observer visitor.

Parameters
visitorthe visitor.
Returns
the result of the visitor traversal.
Version
1.0
template<class C, class O>
EQFABRIC_INL VisitorResult eq::fabric::Observer< C, O >::accept ( Visitor visitor) const

Const-version of accept().

Version
1.0
template<class C, class O>
const C* eq::fabric::Observer< C, O >::getConfig ( ) const
inline
Returns
the parent config of this observer.
Version
1.0

Definition at line 106 of file fabric/observer.h.

template<class C, class O>
C* eq::fabric::Observer< C, O >::getConfig ( )
inline
Returns
the parent config of this observer.
Version
1.0

Definition at line 109 of file fabric/observer.h.

template<class C, class O>
EQFABRIC_INL const Vector3f& eq::fabric::Observer< C, O >::getEyePosition ( const Eye  eye) const
Returns
the position of the given eye.
Version
1.5.2
template<class C, class O>
float eq::fabric::Observer< C, O >::getFocusDistance ( ) const
inline
Returns
the current focal distance.
Version
1.1

Definition at line 85 of file fabric/observer.h.

template<class C, class O>
FocusMode eq::fabric::Observer< C, O >::getFocusMode ( ) const
inline
Returns
the current focal mode.
Version
1.1

Definition at line 91 of file fabric/observer.h.

template<class C, class O>
const Matrix4f& eq::fabric::Observer< C, O >::getHeadMatrix ( ) const
inline
Returns
the current head matrix.
Version
1.0

Definition at line 58 of file fabric/observer.h.

template<class C, class O>
int32_t eq::fabric::Observer< C, O >::getOpenCVCamera ( ) const
inline
Returns
the current OpenCV camera.
Version
1.5.2

Definition at line 97 of file fabric/observer.h.

template<class C, class O>
const std::string& eq::fabric::Observer< C, O >::getVRPNTracker ( ) const
inline
Returns
the current VRPN tracker device name.
Version
1.5.2

Definition at line 103 of file fabric/observer.h.

template<class C, class O>
EQFABRIC_INL void eq::fabric::Observer< C, O >::setEyePosition ( const Eye  eye,
const Vector3f &  pos 
)

Set the position of the given eye relative to the observer.

A standard symmetric eye setup uses (+-eyeBase/2, 0, 0).

Parameters
eyethe eye to update.
posthe new eye position.
Version
1.5.2
template<class C, class O>
EQFABRIC_INL void eq::fabric::Observer< C, O >::setFocusDistance ( const float  focusDistance)

Set the focal distance.

See Also
setFocusMode
Version
1.1
template<class C, class O>
EQFABRIC_INL void eq::fabric::Observer< C, O >::setFocusMode ( const FocusMode  focusMode)

Set the focal mode.

Version
1.1
template<class C, class O>
EQFABRIC_INL bool eq::fabric::Observer< C, O >::setHeadMatrix ( const Matrix4f &  matrix)

Set the head matrix.

The head matrix specifies the transformation origin->observer. Together with the eye separation, this determines the eye positions in the global coordinate system. The eye position and wall or projection description define the shape of the frustum and the channel's head transformation during rendering.

Parameters
matrixthe matrix
Returns
true if the matrix was changed, false otherwise.
Version
1.0
template<class C, class O>
EQFABRIC_INL void eq::fabric::Observer< C, O >::setOpenCVCamera ( const int32_t  index)

Set the index of the OpenCV camera for tracking.

Version
1.5.2
template<class C, class O>
EQFABRIC_INL void eq::fabric::Observer< C, O >::setVRPNTracker ( const std::string &  index)

Set the VRPN tracker device.

Version
1.5.2

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