Equalizer
1.4.1
|
Base data transport class for channels. More...
#include <channel.h>
Classes | |
struct | BackupData |
Public Member Functions | |
virtual bool | omitOutput () const |
virtual void | output (std::ostream &) const |
Data Access | |
void | init () |
W * | getWindow () |
const W * | getWindow () const |
bool | isDestination () const |
void | setViewVersion (const co::ObjectVersion &view) |
const co::ObjectVersion & | getViewVersion () const |
void | setPixelViewport (const PixelViewport &pvp) |
EQFABRIC_INL void | setViewport (const Viewport &vp) |
virtual void | notifyViewportChanged () |
const PixelViewport & | getNativePixelViewport () const |
bool | hasFixedViewport () const |
EQFABRIC_INL void | setNearFar (const float nearPlane, const float farPlane) |
Set the near and far planes for this channel. | |
uint32_t | getDrawable () const |
EQFABRIC_INL VisitorResult | accept (Visitor &visitor) |
Traverse this channel using a channel visitor. | |
EQFABRIC_INL VisitorResult | accept (Visitor &visitor) const |
Const-version of accept(). | |
EQFABRIC_INL void | setCapabilities (const uint64_t bitmask) |
Set the capabilities supported by the channel. | |
EQFABRIC_INL uint64_t | getCapabilities () const |
EQFABRIC_INL void | setMaxSize (const Vector2i &size) |
void | setOverdraw (const Vector4i &overdraw) |
const Vector2i & | getMaxSize () const |
EQFABRIC_INL ChannelPath | getPath () const |
virtual EQFABRIC_INL void | backup () |
virtual EQFABRIC_INL void | restore () |
Context-specific data access. | |
The data returned by these methods depends on the context (callback) they are called from, typically the data for the current rendering task. If they are called outside of a frame task method, they return the channel's native parameter, e.g., a placeholder value for the task decomposition parameters. | |
uint32_t | getDrawBuffer () const |
uint32_t | getReadBuffer () const |
const ColorMask & | getDrawBufferMask () const |
const PixelViewport & | getPixelViewport () const |
virtual bool | useOrtho () const |
Select perspective or orthographic rendering. | |
const Frustumf & | getFrustum () const |
const Frustumf & | getPerspective () const |
const Frustumf & | getOrtho () const |
const Matrix4f & | getHeadTransform () const |
Return the view matrix. | |
const Matrix4f & | getPerspectiveTransform () const |
Return the perspective view matrix. | |
const Matrix4f & | getOrthoTransform () const |
Return the orthographic view matrix. | |
const Viewport & | getViewport () const |
const Range & | getRange () const |
const Pixel & | getPixel () const |
const SubPixel & | getSubPixel () const |
const Zoom & | getZoom () const |
uint32_t | getPeriod () const |
uint32_t | getPhase () const |
const Vector2i & | getPixelOffset () const |
Get the channel's current position wrt the destination channel. | |
Eye | getEye () const |
const Vector4i & | getOverdraw () const |
uint32_t | getTaskID () const |
Public Types | |
enum | Drawable { FB_WINDOW = LB_BIT_NONE, FBO_COLOR = LB_BIT1, FBO_DEPTH = LB_BIT2, FBO_STENCIL = LB_BIT3 } |
The drawable format defines the components used as an alternate drawable for this cannel. More... | |
typedef LeafVisitor< C > | Visitor |
The channel visitor type. | |
typedef W | Parent |
The parent window type. | |
Protected Member Functions | |
EQFABRIC_INL | Channel (W *parent) |
Construct a new channel. | |
Channel (const Channel &from) | |
Construct a copy of a channel (view/segment dest). | |
virtual EQFABRIC_INL | ~Channel () |
Destruct the channel. | |
virtual EQFABRIC_INL void | serialize (co::DataOStream &os, const uint64_t dirtyBits) |
Worker for pack() and getInstanceData(). | |
virtual EQFABRIC_INL void | deserialize (co::DataIStream &is, const uint64_t dirtyBits) |
Worker for unpack() and applyInstanceData(). | |
virtual EQFABRIC_INL void | setDirty (const uint64_t bits) |
Add dirty flags to mark data for distribution. | |
void | setDrawable (const uint32_t drawable) |
void | setIAttribute (const IAttribute attr, const int32_t value) |
virtual ChangeType | getChangeType () const |
virtual uint64_t | getRedistributableBits () const |
virtual void | updateCapabilities () |
Render context access | |
void | overrideContext (RenderContext &context) |
void | resetRenderContext () |
const RenderContext & | getContext () const |
const RenderContext & | getNativeContext () const |
Protected Types | |
enum | DirtyBits { DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0, DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 1, DIRTY_MEMBER = Object::DIRTY_CUSTOM << 2, DIRTY_FRUSTUM = Object::DIRTY_CUSTOM << 3, DIRTY_CAPABILITIES = Object::DIRTY_CUSTOM << 4, DIRTY_CHANNEL_BITS } |
The changed parts of the object since the last pack(). More... | |
Attributes | |
enum | IAttribute { IATTR_HINT_STATISTICS, IATTR_HINT_SENDTOKEN, IATTR_LAST, IATTR_ALL = IATTR_LAST + 5 } |
Integer attributes for a channel. More... | |
EQFABRIC_INL int32_t | getIAttribute (const IAttribute attr) const |
static EQFABRIC_INL const std::string & | getIAttributeString (const IAttribute attr) |
Base data transport class for channels.
Definition at line 33 of file include/eq/fabric/channel.h.
enum eq::fabric::Channel::DirtyBits [protected] |
The changed parts of the object since the last pack().
Subclasses should define their own bits, starting at DIRTY_CUSTOM.
Reimplemented from eq::fabric::Object.
Definition at line 374 of file include/eq/fabric/channel.h.
enum eq::fabric::Channel::Drawable |
The drawable format defines the components used as an alternate drawable for this cannel.
If an alternate drawable is configured, the channel uses the appropriate targets in place of the window's frame buffer.
FB_WINDOW |
Use the window's frame buffer. |
FBO_COLOR |
Use an FBO for color values. |
FBO_DEPTH |
Use an FBO for depth values. |
FBO_STENCIL |
Use an FBO for stencil values. |
Definition at line 46 of file include/eq/fabric/channel.h.
enum eq::fabric::Channel::IAttribute |
Integer attributes for a channel.
IATTR_HINT_STATISTICS |
Statistics gathering mode (OFF, FASTEST [ON], NICEST) |
IATTR_HINT_SENDTOKEN |
Use a send token for output frames (OFF, ON) |
Definition at line 309 of file include/eq/fabric/channel.h.
EQFABRIC_INL VisitorResult eq::fabric::Channel< W, C >::accept | ( | Visitor & | visitor | ) |
Traverse this channel using a channel visitor.
visitor | the visitor. |
EQFABRIC_INL VisitorResult eq::fabric::Channel< W, C >::accept | ( | Visitor & | visitor | ) | const |
Const-version of accept().
virtual EQFABRIC_INL void eq::fabric::Channel< W, C >::deserialize | ( | co::DataIStream & | , |
const uint64_t | |||
) | [protected, virtual] |
Worker for unpack() and applyInstanceData().
This function is called with the dirty bits send by the master instance. The dirty bits are received beforehand, and do not need to be deserialized by the overriding method.
Reimplemented from eq::fabric::Object.
EQFABRIC_INL uint64_t eq::fabric::Channel< W, C >::getCapabilities | ( | ) | const |
virtual ChangeType eq::fabric::Channel< W, C >::getChangeType | ( | ) | const [inline, protected, virtual] |
Reimplemented from co::Serializable.
Definition at line 372 of file include/eq/fabric/channel.h.
uint32_t eq::fabric::Channel< W, C >::getDrawable | ( | ) | const [inline] |
Definition at line 110 of file include/eq/fabric/channel.h.
uint32_t eq::fabric::Channel< W, C >::getDrawBuffer | ( | ) | const [inline] |
Definition at line 161 of file include/eq/fabric/channel.h.
const ColorMask& eq::fabric::Channel< W, C >::getDrawBufferMask | ( | ) | const [inline] |
Definition at line 167 of file include/eq/fabric/channel.h.
Eye eq::fabric::Channel< W, C >::getEye | ( | ) | const [inline] |
Definition at line 296 of file include/eq/fabric/channel.h.
const Frustumf& eq::fabric::Channel< W, C >::getFrustum | ( | ) | const [inline] |
Definition at line 190 of file include/eq/fabric/channel.h.
const Matrix4f& eq::fabric::Channel< W, C >::getHeadTransform | ( | ) | const [inline] |
Return the view matrix.
The view matrix is part of the GL_MODEL*VIEW* matrix, and is typically applied first to the GL_MODELVIEW matrix.
Definition at line 214 of file include/eq/fabric/channel.h.
EQFABRIC_INL int32_t eq::fabric::Channel< W, C >::getIAttribute | ( | const IAttribute | attr | ) | const |
static EQFABRIC_INL const std::string& eq::fabric::Channel< W, C >::getIAttributeString | ( | const IAttribute | attr | ) | [static] |
const PixelViewport& eq::fabric::Channel< W, C >::getNativePixelViewport | ( | ) | const [inline] |
Definition at line 86 of file include/eq/fabric/channel.h.
const Frustumf& eq::fabric::Channel< W, C >::getOrtho | ( | ) | const [inline] |
Definition at line 203 of file include/eq/fabric/channel.h.
Referenced by eq::fabric::Channel< Window, Channel >::getFrustum().
const Matrix4f& eq::fabric::Channel< W, C >::getOrthoTransform | ( | ) | const [inline] |
Return the orthographic view matrix.
The view matrix is part of the GL_MODEL*VIEW* matrix, and is typically applied first to the GL_MODELVIEW matrix.
Definition at line 238 of file include/eq/fabric/channel.h.
Referenced by eq::fabric::Channel< Window, Channel >::getHeadTransform().
const Vector4i& eq::fabric::Channel< W, C >::getOverdraw | ( | ) | const [inline] |
Definition at line 299 of file include/eq/fabric/channel.h.
uint32_t eq::fabric::Channel< W, C >::getPeriod | ( | ) | const [inline] |
Definition at line 275 of file include/eq/fabric/channel.h.
const Frustumf& eq::fabric::Channel< W, C >::getPerspective | ( | ) | const [inline] |
Definition at line 197 of file include/eq/fabric/channel.h.
Referenced by eq::fabric::Channel< Window, Channel >::getFrustum().
const Matrix4f& eq::fabric::Channel< W, C >::getPerspectiveTransform | ( | ) | const [inline] |
Return the perspective view matrix.
The view matrix is part of the GL_MODEL*VIEW* matrix, and is typically applied first to the GL_MODELVIEW matrix.
Definition at line 226 of file include/eq/fabric/channel.h.
Referenced by eq::fabric::Channel< Window, Channel >::getHeadTransform().
uint32_t eq::fabric::Channel< W, C >::getPhase | ( | ) | const [inline] |
Definition at line 281 of file include/eq/fabric/channel.h.
const Pixel& eq::fabric::Channel< W, C >::getPixel | ( | ) | const [inline] |
Definition at line 257 of file include/eq/fabric/channel.h.
const Vector2i& eq::fabric::Channel< W, C >::getPixelOffset | ( | ) | const [inline] |
Get the channel's current position wrt the destination channel.
Note that computing this value from the current viewport and pixel viewport is inaccurate because it neglects rounding errors of the pixel viewport done by the server.
Definition at line 293 of file include/eq/fabric/channel.h.
const PixelViewport& eq::fabric::Channel< W, C >::getPixelViewport | ( | ) | const [inline] |
Definition at line 174 of file include/eq/fabric/channel.h.
const Range& eq::fabric::Channel< W, C >::getRange | ( | ) | const [inline] |
Definition at line 251 of file include/eq/fabric/channel.h.
uint32_t eq::fabric::Channel< W, C >::getReadBuffer | ( | ) | const [inline] |
Definition at line 164 of file include/eq/fabric/channel.h.
const SubPixel& eq::fabric::Channel< W, C >::getSubPixel | ( | ) | const [inline] |
Definition at line 263 of file include/eq/fabric/channel.h.
uint32_t eq::fabric::Channel< W, C >::getTaskID | ( | ) | const [inline] |
Definition at line 302 of file include/eq/fabric/channel.h.
const Viewport& eq::fabric::Channel< W, C >::getViewport | ( | ) | const [inline] |
Definition at line 245 of file include/eq/fabric/channel.h.
W* eq::fabric::Channel< W, C >::getWindow | ( | ) | [inline] |
const W* eq::fabric::Channel< W, C >::getWindow | ( | ) | const [inline] |
const Zoom& eq::fabric::Channel< W, C >::getZoom | ( | ) | const [inline] |
Definition at line 269 of file include/eq/fabric/channel.h.
bool eq::fabric::Channel< W, C >::hasFixedViewport | ( | ) | const [inline] |
Definition at line 90 of file include/eq/fabric/channel.h.
virtual EQFABRIC_INL void eq::fabric::Channel< W, C >::serialize | ( | co::DataOStream & | , |
const uint64_t | |||
) | [protected, virtual] |
Worker for pack() and getInstanceData().
Override this and deserialize() if you want to distribute subclassed data.
This method is called with DIRTY_ALL from getInstanceData() and with the actual dirty bits from pack(), which also resets the dirty state afterwards. The dirty bits are transmitted beforehand, and do not need to be transmitted by the overriding method.
Reimplemented from eq::fabric::Object.
EQFABRIC_INL void eq::fabric::Channel< W, C >::setCapabilities | ( | const uint64_t | bitmask | ) |
Set the capabilities supported by the channel.
Channel which do not support all capabilities required by the current destination view do not execute any tasks. The capabilities are an application-defined bit mask. By default all bits are set.
virtual EQFABRIC_INL void eq::fabric::Channel< W, C >::setDirty | ( | const uint64_t | bits | ) | [protected, virtual] |
EQFABRIC_INL void eq::fabric::Channel< W, C >::setMaxSize | ( | const Vector2i & | size | ) |
EQFABRIC_INL void eq::fabric::Channel< W, C >::setNearFar | ( | const float | nearPlane, |
const float | farPlane | ||
) |
Set the near and far planes for this channel.
The given near and far planes update the current perspective and orthographics frustum accordingly. Furthermore, they will be used in the future by the server to compute the frusta.
nearPlane | the near plane. |
farPlane | the far plane. |
virtual bool eq::fabric::Channel< W, C >::useOrtho | ( | ) | const [inline, virtual] |
Select perspective or orthographic rendering.
Influences the behaviour of getFrustum, getHeadTransform and the corresponding apply methods in eq::Channel. Intended to be overwritten by the implementation to select orthographic rendering.
Reimplemented in eqPly::Channel, and eVolve::Channel.
Definition at line 184 of file include/eq/fabric/channel.h.
Referenced by eq::fabric::Channel< Window, Channel >::getFrustum(), and eq::fabric::Channel< Window, Channel >::getHeadTransform().