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

Class in the Borealis application representing nodes that can contai OGRE entities with animation. More...

#include <AnimationClipNode.h>

Inheritance diagram for AnimationClipNode::AnimationClipNode:
Inheritance graph
[legend]
Collaboration diagram for AnimationClipNode::AnimationClipNode:
Collaboration graph
[legend]

Public Slots

void animationClipFileChanged ()
 Loads the animation clip from the selected file.
 
void processAnimationParameter ()
 Slot which is called when animation parameter needs to be updated.
 
void toggleInterpolationMode ()
 Slot which is called on interpolation mode change.
 
void toggleOffsetAnimation ()
 Slot which is called Offset Animation option change.
 
void updateTimer ()
 On timer update.
 
void triggerReload ()
 Trigger anim file reload.
 
- Public Slots inherited from Frapper::Node
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.
 

Public Member Functions

 AnimationClipNode (QString name, ParameterGroup *parameterRoot)
 Constructor of the AnimationClipNode class.
 
 ~AnimationClipNode ()
 Destructor of the AnimationClipNode class.
 
virtual void setUpTimeDependencies (Parameter *timeParameter)
 Sets up time dependencies for node parameters.
 
- Public Member Functions inherited from Frapper::Node
 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 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.
 

Protected Member Functions

void parseAnimationFile (const QString &filename)
 Reads all animation curves from the file with the given name.
 
void createAnimationCurves (QString clipName, double clipLength)
 Generates OGRE animation curves (Ogre::NumericAnimationTrack).
 
bool loadAnimationClip ()
 Loads animation clip.
 
bool removeParameters ()
 Removes dynamic parameters.
 
bool generateParameters ()
 Generates dynamic parameters.
 
- Protected Member Functions inherited from Frapper::Node
Ogre::String createUniqueName (const QString &objectName)
 Creates a unique name from the given object name by adding the Node number.
 
virtual void finalize ()
 

Private Slots

void increaseFrameCount ()
 Increase frame count.
 
void resetFrameCount ()
 Reset frame count.
 

Private Attributes

ParameterGroupm_animationGroup
 
ParameterGroupm_boneGroup
 
ParameterGroupm_cameraGroup
 
QStringList m_groupSuffixes
 
QStringList m_boneSuffixes
 
QStringList m_translateSuffixes
 
QStringList m_rotateSuffixes
 
QStringList m_scaleSuffixes
 
QMap< QString, QMap< QString,
double > > 
m_parameterMap
 
QMap< QString, unsigned short > m_forwCurveMap
 
QMap< unsigned short, QString > m_backwCurveMap
 
QMap< QString, AnimCurve * > m_animCurves
 
Ogre::Animation * m_animation
 
QTimer * m_timer
 
QTime m_lastTimestamp
 
bool m_isExternallyControlled
 
bool m_isPlaying
 
bool m_stop
 
bool m_offsetAnimation
 
double m_progress
 
int m_currentFrame
 

Additional Inherited Members

- Signals inherited from Frapper::Node
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.
 
- Static Public Attributes inherited from Frapper::Node
static int s_numberOfInstances
 
static int s_totalNumberOfInstances
 
- Protected Attributes inherited from Frapper::Node
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.
 

Detailed Description

Class in the Borealis application representing nodes that can contai OGRE entities with animation.

Constructor & Destructor Documentation

AnimationClipNode::AnimationClipNode::AnimationClipNode ( QString  name,
ParameterGroup parameterRoot 
)

Constructor of the AnimationClipNode 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 AnimationClipNode class.

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

Destructor of the AnimationClipNode class.

Member Function Documentation

void AnimationClipNode::AnimationClipNode::setUpTimeDependencies ( Parameter timeParameter)
virtual

Sets up time dependencies for node parameters.

Public Methods.

Parameters
timeParameterThe parameter representing the current scene time.

Sets up time dependencies for node parameters.

Parameters
timeParameterThe parameter representing the current scene time.

Reimplemented from Frapper::Node.

