eq::server::Compound Class Reference

The compound. More...

#include <compound.h>

Collaboration diagram for eq::server::Compound:

Collaboration graph
[legend]

List of all members.

Classes

struct  InheritData

Public Types

enum  EyeMask { EYE_UNDEFINED = 0, EYE_CYCLOP_BIT = 1<<eq::EYE_CYCLOP, EYE_LEFT_BIT = 1<<eq::EYE_LEFT, EYE_RIGHT_BIT = 1<<eq::EYE_RIGHT }
 Eye pass bit mask for which the compound is enabled. More...
enum  ColorMask {
  COLOR_MASK_NONE = 0, COLOR_MASK_RED = 0x02, COLOR_MASK_GREEN = 0x04, COLOR_MASK_BLUE = 0x08,
  COLOR_MASK_ALL = 0xff
}
 The color mask bits, used for anaglyphic stereo. More...
typedef stde::hash_map
< std::string, net::Barrier * > 
BarrierMap
typedef stde::hash_map
< std::string, Frame * > 
FrameMap
Attributes
enum  IAttribute {
  IATTR_STEREO_MODE, IATTR_STEREO_ANAGLYPH_LEFT_MASK, IATTR_STEREO_ANAGLYPH_RIGHT_MASK, IATTR_HINT_OFFSET,
  IATTR_FILL1, IATTR_FILL2, IATTR_ALL
}

Public Member Functions

 Compound ()
 Constructs a new Compound.
 Compound (const Compound &from, Config *config, Compound *parent)
 Constructs a new, deep copy of the passed compound.
virtual ~Compound ()
 Destruct the compound and all children.
Data Access
void addChild (Compound *child)
 Adds a new child to this compound.
bool removeChild (Compound *child)
 Removes a child from this compound.
bool isLeaf () const
bool isDestination () const
const CompoundVector & getChildren () const
CompoundgetParent () const
CompoundgetRoot ()
const CompoundgetRoot () const
CompoundgetNext () const
ConfiggetConfig ()
const ConfiggetConfig () const
NodegetNode ()
void setName (const std::string &name)
const std::string & getName () const
void setChannel (Channel *channel)
 Set the channel of this compound.
ChannelgetChannel ()
 Return the channel of this compound.
const ChannelgetChannel () const
WindowgetWindow ()
const WindowgetWindow () const
PipegetPipe ()
const PipegetPipe () const
FrustumgetFrustum ()
void addEqualizer (Equalizer *equalizer)
 Attach a load balancer to this compound.
const EqualizerVector & getEqualizers () const
 Get the attached load balancers.
void setTasks (const uint32_t tasks)
 Set the tasks to be executed by the compound, overwriting previous tasks.
void enableTask (const eq::Task task)
 Add a task to be executed by the compound, preserving previous tasks.
uint32_t getTasks () const
void setBuffers (const uint32_t buffers)
 Set the image buffers to be used by the compound during recomposition, overwriting previous buffers.
void enableBuffer (const eq::Frame::Buffer buffer)
 Add a image buffer to be used by the compound, preserving previous buffers.
uint32_t getBuffers () const
void setViewport (const eq::Viewport &vp)
const eq::ViewportgetViewport () const
void setRange (const eq::Range &range)
const eq::RangegetRange () const
void setPeriod (const uint32_t period)
uint32_t getPeriod () const
void setPhase (const uint32_t phase)
uint32_t getPhase () const
void setPixel (const eq::Pixel &pixel)
const eq::PixelgetPixel () const
void setZoom (const eq::Zoom &zoom)
const eq::ZoomgetZoom () const
void setMaxFPS (const float fps)
float getMaxFPS () const
void setUsage (const float usage)
float getUsage () const
void setTaskID (const uint32_t id)
uint32_t getTaskID () const
IO object access.
void setSwapBarrier (SwapBarrier *barrier)
 Set a swap barrier.
const SwapBarriergetSwapBarrier () const
void addInputFrame (Frame *frame)
 Add a new input frame for this compound.
const FrameVector & getInputFrames () const
void addOutputFrame (Frame *frame)
 Add a new output frame for this compound.
const FrameVector & getOutputFrames () const
Inherit data access needed during channel update.
Inherit data are the actual, as opposed to configured, attributes and data used by the compound.

