18 #ifndef EQFABRIC_OBSERVER_H 19 #define EQFABRIC_OBSERVER_H 22 #include <eq/fabric/eye.h> 23 #include <eq/fabric/focusMode.h> 24 #include <eq/fabric/object.h> 25 #include <eq/fabric/vmmlib.h> 35 template <
class C,
class O>
99 ObserverPath getPath()
const;
111 EQFABRIC_INL VisitorResult
accept(Visitor& visitor);
114 EQFABRIC_INL VisitorResult
accept(Visitor& visitor)
const;
116 virtual void backup();
117 virtual void restore();
122 EQFABRIC_INL
explicit Observer(C* config);
125 EQFABRIC_INL
virtual ~Observer();
128 virtual void serialize(co::DataOStream& os,
const uint64_t dirtyBits);
130 virtual void deserialize(co::DataIStream& is,
const uint64_t dirtyBits);
131 virtual void setDirty(
const uint64_t bits);
136 DIRTY_EYE_POSITION = Object::DIRTY_CUSTOM << 0,
137 DIRTY_HEAD = Object::DIRTY_CUSTOM << 1,
138 DIRTY_FOCUS = Object::DIRTY_CUSTOM << 2,
139 DIRTY_TRACKER = Object::DIRTY_CUSTOM << 3,
140 DIRTY_OBSERVER_BITS = DIRTY_EYE_POSITION | DIRTY_HEAD | DIRTY_FOCUS |
141 DIRTY_TRACKER | DIRTY_OBJECT_BITS
145 virtual uint64_t getRedistributableBits()
const 147 return DIRTY_OBSERVER_BITS;
159 Vector3f eyePosition[NUM_EYES];
163 std::string vrpnTracker;
170 template <
class C,
class O>
171 EQFABRIC_INL std::ostream& operator<<(std::ostream&, const Observer<C, O>&);
174 #endif // EQFABRIC_OBSERVER_H const C * getConfig() const
EQFABRIC_INL bool setHeadMatrix(const Matrix4f &matrix)
Set the head matrix.
EQFABRIC_INL void setFocusDistance(const float focusDistance)
Set the focal distance.
EQFABRIC_INL void setVRPNTracker(const std::string &index)
Set the VRPN tracker device.
Defines export visibility macros for library EqualizerFabric.
Base data transport class for observers.
FocusMode getFocusMode() const
A visitor to traverse leaf nodes of a graph.
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.
int32_t getOpenCVCamera() const
EQFABRIC_INL const Vector3f & getEyePosition(const Eye eye) const
LeafVisitor< O > Visitor
The observer visitor type.
const std::string & getVRPNTracker() const
DirtyBits
The changed parts of the object since the last pack().
Eye
Eye pass bit mask for which rendering is enabled.
float getFocusDistance() const
FocusMode
The algorithm to use for observer focal distance calculation.
The Equalizer client library.
EQFABRIC_INL VisitorResult accept(Visitor &visitor)
Traverse this observer using a observer visitor.
Internal base class for all distributed, inheritable Equalizer objects.
EQFABRIC_INL void setFocusMode(const FocusMode focusMode)
Set the focal mode.
EQFABRIC_INL void setOpenCVCamera(const int32_t index)
Set the index of the OpenCV camera for tracking.