Frapper  1.0a
Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
Frapper::Node Class Reference

Abstract base class for all nodes. More...

#include <Node.h>

Inheritance diagram for Frapper::Node:
Inheritance graph
[legend]
Collaboration diagram for Frapper::Node:
Collaboration graph
[legend]

Public Slots

virtual void setEvaluate (bool evaluate)
 Sets whether this node should be evaluated in the network.
 
virtual void loadReady ()
 Executed when scene loading is ready.
 
virtual void saveStart ()
 Executed when scene saving is ready.
 

Signals

void frameChanged (int)
 Signal that is emitted when current frame has changed.
 
void nodeChanged ()
 Signal that is emitted when something has changed in the node. (Parameters added/deleted)
 
void nodeNameChanged (const QString &name)
 Signal that is emitted when the node's name has changed.
 
void selectedChanged (bool selected)
 Signal that is emitted when the selected state of the node has changed.
 
void sendDeleteConnection (Connection *connection)
 Signal that is emitted in order to delete a connection (through SceneModel)
 
void updateFrame ()
 Update frame.
 
void selectDeselectObject (const QString &name)
 Seim.
 
void loadSceneElementsReady ()
 Signal that is emitted when the scene loading is ready.
 

Public Member Functions

 Node (const QString &name, ParameterGroup *parameterRoot)
 Constructor of the Node class.
 
virtual ~Node ()
 Destructor of the Node class.
 
virtual void run (const QString &parameterName)
 Execute function for threading.
 
virtual bool process (const QString &parameterName)
 Processes the node's input data to generate the data for the parameter with the given name.
 
bool getTypeUnknown () const
 
ParametergetTimeParameter () const
 Returns the actual timeline intex.
 
QString getName () const
 Returns the name of the node. The name must be unique in the node network so that each node object can be uniquely identified by its name.
 
void setName (const QString &name)
 Sets the name of the node. The name must be unique in the node network so that each node object can be uniquely identified by its name.
 
QString getTypeName () const
 Returns the name of the node's type.
 
void setTypeName (const QString &typeName)
 Set the name of the node's type.
 
bool isTypeUnknown () const
 Returns whether a plugin for the node's type is available.
 
void setTypeUnknown (bool typeUnknown=true)
 Sets the flag that indicates whether a plugin for the node's type is available.
 
bool isEvaluated () const
 Returns whether this node should be evaluated in the network.
 
bool isSelected () const
 Returns whether this node is currently selected.
 
virtual void setSelected (bool selected)
 Sets whether this node is currently selected.
 
bool isSelfEvaluating () const
 Returns whether the node is self-evaluating.
 
bool isSaveable () const
 Returns whether the node is saveable.
 
void setSelfEvaluating (bool selfEvaluating)
 Sets whether the node is self-evaluating.
 
void setSaveable (bool saveable)
 Sets whether the node is saveable.
 
QString getSearchText () const
 Returns the search text currently set for the node.
 
void setSearchText (const QString &searchText)
 Sets the text to use when filtering parameters of the node before creating editing widgets in a parameter editor panel.
 
ParameterGroupgetParameterRoot () const
 Returns the root of the tree of parameters and parameter groups for the node.
 
ParameterGroupgetParameterGroup (const QString &name) const
 Returns the parameter group with the given name.
 
void fillParameterLists (AbstractParameter::List *inputParameters, AbstractParameter::List *outputParameters)
 Iterates over the children of the parameter root and fills the given lists with input and output parameters and parameter groups containing input and output parameters.
 
void fillParameterLists (AbstractParameter::List *connectedInputParameters, AbstractParameter::List *connectedOutputParameters, bool *unconnectedInputParametersAvailable, bool *unconnectedOutputParametersAvailable)
 Iterates over the children of the parameter root and fills the given lists with connected input and output parameters and parameter groups containing connected input and output parameters.
 
AbstractParameter::List getParameters (Parameter::PinType pinType, bool connected, ParameterGroup *parameterGroup=0)
 Returns a list of parameters contained in the given parameter group that are of the given pin type and that are connected or not.
 
bool hasParameter (const QString &name) const
 Returns whether the node contains a parameter with the given name.
 
ParametergetParameter (const QString &name) const
 Returns the parameter with the given name.
 
NumberParametergetNumberParameter (const QString &name) const
 Returns the number parameter with the given name.
 