The inherit data is updated at the beginning of each update().

uint32_t getInheritBuffers () const
const eq::PixelViewportgetInheritPixelViewport () const
const Vector4igetInheritOverdraw () const
const eq::ViewportgetInheritViewport () const
const eq::RangegetInheritRange () const
const eq::PixelgetInheritPixel () const
const eq::ZoomgetInheritZoom () const
uint32_t getInheritPeriod () const
float getInheritMaxFPS () const
int32_t getInheritIAttribute (const IAttribute attr) const
const FrustumDatagetInheritFrustumData () const
uint32_t getInheritTasks () const
uint32_t getInheritEyes () const
const ChannelgetInheritChannel () const
bool testInheritTask (const eq::Task task) const
void unsetInheritTask (const eq::Task task)
 Delete an inherit task, if it was set.
bool testInheritEye (const eq::Eye eye) const
Frustum Operations
void setWall (const eq::Wall &wall)
 Set the compound's frustum using a wall description.
const eq::WallgetWall () const
void setProjection (const eq::Projection &projection)
 Set the compound's frustum using a projection description.
const eq::ProjectiongetProjection () const
eq::Frustum::Type getFrustumType () const
const eq::FrustumgetFrustum () const
void updateFrustum ()
 Update the frustum from the view or segment.
uint32_t getEyes () const
void setEyes (const uint32_t eyes)
 Set the eyes to be used by the compound.
void enableEye (const uint32_t eyes)
 Add eyes to be used by the compound.
Compound Operations.
VisitorResult accept (ConstCompoundVisitor &visitor) const
 Traverse the compound and all children using a compound visitor.
VisitorResult accept (CompoundVisitor &visitor)
 Non-const version of accept().
void activate ()
 Activate the compound tree.
void deactivate ()
 Deactivate the compound tree.
void setActive (const bool active)
 Set the active state of this compound only.
bool isActive () const
void init ()
 Initializes this compound.
void exit ()
 Exits this compound.
void update (const uint32_t frameNumber)
 Updates this compound.
void updateInheritData (const uint32_t frameNumber)
 Update the inherit data of this compound.
Compound listener interface.
void addListener (CompoundListener *listener)
 Register a compound listener.
void removeListener (CompoundListener *listener)
 Deregister a compound listener.
void fireUpdatePre (const uint32_t frameNumber)
 Notify all listeners that the compound is about to be updated.

Friends

class Config
 The config the compound is attached to, only set on the root compound.

Attributes

void setIAttribute (const IAttribute attr, const int32_t value)
int32_t getIAttribute (const IAttribute attr) const
static const std::string & getIAttributeString (const IAttribute attr)


Detailed Description

The compound.

Definition at line 55 of file compound.h.


Member Enumeration Documentation

Eye pass bit mask for which the compound is enabled.

Enumerator:
EYE_UNDEFINED  use inherited eye(s)
EYE_CYCLOP_BIT  monoscopic 'middle' eye
EYE_LEFT_BIT  left eye
EYE_RIGHT_BIT  right eye

Definition at line 74 of file compound.h.

The color mask bits, used for anaglyphic stereo.

Definition at line 83 of file compound.h.


Constructor & Destructor Documentation

eq::server::Compound::~Compound (  )  [virtual]

Destruct the compound and all children.

Definition at line 146 of file compound.cpp.

References eq::server::Frame::_compound, eq::server::Equalizer::attach(), and eq::server::Config::removeCompound().

Here is the call graph for this function:


Member Function Documentation

void eq::server::Compound::addChild ( Compound child  ) 

Adds a new child to this compound.

Parameters:
child the child.

Definition at line 213 of file compound.cpp.

References _parent.

Referenced by eq::server::Loader::addOutputCompounds(), and Compound().

Here is the caller graph for this function:

bool eq::server::Compound::removeChild ( Compound child  ) 

Removes a child from this compound.

Parameters:
child the child
Returns:
true if the child was removed, false otherwise.

Definition at line 221 of file compound.cpp.

References _parent.

bool eq::server::Compound::isLeaf (  )  const [inline]

Returns:
if the compound is a leaf compound.

Definition at line 129 of file compound.h.

Referenced by updateInheritData().

Here is the caller graph for this function:

