18 #ifndef EQFABRIC_SEGMENT_H 19 #define EQFABRIC_SEGMENT_H 21 #include <eq/fabric/frustum.h> 22 #include <eq/fabric/object.h> 23 #include <eq/fabric/swapBarrier.h> 24 #include <eq/fabric/types.h> 25 #include <eq/fabric/viewport.h> 32 template <
class C,
class S,
class CH>
58 EQFABRIC_INL
void setViewport(
const Viewport& vp);
69 void setChannel(CH* channel)
72 setDirty(DIRTY_CHANNEL);
80 EQFABRIC_INL
virtual void setWall(
const Wall& wall);
83 EQFABRIC_INL
virtual void setProjection(
const Projection&);
86 EQFABRIC_INL
virtual void unsetFrustum();
89 uint32_t
getEyes()
const {
return _eyes; }
98 EQFABRIC_INL
void setEyes(
const uint32_t eyes);
108 void enableEye(
const uint32_t eyes) { _eyes |= eyes; }
117 EQFABRIC_INL
void setSwapBarrier(SwapBarrierPtr barrier);
120 SwapBarrierConstPtr getSwapBarrier()
const {
return _swapBarrier; }
122 SwapBarrierPtr getSwapBarrier() {
return _swapBarrier; }
134 EQFABRIC_INL VisitorResult
accept(Visitor& visitor);
137 EQFABRIC_INL VisitorResult
accept(Visitor& visitor)
const;
140 void inheritFrustum();
142 virtual void backup();
143 virtual void restore();
146 virtual uint128_t commit(
const uint32_t incarnation = CO_COMMIT_NEXT);
151 EQFABRIC_INL
explicit Segment(C* canvas);
154 EQFABRIC_INL
virtual ~Segment();
157 EQFABRIC_INL
virtual void serialize(co::DataOStream& os,
158 const uint64_t dirtyBits);
160 EQFABRIC_INL
virtual void deserialize(co::DataIStream& is,
161 const uint64_t dirtyBits);
162 virtual void setDirty(
const uint64_t bits);
167 DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 0,
168 DIRTY_FRUSTUM = Object::DIRTY_CUSTOM << 1,
169 DIRTY_CHANNEL = Object::DIRTY_CUSTOM << 2,
170 DIRTY_EYES = Object::DIRTY_CUSTOM << 3,
171 DIRTY_SEGMENT_BITS = DIRTY_VIEWPORT | DIRTY_FRUSTUM | DIRTY_CHANNEL |
172 DIRTY_EYES | DIRTY_OBJECT_BITS
176 virtual uint64_t getRedistributableBits()
const 178 return DIRTY_SEGMENT_BITS;
182 virtual void notifyFrustumChanged() { setDirty(DIRTY_FRUSTUM); }
195 SwapBarrierPtr _swapBarrier;
201 template <
class C,
class S,
class CH>
202 std::ostream& operator<<(std::ostream&, const Segment<C, S, CH>&);
205 #endif // EQFABRIC_SEGMENT_H A fractional viewport with methods for manipulation.
const Viewport & getViewport() const
A wall defining a view frustum.
A visitor to traverse leaf nodes of a graph.
DirtyBits
The changed parts of the object since the last pack().
A projector definition defining a view frustum.
EQFABRIC_INL VisitorResult accept(Visitor &visitor)
Traverse this segment using a segment visitor.
The Equalizer client library.
const C * getCanvas() const
CH * getChannel()
Return the output channel of this segment.
Base data transport class for segments.
const CH * getChannel() const
Return the output channel of this segment.
Internal base class for all distributed, inheritable Equalizer objects.
LeafVisitor< S > Visitor
The segment visitor type.
A distributed object for frustum data.