FilenameParametergetFilenameParameter (const QString &name) const
 Returns the filename parameter with the given name.
 
EnumerationParametergetEnumerationParameter (const QString &name) const
 Returns the enumeration parameter with the given name.
 
GeometryParametergetGeometryParameter (const QString &name) const
 Returns the geometry parameter with the given name.
 
LightParametergetLightParameter (const QString &name) const
 Returns the light parameter with the given name.
 
CameraParametergetCameraParameter (const QString &name) const
 Returns the camera parameter with the given name.
 
void setDirty (const QString &name, bool dirty)
 Sets the dirty state of the parameter with the given name to the given state.
 
void setDirty (bool dirty)
 Sets the dirty state of the node and all child parameters.
 
void setNodeDirty (bool dirty)
 Sets the dirty state of the node.
 
bool isNodeDirty ()
 Returns the dirty state of the node.
 
void removeParameter (const QString &name, bool diveInGroups=true)
 Removes and deletes the parameter with the given name.
 
void removeParameter (Parameter *parameter, bool diveInGroups=true)
 Removes and deletes the given parameter.
 
void addAffection (const QString &parameterName, const QString &affectedParameterName)
 Adds a affection between two parameters.
 
QVariant getValue (const QString &name, bool triggerEvaluation=false)
 Returns the value of the parameter with the given name while optionally triggering the evaluation chain.
 
bool getBoolValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of a boolean parameter while optionally triggering the evaluation chain.
 
int getIntValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of an integer parameter while optionally triggering the evaluation chain.
 
unsigned int getUnsignedIntValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of an unsigned integer parameter while optionally triggering the evaluation chain.
 
float getFloatValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of a 32bit-precision floating point parameter while optionally triggering the evaluation chain.
 
double getDoubleValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of a double-precision floating point parameter while optionally triggering the evaluation chain.
 
QString getStringValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of a string parameter while optionally triggering the evaluation chain.
 
QColor getColorValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of a color parameter while optionally triggering the evaluation chain.
 
Ogre::Vector3 getVectorValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of an OGRE vector parameter while optionally triggering the evaluation chain.
 
Ogre::SceneNodegetSceneNodeValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of a scene node parameter while optionally triggering the evaluation chain.
 
Ogre::TexturePtr getTextureValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of an OGRE texture parameter while optionally triggering the evaluation chain.
 
ParameterGroupgetGroupValue (const QString &name, bool triggerEvaluation=false)
 Convenience function for getting the value of a parameter group parameter while optionally triggering the evaluation chain.
 
void setValue (const QString &name, const QVariant &value, bool triggerDirtying=false)
 Sets the value of the parameter with the given name to the given value while optionally triggering the dirtying chain.
 
void setValue (const QString &name, bool value, bool triggerDirtying=false)
 Convenience function for setting the value of a boolean parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, int value, bool triggerDirtying=false)
 Convenience function for setting the value of an integer parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, unsigned int value, bool triggerDirtying=false)
 Convenience function for setting the value of an unsigned integer parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, double value, bool triggerDirtying=false)
 Convenience function for setting the value of a double-precision floating point parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, char *value, bool triggerDirtying=false)
 Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, const char *value, bool triggerDirtying=false)
 Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, const QString &value, bool triggerDirtying=false)
 Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, const QColor &value, bool triggerDirtying=false)
 Convenience function for setting the value of a color parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, const Ogre::Vector3 &value, bool triggerDirtying=false)
 Convenience function for setting the value of an OGRE vector parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, Ogre::SceneNode *value, bool triggerDirtying=false)
 Convenience function for setting the value of a scene node parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, const Ogre::TexturePtr value, bool triggerDirtying=false)
 Convenience function for setting the value of an OGRE texture parameter while optionally triggering the dirtying chain.
 
void setValue (const QString &name, ParameterGroup *value, bool triggerDirtying=false)
 Convenience function for setting the value of a parameter group parameter while optionally triggering the dirtying chain.
 
void setParameterEnabled (const QString &name, bool enabled)
 Convenience function for setting the enabled flag of a string parameter.
 
void setChangeFunction (const QString &name, const char *changeFunction)
 Sets the function to call when a parameter's value changes.
 
void setProcessingFunction (const QString &name, const char *processingFunction)
 Sets the function to use for computing a parameter's value.
 