bool eq::server::Compound::isDestination (  )  const

Returns:
if the compound has the destination channel.

Definition at line 430 of file compound.cpp.

References getChannel(), and getParent().

Referenced by activate(), deactivate(), updateFrustum(), updateInheritData(), eq::server::CompoundInitVisitor::visit(), and eq::server::CompoundExitVisitor::visit().

Here is the call graph for this function:

Here is the caller graph for this function:

const CompoundVector& eq::server::Compound::getChildren (  )  const [inline]

Returns:
the children of this compound.

Definition at line 135 of file compound.h.

Referenced by eq::server::LoadEqualizer::notifyUpdatePre().

Here is the caller graph for this function:

Compound* eq::server::Compound::getParent (  )  const [inline]

Returns:
the parent compound.

Definition at line 138 of file compound.h.

Referenced by eq::server::DFREqualizer::attach(), isDestination(), and eq::server::DFREqualizer::notifyUpdatePre().

Here is the caller graph for this function:

Compound* eq::server::Compound::getRoot (  )  [inline]

Returns:
the root of the compound tree.

Definition at line 142 of file compound.h.

References getRoot().

Referenced by getRoot(), and setSwapBarrier().

Here is the call graph for this function:

Here is the caller graph for this function:

Compound * eq::server::Compound::getNext (  )  const

Returns:
the next sibling, or 0.

Definition at line 234 of file compound.cpp.

References _children.

void eq::server::Compound::setChannel ( Channel channel  ) 

Set the channel of this compound.

The compound uses the channel for all rendering operations executed by this compound.

Parameters:
channel the channel.

Definition at line 258 of file compound.cpp.

Referenced by eq::server::Loader::addOutputCompounds().

Here is the caller graph for this function:

Channel * eq::server::Compound::getChannel (  ) 

Return the channel of this compound.

Note that the channel is inherited, that is, if this compound has no channel, the parent's channel is returned.

Returns:
the channel of this compound.

Definition at line 272 of file compound.cpp.

References getChannel().

Referenced by eq::server::DFREqualizer::attach(), getChannel(), isActive(), isDestination(), eq::server::DFREqualizer::notifyUpdatePre(), updateFrustum(), updateInheritData(), eq::server::CompoundUpdateInputVisitor::visit(), eq::server::CompoundInitVisitor::visit(), eq::server::CompoundExitVisitor::visit(), and eq::server::CompoundActivateVisitor::visit().

Here is the call graph for this function:

Here is the caller graph for this function:

Frustum& eq::server::Compound::getFrustum (  )  [inline]

Returns:
the frustum of this compound.

Definition at line 186 of file compound.h.

void eq::server::Compound::addEqualizer ( Equalizer equalizer  ) 

Attach a load balancer to this compound.

Definition at line 313 of file compound.cpp.

References eq::server::Equalizer::attach().

Referenced by Compound().

Here is the call graph for this function:

Here is the caller graph for this function:

const EqualizerVector& eq::server::Compound::getEqualizers (  )  const [inline]

Get the attached load balancers.

Definition at line 192 of file compound.h.

void eq::server::Compound::setTasks ( const uint32_t  tasks  )  [inline]

Set the tasks to be executed by the compound, overwriting previous tasks.

Tasks define which actions are executed by the compound, and provide a flexible way of configuring the decomposition and recomposition. A separate html design document describes them in depth.

Parameters:
tasks the compound tasks.

Definition at line 205 of file compound.h.

void eq::server::Compound::enableTask ( const eq::Task  task  )  [inline]

Add a task to be executed by the compound, preserving previous tasks.

Parameters:
task the compound task to add.

Definition at line 212 of file compound.h.

uint32_t eq::server::Compound::getTasks (  )  const [inline]

Returns:
the tasks executed by this compound.

Definition at line 215 of file compound.h.

void eq::server::Compound::setBuffers ( const uint32_t  buffers  )  [inline]

Set the image buffers to be used by the compound during recomposition, overwriting previous buffers.

Parameters:
buffers the compound image buffers.

Definition at line 223 of file compound.h.

void eq::server::Compound::enableBuffer ( const eq::Frame::Buffer  buffer  )  [inline]

Add a image buffer to be used by the compound, preserving previous buffers.

Parameters:
buffer the compound image buffer to add.

