20 #ifndef EQFABRIC_VIEW_H 21 #define EQFABRIC_VIEW_H 24 #include <eq/fabric/equalizer.h> 25 #include <eq/fabric/frame.h> 26 #include <eq/fabric/frustum.h> 27 #include <eq/fabric/object.h> 28 #include <eq/fabric/types.h> 29 #include <eq/fabric/viewport.h> 36 #define EQ_UNDEFINED_UNIT -1.f 43 template <
class L,
class V,
class O>
45 class View :
public Object,
public Frustum
81 EQFABRIC_INL
void setOverdraw(
const Vector2i& pixels);
97 EQFABRIC_INL
void setViewport(
const Viewport& viewport);
115 virtual void activateMode(
const Mode mode) { _data.mode = mode; }
156 virtual EQFABRIC_INL
void backup();
157 virtual EQFABRIC_INL
void restore();
212 void setCapabilities(
const uint64_t bitmask);
213 virtual void updateCapabilities() {}
217 DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 0,
218 DIRTY_OBSERVER = Object::DIRTY_CUSTOM << 1,
219 DIRTY_OVERDRAW = Object::DIRTY_CUSTOM << 2,
220 DIRTY_FRUSTUM = Object::DIRTY_CUSTOM << 3,
221 DIRTY_MODE = Object::DIRTY_CUSTOM << 4,
222 DIRTY_MINCAPS = Object::DIRTY_CUSTOM << 5,
223 DIRTY_MAXCAPS = Object::DIRTY_CUSTOM << 6,
224 DIRTY_CAPABILITIES = Object::DIRTY_CUSTOM << 7,
225 DIRTY_EQUALIZER = Object::DIRTY_CUSTOM << 8,
226 DIRTY_EQUALIZERS = Object::DIRTY_CUSTOM << 9,
227 DIRTY_MODELUNIT = Object::DIRTY_CUSTOM << 10,
228 DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 11,
229 DIRTY_SCREENSHOT = Object::DIRTY_CUSTOM << 12,
231 DIRTY_VIEWPORT | DIRTY_OBSERVER | DIRTY_OVERDRAW | DIRTY_FRUSTUM |
232 DIRTY_MODE | DIRTY_MINCAPS | DIRTY_MAXCAPS | DIRTY_CAPABILITIES |
233 DIRTY_OBJECT_BITS | DIRTY_EQUALIZER | DIRTY_EQUALIZERS |
234 DIRTY_MODELUNIT | DIRTY_ATTRIBUTES | DIRTY_SCREENSHOT
243 SATTR_ALL = SATTR_LAST + 5
256 EQFABRIC_INL
explicit View(L* layout);
259 EQFABRIC_INL
virtual ~View();
275 EQFABRIC_INL
virtual void serialize(co::DataOStream& os,
276 const uint64_t dirtyBits);
279 EQFABRIC_INL
virtual void deserialize(co::DataIStream& is,
280 const uint64_t dirtyBits);
283 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits);
286 void setSAttribute(
const SAttribute attr,
const std::string& value)
288 _sAttributes[attr] = value;
289 setDirty(DIRTY_ATTRIBUTES);
293 virtual uint64_t getRedistributableBits()
const {
return DIRTY_VIEW_BITS; }
295 virtual void notifyFrustumChanged() { setDirty(DIRTY_FRUSTUM); }
310 uint64_t _minimumCapabilities;
311 uint64_t _maximumCapabilities;
312 uint64_t _capabilities;
313 uint32_t _equalizers;
328 std::string _sAttributes[SATTR_ALL];
331 template <
class L,
class V,
class O>
332 EQFABRIC_INL std::ostream&
operator<<(std::ostream& os,
336 #endif // EQFABRIC_VIEW_H
EQFABRIC_INL void useEqualizer(uint32_t equalizerMask)
EQFABRIC_INL float getModelUnit() const
Get the model unit of this view.
EQFABRIC_INL VisitorResult accept(LeafVisitor< V > &visitor)
Traverse this view using a view visitor.
Render in mono (cyclop eye)
Defines export visibility macros for library EqualizerFabric.
A fractional viewport with methods for manipulation.
A visitor to traverse leaf nodes of a graph.
SAttribute
String attributes.
EQFABRIC_INL uint64_t getMinimumCapabilities() const
const L * getLayout() const
const O * getObserver() const
const version of getObserver().
DirtyBits
The changed parts of the object since the last pack().
EQFABRIC_INL uint64_t getMaximumCapabilities() const
Base data transport class for views.
EQFABRIC_INL void setOverdraw(const Vector2i &pixels)
EQFABRIC_INL const std::string & getSAttribute(const SAttribute attr) const
virtual EQFABRIC_INL void changeMode(const Mode mode)
Set the mode of this view.
const Vector2i & getOverdraw() const
Mode
The current rendering mode.
Render in stereo (left & right eye)
EQFABRIC_INL void setObserver(O *observer)
Set the entity tracking this view.
EQFABRIC_INL uint64_t getCapabilities() const
The Equalizer client library.
uint32_t getEqualizers() const
virtual bool hasMasterUserData()
The application view instance holds the user data master by default.
EQFABRIC_INL Frame::Buffer getScreenshotBuffers() const
std::ostream & operator<<(std::ostream &os, const AxisEvent &event)
Print the axis event to the given output stream.
EQFABRIC_INL const Viewport & getViewport() const
Buffer
Components of the frame are to be used during readback and assembly.
EQFABRIC_INL bool setModelUnit(const float modelUnit)
Set the model unit of this view.
virtual EQFABRIC_INL uint32_t getUserDataLatency() const
The view user data instance uses the config latency by default.
static EQFABRIC_INL const std::string & getSAttributeString(const SAttribute attr)
EQFABRIC_INL void setMinimumCapabilities(const uint64_t bitmask)
Set the minimum required capabilities for this view.
EQFABRIC_INL void setMaximumCapabilities(const uint64_t bitmask)
Set the maximum desired capabilities for this view.
EQFABRIC_INL bool isActive() const
Base data transport class for equalizers.
EQFABRIC_INL const Equalizer & getEqualizer() const