void setAuxProcessingFunction (const QString &name, const char *processingFunction)
 Sets the auxiliary function to use for computing a parameter's value.
 
void setCommandFunction (const QString &name, const char *commandFunction)
 Sets the function to use for executing the command represented by a parameter.
 
void setOnConnectFunction (const QString &name, const char *onConnectFunction)
 Sets the function which should be called on parameter's connection.
 
void setOnDisconnectFunction (const QString &name, const char *onDisconnectFunction)
 Sets the function which should be called on parameter's disconnection.
 
void notifyChange ()
 Notify when something has changed in the node. (Parameters added/deleted)
 
virtual void setUpTimeDependencies (Parameter *timeParameter)
 Sets up time dependencies for node parameters.
 
virtual void evaluateConnection (Connection *connection)
 Evaluates the given new connection for the node.
 
void deleteConnection (Connection *connection)
 Signal that is emitted in order to delete a connection (through SceneModel)
 
void renderSingleFrame ()
 Render a single frame.
 

Static Public Attributes

static int s_numberOfInstances
 
static int s_totalNumberOfInstances
 

Protected Member Functions

Ogre::String createUniqueName (const QString &objectName)
 Creates a unique name from the given object name by adding the Node number.
 
virtual void finalize ()
 

Protected Attributes

QString m_name
 The name of the node.
 
QString m_typeName
 The type of the node.
 
bool m_dirty
 The dirty bit.
 
Parameterm_timeParameter
 The global time parameter to use when addressing image sequences.
 
bool m_typeUnknown
 Flag that states whether a plugin for the node's type is available.
 
bool m_evaluate
 Flag that states whether this node should be evaluated in the network.
 
bool m_selected
 Flag that states whether this node is currently selected.
 
bool m_selfEvaluating
 Flag that states whether the node is self-evaluating.
 
QString m_searchText
 The text to use for filtering parameters of this node before creating editing widgets in a parameter editor panel.
 
bool m_saveable
 Flag that states whether the node is saveable.
 

Private Attributes

ParameterGroupm_parameterRoot
 The root of the tree of the node's parameters.
 

Detailed Description

Abstract base class for all nodes.

Inheritance Diagram
dot_inline_dotgraph_5.png
[legend]

Constructor & Destructor Documentation

Frapper::Node::Node ( const QString &  name,
ParameterGroup parameterRoot 
)

Constructor of the Node class.

Constructors and Destructors.

Parameters
nameThe name for the new node.
parameterRootA copy of the parameter tree specific for the type of the node.

Constructor of the Node class.

Parameters
nameThe name for the new node.
parameterRootA copy of the parameter tree specific for the type of the node.
Frapper::Node::~Node ( )
virtual

Destructor of the Node 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

void Frapper::Node::run ( const QString &  parameterName)
virtual

Execute function for threading.

bool Frapper::Node::process ( const QString &  parameterName)
virtual

Processes the node's input data to generate the data for the parameter with the given name.

Public Functions.

Parameters
parameterNameThe name of the parameter whose data should be generated.
Returns
True if generating the data succeeded, otherwise False.

Processes the node's input data to generate the data for the parameter with the given name.

Parameters
parameterNameThe name of the parameter whose data should be generated.
Returns
True if generating the data succeeded, otherwise False.
bool Frapper::Node::getTypeUnknown ( ) const
Parameter * Frapper::Node::getTimeParameter ( ) const

Returns the actual timeline intex.

Returns the actual timeline parameter.

Returns
The actual timeline intex.
QString Frapper::Node::getName ( ) const

Returns the name of the node. The name must be unique in the node network so that each node object can be uniquely identified by its name.

Returns
The name of the node.
void Frapper::Node::setName ( const QString &  name)

Sets the name of the node. The name must be unique in the node network so that each node object can be uniquely identified by its name.

Parameters
nameThe new name for the node.
QString Frapper::Node::getTypeName ( ) const

Returns the name of the node's type.

Returns
The name of the node's type.
void Frapper::Node::setTypeName ( const QString &  typeName)

Set the name of the node's type.

This function should normally only be called once directly after the node has been created by NodeFactory::createNode.

Parameters
typeNameThe name of the node's type.
See Also
NodeFactory::createNode

This function should normally only be called once directly after the node has been created in the NodeFactory::createNode function.

