Equalizer
2.1.0
Parallel Rendering Framework
|
A View is a 2D area of a Layout. More...
#include <view.h>
Public Member Functions | |
EQ_API | View (Layout *parent) |
Construct a new view. More... | |
virtual EQ_API | ~View () |
Destruct this view. More... | |
Data Access. | |
Pipe * | getPipe () |
EQ_API const Pipe * | getPipe () const |
EQ_API Config * | getConfig () |
EQ_API const Config * | getConfig () const |
EQ_API ServerPtr | getServer () |
Public Member Functions inherited from eq::fabric::View< Layout, View, Observer > | |
void | setCapabilities (const uint64_t bitmask) |
virtual void | updateCapabilities () |
EQFABRIC_INL const std::string & | getSAttribute (const SAttribute attr) const |
EQFABRIC_INL const Viewport & | getViewport () const |
Layout * | getLayout () |
const Layout * | getLayout () const |
EQFABRIC_INL void | setObserver (Observer *observer) |
Set the entity tracking this view. More... | |
Observer * | getObserver () |
const Observer * | getObserver () const |
const version of getObserver(). More... | |
EQFABRIC_INL void | setOverdraw (const Vector2i &pixels) |
const Vector2i & | getOverdraw () const |
EQFABRIC_INL void | useEqualizer (uint32_t equalizerMask) |
uint32_t | getEqualizers () const |
EQFABRIC_INL const Equalizer & | getEqualizer () const |
EQFABRIC_INL Equalizer & | getEqualizer () |
EQFABRIC_INL void | setViewport (const Viewport &viewport) |
Mode | getMode () const |
virtual EQFABRIC_INL void | changeMode (const Mode mode) |
Set the mode of this view. More... | |
virtual void | activateMode (const Mode mode) |
EQFABRIC_INL bool | isActive () const |
EQFABRIC_INL bool | setModelUnit (const float modelUnit) |
Set the model unit of this view. More... | |
EQFABRIC_INL float | getModelUnit () const |
Get the model unit of this view. More... | |
EQFABRIC_INL VisitorResult | accept (LeafVisitor< View > &visitor) |
Traverse this view using a view visitor. More... | |
EQFABRIC_INL VisitorResult | accept (LeafVisitor< View > &visitor) const |
Const-version of accept(). More... | |
virtual EQFABRIC_INL void | backup () |
virtual EQFABRIC_INL void | restore () |
EQFABRIC_INL void | setMinimumCapabilities (const uint64_t bitmask) |
Set the minimum required capabilities for this view. More... | |
EQFABRIC_INL uint64_t | getMinimumCapabilities () const |
EQFABRIC_INL void | setMaximumCapabilities (const uint64_t bitmask) |
Set the maximum desired capabilities for this view. More... | |
EQFABRIC_INL uint64_t | getMaximumCapabilities () const |
EQFABRIC_INL uint64_t | getCapabilities () const |
EQFABRIC_INL Frame::Buffer | getScreenshotBuffers () const |
Public Member Functions inherited from eq::fabric::Object | |
EQFABRIC_API bool | isDirty () const override |
EQFABRIC_API uint128_t | commit (const uint32_t incarnation=CO_COMMIT_NEXT) override |
virtual EQFABRIC_API void | setName (const std::string &name) |
Set the name of the object. More... | |
EQFABRIC_API const std::string & | getName () const |
EQFABRIC_API void | setUserData (co::Object *userData) |
Set user-specific data. More... | |
EQFABRIC_API co::Object * | getUserData () |
EQFABRIC_API const co::Object * | getUserData () const |
EQFABRIC_API uint32_t | getTasks () const |
Return the set of tasks this channel might execute in the worst case. More... | |
EQFABRIC_API uint32_t | getSerial () const |
Public Member Functions inherited from eq::fabric::Frustum | |
EQFABRIC_API | Frustum () |
Construct a new frustum. More... | |
virtual EQFABRIC_API | ~Frustum () |
Destruct the frustum. More... | |
EQFABRIC_API void | setWall (const Wall &wall) |
Set the frustum using a wall description. More... | |
EQFABRIC_API void | setProjection (const Projection &projection) |
Set the frustum using a projection description. More... | |
const Wall & | getWall () const |
const Projection & | getProjection () const |
Type | getCurrentType () const |
EQFABRIC_API void | unsetFrustum () |
Set the last specified frustum to TYPE_NONE. More... | |
EQFABRIC_API void | serialize (co::DataOStream &os) |
EQFABRIC_API void | deserialize (co::DataIStream &is) |
Protected Member Functions | |
virtual EQ_API void | deserialize (co::DataIStream &is, const uint64_t dirtyBits) |
EQ_API const Frustum & | getBaseFrustum () const |
virtual EQ_API void | detach () |
Protected Member Functions inherited from eq::fabric::View< Layout, View, Observer > | |
EQFABRIC_INL | View (Layout *layout) |
virtual bool | hasMasterUserData () |
The application view instance holds the user data master by default. More... | |
virtual EQFABRIC_INL uint32_t | getUserDataLatency () const |
The view user data instance uses the config latency by default. More... | |
virtual EQFABRIC_INL void | serialize (co::DataOStream &os, const uint64_t dirtyBits) |
virtual EQFABRIC_INL void | setDirty (const uint64_t bits) |
void | setSAttribute (const SAttribute attr, const std::string &value) |
virtual uint64_t | getRedistributableBits () const |
virtual void | notifyFrustumChanged () |
void | _setScreenshotBuffers (Frame::Buffer buffers) |
Protected Member Functions inherited from eq::fabric::Object | |
EQFABRIC_API | Object () |
Construct a new Object. More... | |
EQFABRIC_API | Object (const Object &) |
Construct an unmapped, unregistered copy of an object. More... | |
virtual EQFABRIC_API | ~Object () |
Destruct the object. More... | |
EQFABRIC_API Object & | operator= (const Object &from) |
NOP assignment operator. More... | |
EQFABRIC_API void | setTasks (const uint32_t tasks) |
EQFABRIC_API void | notifyDetach () override |
EQFABRIC_API void | serialize (co::DataOStream &os, const uint64_t dirtyBits) override |
EQFABRIC_API void | deserialize (co::DataIStream &is, const uint64_t dirtyBits) override |
EQFABRIC_API void | postRemove (Object *child) |
virtual void | removeChild (const uint128_t &) |
template<class C , class S > | |
void | commitChild (C *child, S *sender, uint32_t cmd, const uint32_t incarnation) |
template<class C > | |
void | commitChild (C *child, const uint32_t incarnation) |
template<class C , class S > | |
void | commitChildren (const std::vector< C * > &children, S *sender, uint32_t cmd, const uint32_t incarnation) |
template<class C > | |
void | commitChildren (const std::vector< C * > &children, uint32_t cmd, const uint32_t incarnation) |
template<class C > | |
void | commitChildren (const std::vector< C * > &children, const uint32_t incarnation) |
template<class C > | |
void | syncChildren (const std::vector< C * > &children) |
template<class P , class C > | |
void | releaseChildren (const std::vector< C * > &children) |
EQFABRIC_API bool | _cmdSync (co::ICommand &command) |
EQFABRIC_API void | updateEvent (Event &event, int64_t time) |
Protected Member Functions inherited from eq::fabric::Frustum | |
virtual void | updateFrustum () |
Friends | |
class | Pipe |
Operations | |
using | ScreenshotFunc = std::function< void(uint32_t, const Image &)> |
Callback function called during eq::Config::handleEvents() after capturing a complete screenshot. More... | |
virtual EQ_API bool | handleEvent (EventType type, const SizeEvent &event) |
Handle a received (view) event. More... | |
EQ_API void | enableScreenshot (Frame::Buffer buffers, const ScreenshotFunc &func) |
Enable recording of given buffers for screenshot feature. More... | |
EQ_API void | disableScreenshot () |
Stop recording of screenshots. More... | |
bool | handleEvent (EventICommand &command) |
void | sendScreenshotEvent (const Viewport &viewport, const uint32_t frameNumber, const Image &image) |
Callbacks | |
Callbacks are called by Equalizer during rendering to execute various actions from the application main thread before sending the corresponding command to the server. | |
class | detail::InitVisitor |
class | detail::ExitVisitor |
virtual bool | configInit () |
Initialize this view. More... | |
virtual bool | configExit () |
Exit this view. More... | |
Additional Inherited Members | |
Public Types inherited from eq::fabric::View< Layout, View, Observer > | |
enum | Mode |
The current rendering mode. More... | |
enum | DirtyBits |
enum | SAttribute |
String attributes. More... | |
Public Types inherited from eq::fabric::Object | |
enum | DirtyBits { DIRTY_NAME = Serializable::DIRTY_CUSTOM << 0, DIRTY_USERDATA = Serializable::DIRTY_CUSTOM << 1, DIRTY_TASKS = Serializable::DIRTY_CUSTOM << 2, DIRTY_REMOVED = Serializable::DIRTY_CUSTOM << 3, DIRTY_SERIAL = Serializable::DIRTY_CUSTOM << 4, DIRTY_CUSTOM = Serializable::DIRTY_CUSTOM << 6, DIRTY_OBJECT_BITS = DIRTY_NAME | DIRTY_USERDATA } |
The changed parts of the object since the last pack(). More... | |
Public Types inherited from eq::fabric::Frustum | |
enum | Type { TYPE_NONE, TYPE_WALL, TYPE_PROJECTION } |
The type of the last specified frustum. More... | |
Static Public Member Functions inherited from eq::fabric::View< Layout, View, Observer > | |
static EQFABRIC_INL const std::string & | getSAttributeString (const SAttribute attr) |
A View is a 2D area of a Layout.
It is a view of the application's data on a model, in the sense used by the MVC pattern. It can be a scene, viewing mode, viewing position, or any other representation of the application's data.
using eq::View::ScreenshotFunc = std::function<void(uint32_t, const Image&)> |
Callback function called during eq::Config::handleEvents() after capturing a complete screenshot.
|
explicit |
Construct a new view.
|
virtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
EQ_API void eq::View::disableScreenshot | ( | ) |
Stop recording of screenshots.
EQ_API void eq::View::enableScreenshot | ( | Frame::Buffer | buffers, |
const ScreenshotFunc & | func | ||
) |
Enable recording of given buffers for screenshot feature.
buffers | bitmask of buffers to capture in screenshot image |
func | callback function with frame number and screenshot image |
|
protected |
EQ_API Config* eq::View::getConfig | ( | ) |
EQ_API const Config* eq::View::getConfig | ( | ) | const |
|
inline |
|
inline |
Definition at line 66 of file view.h.
References eq::getConfig().
|
virtual |
Handle a received (view) event.
The task of this method is to update the view as necessary. It is called by Config::handleEvent on the application main thread for all view events. Thread safe.
type | the event type. |
event | the received view event. |