18 #ifndef EQFABRIC_SEGMENT_H
19 #define EQFABRIC_SEGMENT_H
21 #include <eq/fabric/types.h>
22 #include <eq/fabric/frustum.h>
23 #include <eq/fabric/object.h>
24 #include <eq/fabric/swapBarrier.h>
25 #include <eq/fabric/viewport.h>
32 template<
class C,
class S,
class CH >
60 EQFABRIC_INL
void setViewport(
const Viewport& vp );
71 void setChannel( CH* channel )
72 { _channel = channel; setDirty( DIRTY_CHANNEL ); }
81 EQFABRIC_INL
virtual void setWall(
const Wall& wall );
84 EQFABRIC_INL
virtual void setProjection(
const Projection& );
87 EQFABRIC_INL
virtual void unsetFrustum();
90 uint32_t
getEyes()
const {
return _eyes; }
100 EQFABRIC_INL
void setEyes(
const uint32_t eyes );
110 void enableEye(
const uint32_t eyes ) { _eyes |= eyes; }
120 EQFABRIC_INL
void setSwapBarrier( SwapBarrierPtr barrier );
123 SwapBarrierConstPtr getSwapBarrier()
const {
return _swapBarrier; }
126 SwapBarrierPtr getSwapBarrier() {
return _swapBarrier; }
144 void inheritFrustum();
146 virtual void backup();
147 virtual void restore();
150 virtual uint128_t commit(
const uint32_t incarnation=CO_COMMIT_NEXT );
155 EQFABRIC_INL Segment( C* canvas );
158 EQFABRIC_INL
virtual ~Segment();
161 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
162 const uint64_t dirtyBits );
164 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
165 const uint64_t dirtyBits );
166 virtual void setDirty(
const uint64_t bits );
171 DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 0,
172 DIRTY_FRUSTUM = Object::DIRTY_CUSTOM << 1,
173 DIRTY_CHANNEL = Object::DIRTY_CUSTOM << 2,
174 DIRTY_EYES = Object::DIRTY_CUSTOM << 3,
175 DIRTY_SEGMENT_BITS = DIRTY_VIEWPORT | DIRTY_FRUSTUM |
176 DIRTY_CHANNEL | DIRTY_EYES | DIRTY_OBJECT_BITS
180 virtual uint64_t getRedistributableBits()
const
181 {
return DIRTY_SEGMENT_BITS; }
184 virtual void notifyFrustumChanged() { setDirty( DIRTY_FRUSTUM ); }
198 SwapBarrierPtr _swapBarrier;
204 template<
class C,
class S,
class CH >
205 std::ostream& operator << ( std::ostream&, const Segment< C, S, CH >& );
208 #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.
A projector definition defining a view frustum.
EQFABRIC_INL VisitorResult accept(Visitor &visitor)
Traverse this segment using a segment visitor.
const C * getCanvas() const
LeafVisitor< S > Visitor
The segment visitor type.
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.
lunchbox::VisitorResult VisitorResult
The result code from any visit operation.
Internal base class for all distributed, inheritable Equalizer objects.
A distributed object for frustum data.