Parameters
typeNameThe name of the node's type.
See Also
NodeFactory::createNode
bool Frapper::Node::isTypeUnknown ( ) const

Returns whether a plugin for the node's type is available.

Returns
True if a plugin for the node's type is available, otherwise False.
void Frapper::Node::setTypeUnknown ( bool  typeUnknown = true)

Sets the flag that indicates whether a plugin for the node's type is available.

Parameters
typeUnknownFlag to indicate whether a plugin for the node's type is available.
bool Frapper::Node::isEvaluated ( ) const

Returns whether this node should be evaluated in the network.

Returns
True if this node should be evaluated in the network, otherwise False.
bool Frapper::Node::isSelected ( ) const

Returns whether this node is currently selected.

Returns
True if this node is currently selected, otherwise False.
void Frapper::Node::setSelected ( bool  selected)
virtual

Sets whether this node is currently selected.

Parameters
selectedThe new selected value for the node.
Thenew selected value for the node.
bool Frapper::Node::isSelfEvaluating ( ) const

Returns whether the node is self-evaluating.

Returns
True if the node is self-evaluating, otherwise False.
True if the node is self-evaluating, otherwise false.
bool Frapper::Node::isSaveable ( ) const

Returns whether the node is saveable.

Returns
True if the node is saveable, otherwise False.
True if the node is saveable, otherwise false.
void Frapper::Node::setSelfEvaluating ( bool  selfEvaluating)

Sets whether the node is self-evaluating.

Parameters
selfEvaluatingThe new value for the self-evaluating flag.
void Frapper::Node::setSaveable ( bool  saveable)

Sets whether the node is saveable.

Parameters
saveableThe new value for the saveable flag.
QString Frapper::Node::getSearchText ( ) const

Returns the search text currently set for the node.

Returns
The search text currently set for the node.
void Frapper::Node::setSearchText ( const QString &  searchText)

Sets the text to use when filtering parameters of the node before creating editing widgets in a parameter editor panel.

Parameters
searchTextThe text to use for filtering parameters.
ParameterGroup * Frapper::Node::getParameterRoot ( ) const

Returns the root of the tree of parameters and parameter groups for the node.

Public Parameter Group Functions.

Returns
The root of the tree of parameters for the node.

Returns the root of the tree of parameters and parameter groups for the node.

Returns
The root of the tree of parameters for the node.
ParameterGroup * Frapper::Node::getParameterGroup ( const QString &  name) const

Returns the parameter group with the given name.

Parameters
nameThe name of the parameter group to return.
Returns
The parameter group with the given name.
void Frapper::Node::fillParameterLists ( AbstractParameter::List inputParameters,
AbstractParameter::List outputParameters 
)

Iterates over the children of the parameter root and fills the given lists with input and output parameters and parameter groups containing input and output parameters.

Parameters
inputParametersThe list to fill with input parameters and parameter groups containing input parameters.
outputParametersThe list to fill with output parameters and parameter groups containing output parameters.
void Frapper::Node::fillParameterLists ( AbstractParameter::List connectedInputParameters,
AbstractParameter::List connectedOutputParameters,
bool *  unconnectedInputParametersAvailable,
bool *  unconnectedOutputParametersAvailable 
)

Iterates over the children of the parameter root and fills the given lists with connected input and output parameters and parameter groups containing connected input and output parameters.

Parameters
connectedInputParametersThe list to fill with connected input parameters and parameter groups containing connected input parameters.
connectedOutputParametersThe list to fill with connected output parameters and parameter groups containing connected output parameters.
unconnectedInputParametersAvailableFlag that returns whether there are unconnected input parameters contained in the node.
unconnectedOutputParametersAvailableFlag that returns whether there are unconnected output parameters contained in the node.
Parameter::List Frapper::Node::getParameters ( Parameter::PinType  pinType,
bool  connectedOnly,
ParameterGroup parameterGroup = 0 
)

Returns a list of parameters contained in the given parameter group that are of the given pin type and that are connected or not.

Returns a list of parameters contained in the given parameter group that are of the given pin type. If the respective flag is set only connected parameters will be returned.

