Equalizer 1.0

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 >:

List of all members.

Classes

struct  BackupData

Public Member Functions

Data Access
const C * getConfig () const
C * getConfig ()
ObserverPath getPath () const
EQFABRIC_INL void setEyeBase (const float eyeBase)
 Set the eye separation of this observer.
float getEyeBase () const
EQFABRIC_INL void setHeadMatrix (const Matrix4f &matrix)
 Set the head matrix.
const Matrix4fgetHeadMatrix () const
Operations
EQFABRIC_INL VisitorResult accept (Visitor &visitor)
 Traverse this observer using a observer visitor.
EQFABRIC_INL VisitorResult accept (Visitor &visitor) const
 Const-version of accept().
virtual void backup ()
virtual void restore ()

Public Types

typedef LeafVisitor< O > Visitor
 The observer visitor type.

Protected Member Functions

EQFABRIC_INL Observer (C *config)
virtual void serialize (co::DataOStream &os, const uint64_t dirtyBits)
 Worker for pack() and getInstanceData().
virtual void deserialize (co::DataIStream &is, const uint64_t dirtyBits)
 Worker for unpack() and applyInstanceData().
virtual void setDirty (const uint64_t bits)
 Add dirty flags to mark data for distribution.
virtual uint64_t getRedistributableBits () const

Protected Types

enum  DirtyBits { DIRTY_EYE_BASE = Object::DIRTY_CUSTOM << 0, DIRTY_HEAD = Object::DIRTY_CUSTOM << 1, DIRTY_OBSERVER_BITS }
 

The changed parts of the object since the last pack().

More...

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 Enumeration Documentation

template<class C, class O>
enum eq::fabric::Observer::DirtyBits [protected]

The changed parts of the object since the last pack().

Subclasses should define their own bits, starting at DIRTY_CUSTOM.

Reimplemented from eq::fabric::Object.

Definition at line 109 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>
virtual void eq::fabric::Observer< C, O >::deserialize ( co::DataIStream ,
const uint64_t   
) [protected, virtual]

Worker for unpack() and applyInstanceData().

This function is called with the dirty bits send by the master instance. The dirty bits are received beforehand, and do not need to be deserialized by the overriding method.

See also:
serialize()
Version:
1.0

Reimplemented from eq::fabric::Object.

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 43 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 46 of file fabric/observer.h.

template<class C, class O>
float eq::fabric::Observer< C, O >::getEyeBase ( ) const [inline]
Returns:
the current eye separation.
Version:
1.0

Definition at line 55 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 72 of file fabric/observer.h.

template<class C, class O>
virtual void eq::fabric::Observer< C, O >::serialize ( co::DataOStream ,
const uint64_t   
) [protected, virtual]

Worker for pack() and getInstanceData().

Override this and deserialize() if you want to distribute subclassed data.

This method is called with DIRTY_ALL from getInstanceData() and with the actual dirty bits from pack(), which also resets the dirty state afterwards. The dirty bits are transmitted beforehand, and do not need to be transmitted by the overriding method.

Version:
1.0

Reimplemented from eq::fabric::Object.

template<class C, class O>
virtual void eq::fabric::Observer< C, O >::setDirty ( const uint64_t  bits) [protected, virtual]

Add dirty flags to mark data for distribution.

Version:
1.0

Reimplemented from eq::fabric::Serializable.

template<class C, class O>
EQFABRIC_INL void eq::fabric::Observer< C, O >::setEyeBase ( const float  eyeBase)

Set the eye separation of this observer.

Version:
1.0
template<class C, class O>
EQFABRIC_INL void 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
Version:
1.0

The documentation for this class was generated from the following file:
Generated on Sun May 8 2011 19:11:10 for Equalizer 1.0 by  doxygen 1.7.3