ViewNode Class Reference

Abstract base class for all nodes whose results can be viewed in a viewport. More...

#include <ViewNode.h>

Inheritance diagram for ViewNode:

Inheritance graph
[legend]
Collaboration diagram for ViewNode:

Collaboration graph
[legend]

List of all members.

Public Slots

virtual void setEvaluate (bool evaluate)
 Sets whether this node should be evaluated in the network.
virtual void setView (bool view, bool suppressViewSetSignal=false)
 Sets whether the geometry of this node should be displayed in the viewport.
void setStageIndex (unsigned int stageIndex)
 Sets the index of the stage in which this node should be contained.

Signals

void triggerRedraw ()
 Trigger redraw of ogre scene.
void viewSet (unsigned int stageIndex, ViewNode *viewNode)
 Signal that is emitted when the view flag of this node has been set.
void viewNodeUpdated ()
 Signal that is emitted when the currently viewed view node has been updated.

Public Member Functions

 ViewNode (const QString &name, ParameterGroup *parameterRoot)
 Constructor of the ViewNode class.
virtual ~ViewNode ()
 Destructor of the ViewNode class.
unsigned int getStageIndex () const
 Returns the index of the stage in which this node is contained.
bool isViewed () const
 Returns whether the result of this node should be displayed in the viewport.
virtual Ogre::SceneNode * getSceneNode ()
 Returns the scene node that contains scene objects created or modified by this node.
virtual Ogre::TexturePtr getImage ()
 Returns the image that is generated by this node.

Protected Member Functions

void addOutputParameter (Parameter *outputParameter)
 Adds the given parameter as output parameter to this view node.
void requestRedraw ()
 Request a redraw of the current ogre scene.

Protected Attributes

unsigned int m_stageIndex
 The index of the stage in which this node is contained.
bool m_view
 Flag that states whether the result of this node should be displayed in the viewport.

Private Slots

void checkViewFlag ()
 Checks if the view flag is currently set for this node and if so notifies connected objects that the view node has been updated by emitting the viewNodeUpdated signal.


Detailed Description

Abstract base class for all nodes whose results can be viewed in a viewport.

ViewNodes can either produce 3D scene geometry or 2D images (/textures).


Constructor & Destructor Documentation

ViewNode::ViewNode ( const QString &  name,
ParameterGroup parameterRoot 
)

Constructor of the ViewNode class.

Constructors and Destructors.

Parameters:
name The name for the new node.
parameterRoot A copy of the parameter tree specific for the type of the node.
Constructor of the ViewNode class.

Parameters:
name The name for the new node.
parameterRoot A copy of the parameter tree specific for the type of the node.

ViewNode::~ViewNode (  )  [virtual]

Destructor of the ViewNode class.

Defined virtual to guarantee that the destructor of a derived class will be called if the instance of the derived class is saved in a variable of its parent class type.


Member Function Documentation

unsigned int ViewNode::getStageIndex (  )  const

Returns the index of the stage in which this node is contained.

Public Functions.

Returns:
The index of the stage in which this node is contained.
Returns the index of the stage in which this node is contained.

Returns:
The index of the stage in which this node is contained.

bool ViewNode::isViewed (  )  const

Returns whether the result of this node should be displayed in the viewport.

Returns:
True if the result of this node should be displayed in the viewport, otherwise False.

Ogre::SceneNode * ViewNode::getSceneNode (  )  [virtual]

Returns the scene node that contains scene objects created or modified by this node.

The default implementation returns 0. To be implemented in derived classes that work on scene geometry data.

Returns:
The scene node containing objects created or modified by this node.

Reimplemented in GeometryNode.

Ogre::TexturePtr ViewNode::getImage (  )  [virtual]

Returns the image that is generated by this node.

The default implementation returns an empty texture pointer. To be implemented in derived classes that work on image data.

Returns:
The image that is generated by this node.

Reimplemented in ImageNode.

void ViewNode::setEvaluate ( bool  evaluate  )  [virtual, slot]

Sets whether this node should be evaluated in the network.

Public Slots.

Parameters:
evaluate The new value for eval flag of this node.
Sets whether this node should be evaluated in the network.

Parameters:
evaluate The new value for eval flag of this node.

Reimplemented from Node.

void ViewNode::setView ( bool  view,
bool  suppressViewSetSignal = false 
) [virtual, slot]

Sets whether the geometry of this node should be displayed in the viewport.

Sets whether the result of this node should be displayed in the viewport.

Parameters:
view The new value for view flag of this node.
suppressViewSetSignal Flag to control whether the viewSet signal is emitted from this function.

void ViewNode::setStageIndex ( unsigned int  stageIndex  )  [slot]

Sets the index of the stage in which this node should be contained.

Parameters:
stageIndex The index of the stage in which this node should be contained.

void ViewNode::triggerRedraw (  )  [signal]

Trigger redraw of ogre scene.

void ViewNode::viewSet ( unsigned int  stageIndex,
ViewNode viewNode 
) [signal]

Signal that is emitted when the view flag of this node has been set.

Parameters:
stageIndex The index of the stage to display the node in.
viewNode This node.

void ViewNode::viewNodeUpdated (  )  [signal]

Signal that is emitted when the currently viewed view node has been updated.

void ViewNode::addOutputParameter ( Parameter outputParameter  )  [protected]

Adds the given parameter as output parameter to this view node.

Protected Functions.

The viewNodeUpdated signal will be emitted when the given parameter is made dirty.

Parameters:
outputParameter The parameter that when dirtied will trigger the viewNodeUpdated signal.
Adds the given parameter as output parameter to this view node.

The viewNodeUpdated signal will be emitted when the given parameter is made dirty.

Parameters:
outputParameter The parameter that when dirtied will trigger the viewNodeUpdated signal.

void ViewNode::requestRedraw (  )  [protected]

Request a redraw of the current ogre scene.

void ViewNode::checkViewFlag (  )  [private, slot]

Checks if the view flag is currently set for this node and if so notifies connected objects that the view node has been updated by emitting the viewNodeUpdated signal.

Private Slots.


Member Data Documentation

unsigned int ViewNode::m_stageIndex [protected]

The index of the stage in which this node is contained.

bool ViewNode::m_view [protected]

Flag that states whether the result of this node should be displayed in the viewport.


The documentation for this class was generated from the following files:

Generated on Wed Feb 24 15:01:03 2010 for Frapper by  doxygen 1.5.9