Parameters
pinTypeOnly parameters of this pin type will be returned.
connectedFlag to control whether to return connected or unconnected parameters.
parameterGroupThe root of the parameter tree to get parameters from.
Returns
A list of (connected) parameters of the given pin type contained in the given parameter group.
Parameters
pinTypeOnly parameters of this pin type will be returned.
connectedOnlyFlag that controls whether only connected parameters should be returned.
parameterGroupThe root of the parameter tree to get parameters from.
Returns
A list of (connected) parameters of the given pin type contained in the given parameter group.
bool Frapper::Node::hasParameter ( const QString &  name) const

Returns whether the node contains a parameter with the given name.

Public Parameter Functions.

Parameters
nameThe name of the parameter to check for existence.
Returns
True if a parameter with the given name exists in the node, otherwise False.

Returns whether the node contains a parameter with the given name.

Parameters
nameThe name of the parameter to check for existence.
Returns
True if a parameter with the given name exists in the node, otherwise False.
Parameter * Frapper::Node::getParameter ( const QString &  name) const

Returns the parameter with the given name.

Parameters
nameThe name of the parameter to return.
Returns
The parameter with the given name.
NumberParameter * Frapper::Node::getNumberParameter ( const QString &  name) const

Returns the number parameter with the given name.

Convenience function that uses getParameter and performs type casting.

Parameters
nameThe name of the number parameter to return.
Returns
The number parameter with the given name.
FilenameParameter * Frapper::Node::getFilenameParameter ( const QString &  name) const

Returns the filename parameter with the given name.

Convenience function that uses getParameter and performs type casting.

Parameters
nameThe name of the filename parameter to return.
Returns
The filename parameter with the given name.
EnumerationParameter * Frapper::Node::getEnumerationParameter ( const QString &  name) const

Returns the enumeration parameter with the given name.

Convenience function that uses getParameter and performs type casting.

Parameters
nameThe name of the enumeration parameter to return.
Returns
The enumeration parameter with the given name.
GeometryParameter * Frapper::Node::getGeometryParameter ( const QString &  name) const

Returns the geometry parameter with the given name.

Convenience function that uses getParameter and performs type casting.

Parameters
nameThe name of the geometry parameter to return.
Returns
The geometry parameter with the given name.
LightParameter * Frapper::Node::getLightParameter ( const QString &  name) const

Returns the light parameter with the given name.

Convenience function that uses getParameter and performs type casting.

Parameters
nameThe name of the light parameter to return.
Returns
The light parameter with the given name.
CameraParameter * Frapper::Node::getCameraParameter ( const QString &  name) const

Returns the camera parameter with the given name.

Convenience function that uses getParameter and performs type casting.

Parameters
nameThe name of the camera parameter to return.
Returns
The camera parameter with the given name.
void Frapper::Node::setDirty ( const QString &  name,
bool  dirty 
)

Sets the dirty state of the parameter with the given name to the given state.

Parameters
nameThe name of the parameter to set the dirty state for.
dirtyThe new value for the parameter's dirty state.
void Frapper::Node::setDirty ( bool  dirty)

Sets the dirty state of the node and all child parameters.

Parameters
dirtyThe new value for the node's dirty state.
void Frapper::Node::setNodeDirty ( bool  dirty)

Sets the dirty state of the node.

Parameters
dirtyThe new value for the node's dirty state.
bool Frapper::Node::isNodeDirty ( )

Returns the dirty state of the node.

Returns
The value for the node's dirty state.
void Frapper::Node::removeParameter ( const QString &  name,
bool  diveInGroups = true 
)

Removes and deletes the parameter with the given name.

Parameters
nameThe name of the parameter to remove and delete.
void Frapper::Node::removeParameter ( Parameter parameter,
bool  diveInGroups = true 
)

Removes and deletes the given parameter.

Parameters
parameterThe parameter to remove and delete.
void Frapper::Node::addAffection ( const QString &  parameterName,
const QString &  affectedParameterName 
)

Adds a affection between two parameters.

QVariant Frapper::Node::getValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Returns the value of the parameter with the given name while optionally triggering the evaluation chain.

Public Value Getter Functions.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.

Returns the value of the parameter with the given name while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
bool Frapper::Node::getBoolValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of a boolean parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
int Frapper::Node::getIntValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of an integer parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
unsigned int Frapper::Node::getUnsignedIntValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of an unsigned integer parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
float Frapper::Node::getFloatValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of a 32bit-precision floating point parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
double Frapper::Node::getDoubleValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of a double-precision floating point parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
QString Frapper::Node::getStringValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of a string parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
QColor Frapper::Node::getColorValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of a color parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
Ogre::Vector3 Frapper::Node::getVectorValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of an OGRE vector parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
Ogre::SceneNode * Frapper::Node::getSceneNodeValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of a scene node parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
Ogre::TexturePtr Frapper::Node::getTextureValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of an OGRE texture parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
ParameterGroup * Frapper::Node::getGroupValue ( const QString &  name,
bool  triggerEvaluation = false 
)

