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 >
61 EQFABRIC_INL
void setViewport(
const Viewport& vp );
72 void setChannel( CH* channel )
73 { _channel = channel; setDirty( DIRTY_CHANNEL ); }
82 EQFABRIC_INL
virtual void setWall(
const Wall& wall );
85 EQFABRIC_INL
virtual void setProjection(
const Projection& );
88 EQFABRIC_INL
virtual void unsetFrustum();
91 uint32_t
getEyes()
const {
return _eyes; }
101 EQFABRIC_INL
void setEyes(
const uint32_t eyes );
111 void enableEye(
const uint32_t eyes ) { _eyes |= eyes; }
121 EQFABRIC_INL
void setSwapBarrier( SwapBarrierPtr barrier );
124 SwapBarrierConstPtr getSwapBarrier()
const {
return _swapBarrier; }
127 SwapBarrierPtr getSwapBarrier() {
return _swapBarrier; }
139 EQFABRIC_INL VisitorResult
accept( Visitor& visitor );
142 EQFABRIC_INL VisitorResult
accept( Visitor& visitor )
const;
145 void inheritFrustum();
147 virtual void backup();
148 virtual void restore();
151 virtual uint128_t commit(
const uint32_t incarnation=CO_COMMIT_NEXT );
156 EQFABRIC_INL
explicit Segment( C* canvas );
159 EQFABRIC_INL
virtual ~Segment();
162 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
163 const uint64_t dirtyBits );
165 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
166 const uint64_t dirtyBits );
167 virtual void setDirty(
const uint64_t bits );
172 DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 0,
173 DIRTY_FRUSTUM = Object::DIRTY_CUSTOM << 1,
174 DIRTY_CHANNEL = Object::DIRTY_CUSTOM << 2,
175 DIRTY_EYES = Object::DIRTY_CUSTOM << 3,
176 DIRTY_SEGMENT_BITS = DIRTY_VIEWPORT | DIRTY_FRUSTUM |
177 DIRTY_CHANNEL | DIRTY_EYES | DIRTY_OBJECT_BITS
181 virtual uint64_t getRedistributableBits()
const 182 {
return DIRTY_SEGMENT_BITS; }
185 virtual void notifyFrustumChanged() { setDirty( DIRTY_FRUSTUM ); }
199 SwapBarrierPtr _swapBarrier;
205 template<
class C,
class S,
class CH >
206 std::ostream& operator << ( std::ostream&, const Segment< C, S, CH >& );
209 #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
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.
Internal base class for all distributed, inheritable Equalizer objects.
A distributed object for frustum data.