void AnimationClipNode::AnimationClipNode::animationClipFileChanged ( )
slot

Loads the animation clip from the selected file.

Public Slots.

Is called when the animation clip file has been changed.

Loads the animation clip from the selected file.

Is called when the animation clip file has been changed.

void AnimationClipNode::AnimationClipNode::processAnimationParameter ( )
slot

Slot which is called when animation parameter needs to be updated.

void AnimationClipNode::AnimationClipNode::toggleInterpolationMode ( )
slot

Slot which is called on interpolation mode change.

void AnimationClipNode::AnimationClipNode::toggleOffsetAnimation ( )
slot

Slot which is called Offset Animation option change.

Slot which is called on Offset Animation option change.

void AnimationClipNode::AnimationClipNode::updateTimer ( )
slot

On timer update.

Slot which is called on timer timeout.

void AnimationClipNode::AnimationClipNode::triggerReload ( )
slot

Trigger anim file reload.

void AnimationClipNode::AnimationClipNode::parseAnimationFile ( const QString &  filename)
protected

Reads all animation curves from the file with the given name.

Protected Functions.

Parameters
filenameThe name of the file with the animation curves to parse.

Reads all animation curves from the file with the given name.

Parameters
filenameThe name of the file with the animation curves to parse.
void AnimationClipNode::AnimationClipNode::createAnimationCurves ( QString  clipName,
double  clipLength 
)
protected

Generates OGRE animation curves (Ogre::NumericAnimationTrack).

Parameters
clipNameName of the clip.
animationLengthOverall length of animation clip.
bool AnimationClipNode::AnimationClipNode::loadAnimationClip ( )
protected

Loads animation clip.

bool AnimationClipNode::AnimationClipNode::removeParameters ( )
protected

Removes dynamic parameters.

Remove dynamic parameters.

bool AnimationClipNode::AnimationClipNode::generateParameters ( )
protected

Generates dynamic parameters.

Generate dynamic parameters.

void AnimationClipNode::AnimationClipNode::increaseFrameCount ( )
privateslot

Increase frame count.

void AnimationClipNode::AnimationClipNode::resetFrameCount ( )
privateslot

Reset frame count.

Member Data Documentation

ParameterGroup* AnimationClipNode::AnimationClipNode::m_animationGroup
private
ParameterGroup* AnimationClipNode::AnimationClipNode::m_boneGroup
private
ParameterGroup* AnimationClipNode::AnimationClipNode::m_cameraGroup
private
QStringList AnimationClipNode::AnimationClipNode::m_groupSuffixes
private
QStringList AnimationClipNode::AnimationClipNode::m_boneSuffixes
private
QStringList AnimationClipNode::AnimationClipNode::m_translateSuffixes
private
QStringList AnimationClipNode::AnimationClipNode::m_rotateSuffixes
private
QStringList AnimationClipNode::AnimationClipNode::m_scaleSuffixes
private
QMap<QString, QMap<QString, double> > AnimationClipNode::AnimationClipNode::m_parameterMap
private
QMap<QString, unsigned short> AnimationClipNode::AnimationClipNode::m_forwCurveMap
private
QMap<unsigned short, QString> AnimationClipNode::AnimationClipNode::m_backwCurveMap
private
QMap<QString, AnimCurve*> AnimationClipNode::AnimationClipNode::m_animCurves
private
Ogre::Animation* AnimationClipNode::AnimationClipNode::m_animation
private
QTimer* AnimationClipNode::AnimationClipNode::m_timer
private
QTime AnimationClipNode::AnimationClipNode::m_lastTimestamp
private
bool AnimationClipNode::AnimationClipNode::m_isExternallyControlled
private
bool AnimationClipNode::AnimationClipNode::m_isPlaying
private
bool AnimationClipNode::AnimationClipNode::m_stop
private
bool AnimationClipNode::AnimationClipNode::m_offsetAnimation
private
double AnimationClipNode::AnimationClipNode::m_progress
private
int AnimationClipNode::AnimationClipNode::m_currentFrame
private

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