Convenience function for getting the value of a parameter group parameter while optionally triggering the evaluation chain.

Parameters
nameThe name of the parameter whose value to return.
triggerEvaluationFlag to control whether to trigger the evaluation chain.
Returns
The value of the parameter with the given name.
void Frapper::Node::setValue ( const QString &  name,
const QVariant &  value,
bool  triggerDirtying = false 
)

Sets the value of the parameter with the given name to the given value while optionally triggering the dirtying chain.

Public Value Setter Functions.

Parameters
nameThe name of the parameter to set the value for.
valueThe new value for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.

Sets the value of the parameter with the given name to the given value while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe new value for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
bool  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of a boolean parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
int  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of an integer parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
unsigned int  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of an unsigned integer parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
double  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of a double-precision floating point parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
char *  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
const char *  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
const QString &  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of a string parameter while optionally triggering the dirtying chain.

If the parameter with the given name is not a string parameter the given value will be converted according to the parameter's type.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
const QColor &  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of a color parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
const Ogre::Vector3 &  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of an OGRE vector parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
Ogre::SceneNode value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of a scene node parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
const Ogre::TexturePtr  value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of an OGRE texture parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setValue ( const QString &  name,
ParameterGroup value,
bool  triggerDirtying = false 
)

Convenience function for setting the value of a parameter group parameter while optionally triggering the dirtying chain.

Parameters
nameThe name of the parameter to set the value for.
valueThe value to set for the parameter with the given name.
triggerDirtyingFlag to control whether to trigger the dirtying chain.
void Frapper::Node::setParameterEnabled ( const QString &  name,
bool  enabled 
)

Convenience function for setting the enabled flag of a string parameter.

Parameters
nameThe name of the parameter to set the value for.
enabledThe enabled flag to set for the parameter with the given name.
void Frapper::Node::setChangeFunction ( const QString &  name,
const char *  changeFunction 
)

Sets the function to call when a parameter's value changes.

Public Callback Setter Functions.

Convenience function that calls setChangeFunction for the parameter with the given name.

Parameters
nameThe name of the parameter to set the change function for.
changeFunctionThe name of the function to call when the parameter's value changes.

Sets the function to call when a parameter's value changes.

Convenience function that calls setChangeFunction for the parameter with the given name.

Parameters
nameThe name of the parameter to set the change function for.
changeFunctionThe name of the function to call when the parameter's value changes.
void Frapper::Node::setProcessingFunction ( const QString &  name,
const char *  processingFunction 
)

Sets the function to use for computing a parameter's value.

Convenience function that calls setProcessingFunction for the parameter with the given name.

Parameters
nameThe name of the parameter to set the processing function for.
processingFunctionThe name of the function to use for computing the parameter's value.
void Frapper::Node::setAuxProcessingFunction ( const QString &  name,
const char *  processingFunction 
)

Sets the auxiliary function to use for computing a parameter's value.

Convenience function that calls setProcessingFunction for the parameter with the given name.

Parameters
nameThe name of the parameter to set the processing function for.
processingFunctionThe name of the function to use for computing the parameter's value.
void Frapper::Node::setCommandFunction ( const QString &  name,
const char *  commandFunction 
)

Sets the function to use for executing the command represented by a parameter.

Convenience function that calls setCommandFunction for the parameter with the given name.

Parameters
nameThe name of the parameter to set the command function for.
commandFunctionThe function to use for executing the command represented by the parameter.
void Frapper::Node::setOnConnectFunction ( const QString &  name,
const char *  onConnectFunction 
)

Sets the function which should be called on parameter's connection.

Parameters
onConnectFunctionThe function called on parameter's connection.
void Frapper::Node::setOnDisconnectFunction ( const QString &  name,
const char *  onDisconnectFunction 
)

Sets the function which should be called on parameter's disconnection.

Parameters
onDisconnectFunctionThe function called on parameter's connection.
void Frapper::Node::notifyChange ( )