Definition at line 231 of file compound.h.

uint32_t eq::server::Compound::getBuffers (  )  const [inline]

Returns:
the image buffers used by this compound.

Definition at line 235 of file compound.h.

void eq::server::Compound::setSwapBarrier ( SwapBarrier barrier  ) 

Set a swap barrier.

Windows of compounds with the same swap barrier name will enter a barrier before executing eq::Window::swap. Setting an empty string disables the swap barrier.

Parameters:
barrier the swap barrier.

Definition at line 379 of file compound.cpp.

References getName(), eq::server::SwapBarrier::getName(), getRoot(), and eq::server::SwapBarrier::setName().

Here is the call graph for this function:

const SwapBarrier* eq::server::Compound::getSwapBarrier (  )  const [inline]

Returns:
the current swap barrier.

Definition at line 279 of file compound.h.

void eq::server::Compound::addInputFrame ( Frame frame  ) 

Add a new input frame for this compound.

Parameters:
frame the input frame.

Definition at line 394 of file compound.cpp.

References eq::server::Frame::_compound, and eq::server::Frame::getName().

Referenced by Compound().

Here is the call graph for this function:

Here is the caller graph for this function:

const FrameVector& eq::server::Compound::getInputFrames (  )  const [inline]

Returns:
the vector of input frames.

Definition at line 289 of file compound.h.

Referenced by eq::server::CompoundUpdateInputVisitor::visit(), eq::server::CompoundInitVisitor::visit(), and eq::server::CompoundExitVisitor::visit().

Here is the caller graph for this function:

void eq::server::Compound::addOutputFrame ( Frame frame  ) 

Add a new output frame for this compound.

Parameters:
frame the output frame.

Definition at line 402 of file compound.cpp.

References eq::server::Frame::_compound, and eq::server::Frame::getName().

Referenced by Compound().

Here is the call graph for this function:

Here is the caller graph for this function:

const FrameVector& eq::server::Compound::getOutputFrames (  )  const [inline]

Returns:
the vector of output frames.

Definition at line 299 of file compound.h.

Referenced by eq::server::CompoundInitVisitor::visit(), and eq::server::CompoundExitVisitor::visit().

Here is the caller graph for this function:

bool eq::server::Compound::testInheritTask ( const eq::Task  task  )  const [inline]

Returns:
true if the task is set, false if not.

Definition at line 330 of file compound.h.

Referenced by eq::server::CompoundUpdateInputVisitor::visit(), eq::server::ChannelUpdateVisitor::visitLeaf(), and eq::server::ChannelUpdateVisitor::visitPre().

Here is the caller graph for this function:

void eq::server::Compound::unsetInheritTask ( const eq::Task  task  )  [inline]

Delete an inherit task, if it was set.

Definition at line 334 of file compound.h.

Referenced by eq::server::CompoundUpdateInputVisitor::visit().

Here is the caller graph for this function:

bool eq::server::Compound::testInheritEye ( const eq::Eye  eye  )  const [inline]

Returns:
true if the eye pass is used, false if not.

Definition at line 338 of file compound.h.

void eq::server::Compound::setWall ( const eq::Wall wall  ) 

Set the compound's frustum using a wall description.

Parameters:
wall the wall description.

Definition at line 450 of file compound.cpp.

References EQVERB, and eq::server::Frustum::setWall().

Referenced by updateFrustum().

Here is the call graph for this function:

Here is the caller graph for this function:

const eq::Wall& eq::server::Compound::getWall (  )  const [inline]

Returns:
the last specified wall description.

Definition at line 354 of file compound.h.

References eq::Frustum::getWall().

Here is the call graph for this function:

void eq::server::Compound::setProjection ( const eq::Projection projection  ) 

Set the compound's frustum using a projection description.

Parameters:
projection the projection description.

Definition at line 456 of file compound.cpp.

References EQVERB, and eq::server::Frustum::setProjection().

Referenced by updateFrustum().

Here is the call graph for this function:

Here is the caller graph for this function:

const eq::Projection& eq::server::Compound::getProjection (  )  const [inline]

Returns:
the last specified projection description.

Definition at line 364 of file compound.h.

References eq::Frustum::getProjection().

Here is the call graph for this function:

