Equalizer
1.2.1
|
Base data transport class for observers. More...
#include <observer.h>
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 | setFocusDistance (const float focusDistance) |
Set the focal distance. | |
float | getFocusDistance () const |
EQFABRIC_INL void | setFocusMode (const FocusMode focusMode) |
Set the focal mode. | |
FocusMode | getFocusMode () const |
EQFABRIC_INL void | setHeadMatrix (const Matrix4f &matrix) |
Set the head matrix. | |
const Matrix4f & | getHeadMatrix () 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_FOCUS = Object::DIRTY_CUSTOM << 2, DIRTY_OBSERVER_BITS } |
The changed parts of the object since the last pack(). More... |
Base data transport class for observers.
Definition at line 35 of file fabric/observer.h.
typedef LeafVisitor< O > eq::fabric::Observer< C, O >::Visitor |
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 122 of file fabric/observer.h.
EQFABRIC_INL VisitorResult eq::fabric::Observer< C, O >::accept | ( | Visitor & | visitor | ) |
Traverse this observer using a observer visitor.
visitor | the visitor. |
EQFABRIC_INL VisitorResult eq::fabric::Observer< C, O >::accept | ( | Visitor & | visitor | ) | const |
Const-version of accept().
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.
Reimplemented from eq::fabric::Object.
const C* eq::fabric::Observer< C, O >::getConfig | ( | ) | const [inline] |
Definition at line 44 of file fabric/observer.h.
C* eq::fabric::Observer< C, O >::getConfig | ( | ) | [inline] |
Definition at line 47 of file fabric/observer.h.
float eq::fabric::Observer< C, O >::getEyeBase | ( | ) | const [inline] |
float eq::fabric::Observer< C, O >::getFocusDistance | ( | ) | const [inline] |
FocusMode eq::fabric::Observer< C, O >::getFocusMode | ( | ) | const [inline] |
const Matrix4f& eq::fabric::Observer< C, O >::getHeadMatrix | ( | ) | const [inline] |
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.
Reimplemented from eq::fabric::Object.
virtual void eq::fabric::Observer< C, O >::setDirty | ( | const uint64_t | bits | ) | [protected, virtual] |
EQFABRIC_INL void eq::fabric::Observer< C, O >::setEyeBase | ( | const float | eyeBase | ) |
Set the eye separation of this observer.
EQFABRIC_INL void eq::fabric::Observer< C, O >::setFocusDistance | ( | const float | focusDistance | ) |
EQFABRIC_INL void eq::fabric::Observer< C, O >::setFocusMode | ( | const FocusMode | focusMode | ) |
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.
matrix | the matrix |