Notify when something has changed in the node. (Parameters added/deleted)

Public Misc Functions.

void Frapper::Node::setUpTimeDependencies ( Parameter timeParameter)
virtual

Sets up time dependencies for node parameters.

Can be implemented in derived classes to set up parameter affections from the given time parameter to specific parameters of the node that should be evaluated when the scene time represented by the given time parameter changes.

The default implementation does nothing.

Parameters
timeParameterThe parameter representing the current scene time.

Can be implemented in derived classes to set up parameter affections from the given time parameter to specific parameters of the node that should be evaluated when the scene time represented by the given time parameter changes.

The default implementation does nothing.

Parameters
timeParameterThe parameter representing the current scene time.
slotThe slot which should be triggered when frame has changed

Reimplemented in AnimationClipNode::AnimationClipNode.

void Frapper::Node::evaluateConnection ( Connection connection)
virtual

Evaluates the given new connection for the node.

The default implementation does nothing.

Parameters
connectionThe new connection to evaluate.
connectionThe new connection to evaluate.

Reimplemented in TransformNode::TransformNode.

void Frapper::Node::deleteConnection ( Connection connection)

Signal that is emitted in order to delete a connection (through SceneModel)

Parameters
nameThe name of the object.
void Frapper::Node::renderSingleFrame ( )

Render a single frame.

void Frapper::Node::setEvaluate ( bool  evaluate)
virtualslot

Sets whether this node should be evaluated in the network.

Public Slots.

Parameters
evaluateThe new value for eval flag of this node.

Sets whether this node should be evaluated in the network.

Parameters
evaluateThe new value for eval flag of this node.
void Frapper::Node::loadReady ( )
virtualslot

Executed when scene loading is ready.

Reimplemented in CameraNode::CameraNode.

void Frapper::Node::saveStart ( )
virtualslot

Executed when scene saving is ready.

Executed when scene loading is ready.

void Frapper::Node::frameChanged ( int  )
signal

Signal that is emitted when current frame has changed.

void Frapper::Node::nodeChanged ( )
signal

Signal that is emitted when something has changed in the node. (Parameters added/deleted)

void Frapper::Node::nodeNameChanged ( const QString &  name)
signal

Signal that is emitted when the node's name has changed.

void Frapper::Node::selectedChanged ( bool  selected)
signal

Signal that is emitted when the selected state of the node has changed.

Parameters
selectedThe new selected state of the node.
void Frapper::Node::sendDeleteConnection ( Connection connection)
signal

Signal that is emitted in order to delete a connection (through SceneModel)

Parameters
connectionA pointer to the connecion.
void Frapper::Node::updateFrame ( )
signal

Update frame.

void Frapper::Node::selectDeselectObject ( const QString &  name)
signal

Seim.

void Frapper::Node::loadSceneElementsReady ( )
signal

Signal that is emitted when the scene loading is ready.

Ogre::String Frapper::Node::createUniqueName ( const QString &  objectName)
protected

Creates a unique name from the given object name by adding the Node number.

Protected Methods.

void Frapper::Node::finalize ( )
protectedvirtual

Member Data Documentation

int Frapper::Node::s_numberOfInstances
static
int Frapper::Node::s_totalNumberOfInstances
static
QString Frapper::Node::m_name
protected

The name of the node.

Must be unique in the node network so that each node can be uniquely identified by its name.

QString Frapper::Node::m_typeName
protected

The type of the node.

bool Frapper::Node::m_dirty
protected

The dirty bit.

Parameter* Frapper::Node::m_timeParameter
protected

The global time parameter to use when addressing image sequences.

bool Frapper::Node::m_typeUnknown
protected

Flag that states whether a plugin for the node's type is available.

bool Frapper::Node::m_evaluate
protected

Flag that states whether this node should be evaluated in the network.

bool Frapper::Node::m_selected
protected

Flag that states whether this node is currently selected.

bool Frapper::Node::m_selfEvaluating
protected

Flag that states whether the node is self-evaluating.

QString Frapper::Node::m_searchText
protected

The text to use for filtering parameters of this node before creating editing widgets in a parameter editor panel.

bool Frapper::Node::m_saveable
protected

Flag that states whether the node is saveable.

ParameterGroup* Frapper::Node::m_parameterRoot
private

The root of the tree of the node's parameters.


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