eq::Frustum::Type eq::server::Compound::getFrustumType (  )  const [inline]

Returns:
the type of the latest specified frustum.

Definition at line 368 of file compound.h.

References eq::Frustum::getCurrentType().

Here is the call graph for this function:

const eq::Frustum& eq::server::Compound::getFrustum (  )  const [inline]

Returns:
the frustum.

Definition at line 372 of file compound.h.

void eq::server::Compound::updateFrustum (  ) 

uint32_t eq::server::Compound::getEyes (  )  const [inline]

Returns:
the bitwise OR of the eye values.

Definition at line 378 of file compound.h.

void eq::server::Compound::setEyes ( const uint32_t  eyes  )  [inline]

Set the eyes to be used by the compound.

Previously set eyes are overwritten.

Parameters:
eyes the compound eyes.

Definition at line 387 of file compound.h.

void eq::server::Compound::enableEye ( const uint32_t  eyes  )  [inline]

Add eyes to be used by the compound.

Previously set eyes are preserved.

Parameters:
eyes the compound eyes.

Definition at line 396 of file compound.h.

VisitorResult eq::server::Compound::accept ( ConstCompoundVisitor visitor  )  const

Traverse the compound and all children using a compound visitor.

Parameters:
visitor the visitor.
Returns:
the result of the visitor traversal.

Definition at line 752 of file compound.cpp.

Referenced by activate(), deactivate(), exit(), init(), update(), and eq::server::Channel::update().

Here is the caller graph for this function:

VisitorResult eq::server::Compound::accept ( CompoundVisitor visitor  ) 

Non-const version of accept().

Definition at line 747 of file compound.cpp.

void eq::server::Compound::activate (  ) 

Activate the compound tree.

Definition at line 761 of file compound.cpp.

References accept(), and isDestination().

Referenced by eq::server::CompoundInitVisitor::visit().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::server::Compound::deactivate (  ) 

Deactivate the compound tree.

Definition at line 769 of file compound.cpp.

References accept(), and isDestination().

Referenced by eq::server::CompoundExitVisitor::visit().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::server::Compound::setActive ( const bool  active  )  [inline]

Set the active state of this compound only.

Definition at line 420 of file compound.h.

Referenced by eq::server::CompoundActivateVisitor::visit().

Here is the caller graph for this function:

bool eq::server::Compound::isActive (  )  const

Returns:
if the compound is activated and current (DPlex).

Definition at line 321 of file compound.cpp.

References getChannel(), and eq::server::Channel::isActive().

Referenced by eq::server::FramerateEqualizer::notifyUpdatePre(), eq::server::CompoundUpdateOutputVisitor::visit(), eq::server::CompoundUpdateInputVisitor::visit(), eq::server::ChannelUpdateVisitor::visitLeaf(), eq::server::ChannelUpdateVisitor::visitPost(), and eq::server::ChannelUpdateVisitor::visitPre().

Here is the call graph for this function:

Here is the caller graph for this function:

void eq::server::Compound::update ( const uint32_t  frameNumber  ) 

Updates this compound.

The compound's parameters for the next frame are computed.

Definition at line 792 of file compound.cpp.

References accept(), eq::net::Object::commit(), eq::net::Barrier::getHeight(), eq::server::CompoundUpdateOutputVisitor::getOutputFrames(), and eq::server::CompoundUpdateOutputVisitor::getSwapBarriers().

Here is the call graph for this function:

void eq::server::Compound::updateInheritData ( const uint32_t  frameNumber  ) 

void eq::server::Compound::addListener ( CompoundListener listener  ) 

Register a compound listener.

Definition at line 333 of file compound.cpp.

Referenced by eq::server::Equalizer::attach().

Here is the caller graph for this function:

void eq::server::Compound::removeListener ( CompoundListener listener  ) 

Deregister a compound listener.

Definition at line 338 of file compound.cpp.

Referenced by eq::server::Equalizer::attach().

Here is the caller graph for this function:

void eq::server::Compound::fireUpdatePre ( const uint32_t  frameNumber  ) 

Notify all listeners that the compound is about to be updated.

Definition at line 346 of file compound.cpp.

Referenced by eq::server::CompoundUpdateDataVisitor::visit().

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:45 2009 for Equalizer 0.9 by  doxygen 1.5.8