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

The S3DGame class. More...

#include <S3DGame.h>

Inheritance diagram for S3DGameNode::S3DGame:
Inheritance graph
[legend]
Collaboration diagram for S3DGameNode::S3DGame:
Collaboration graph
[legend]

Public Member Functions

 S3DGame (const QString &name, ParameterGroup *parameterRoot)
 Constructor of the S3DGameNode class.
 
virtual ~S3DGame ()
 Destructor of the S3DGameNode class.
 
- Public Member Functions inherited from S3DGameNode::S3DGameNode
 S3DGameNode (const QString &name, ParameterGroup *parameterRoot)
 Constructor of the S3DGameNode class.
 
virtual ~S3DGameNode ()
 Destructor of the S3DGameNode class.
 
virtual Ogre::SceneNodegetSceneNode ()
 Returns the scene node that contains scene objects created or modified by this node.
 
- Public Member Functions inherited from Frapper::ViewNode
 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::TexturePtr getImage ()
 Returns the image that is generated by this node.
 
- Public Member Functions inherited from Frapper::CurveEditorDataNode
 CurveEditorDataNode (const QString &name, ParameterGroup *parameterRoot)
 Constructor of the CurveEditorDataNode class.
 
virtual ~CurveEditorDataNode ()
 Destructor of the CurveEditorDataNode class.
 
ParameterGroupgetCurveEditorGoup () const
 Public Functions.
 
void setCurveEditorGoup (ParameterGroup *parameterGroup)
 
- 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 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.
 

Protected Member Functions

virtual void ResetGame ()
 
- Protected Member Functions inherited from S3DGameNode::S3DGameNode
void UpdateCamera ()
 
void createInputObjectParameter (const QList< QString > &objectNames)
 
void CopyAnimatedObjects ()
 Process output geometry of both players.
 
void processInputGeometryP1 (Ogre::SceneNode *inputGeometryP1)
 
void processInputGeometryP2 (Ogre::SceneNode *inputGeometryP2)
 
void processObjectMarker (Ogre::SceneNode *inputObjectMarker)
 
void processInputLogic (Ogre::SceneNode *inputLogic)
 
- Protected Member Functions inherited from Frapper::ViewNode
void addOutputParameter (Parameter *outputParameter)
 Adds the given parameter as output parameter to this view node.
 
void removeOutputParameter (Parameter *outputParameter)
 Removes the given parameter as output parameter from this view node.
 
void requestRedraw ()
 Request a redraw of the current ogre scene.
 
- Protected Member Functions inherited from Frapper::CurveEditorDataNode
void clearDatabase ()
 Clears all data from the motion data database.
 
- 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 updateGame ()
 Slot which is called on new frame.
 
void timerEvent ()
 Slot which is called on timer update.
 
virtual void loadReady ()
 Executed when scene loading is ready.
 

Private Member Functions

void UpdateCharacterPosition (Path *path, float alpha, float height)
 
void ProcessEvents ()
 
void UpdateWorldObjects ()
 
void AdvanceToNextPath (Path *overNextPath=NULL)
 
bool CheckReady ()
 
void AdvanceTime (int &time, const int &step, const int &max)
 
void AdvanceTimeReset (int &time, const int &step, const int &max)
 
void AdvanceTimeReset (float &time, const float &step, const float &max)
 
void PlayDeathAnim ()
 
void UpdatePlatforms ()
 
void SetTransparency (QString materialName, float alpha)
 
float getPlatformTransparency (float alpha)
 
float getPlatformMoveAlpha (float alpha)
 
void UpdateCharacter ()
 
void AnimateLava ()
 

Private Attributes

float m_normalizedTime
 Storage for the normalized timer input.
 
PathmCurrentPath
 
PathmNextPath
 
PathmCheckpoint
 
bool mP1Action
 
bool mP2Action
 
bool mPlayDeath
 
int mDeathAnimTimer
 
int mWalkAnimTimer
 
int mFallAnimTimer
 
int mJumpAnimTimer
 
int mPCTime
 
int mPCLoopTime
 
int mPCStep
 
bool mPlatform1
 
bool mPlatform2
 
bool mPlatform3
 
int mPlatform1Time
 
int mPlatform2Time
 
int mPlatform3Time
 
float mPlatform1Alpha
 
float mPlatform2Alpha
 
float mPlatform3Alpha
 
int mEndScreenTime
 
int mEndScreenTimeMax
 
float mLavaTimer
 
AnimatedDoormDoor
 
Ogre::Vector3 mOrigin
 
bool mCreateJump
 
bool mCreateFall
 
bool mCreateDive
 
QTime mTime
 
int mElapsed
 

Additional Inherited Members

- Public Slots inherited from Frapper::ViewNode
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 inherited from Frapper::ViewNode
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.
 
- Static Public Attributes inherited from Frapper::Node
static int s_numberOfInstances
 
static int s_totalNumberOfInstances
 
- Protected Attributes inherited from S3DGameNode::S3DGameNode
S3DGameEngine mEngine
 The S3DGame engine, handles parsing of input geometry.
 
Ogre::SceneManager * mSceneManager
 Reference to the ogre scene manager.
 
Ogre::SceneNodemGameSceneNode
 Scene nodes for the game.
 
Ogre::SceneNodemOutputGeometryP1
 
Ogre::SceneNodemOutputGeometryP2
 
Ogre::SceneNodemOutputGeometryBoth
 
Ogre::SceneNodemPCModelTransform
 Scene nodes for player character and light transformation.
 
Ogre::SceneNodemPCModelLights
 
Ogre::SceneNodemLevel
 Scenes node for the level geometry.
 
Ogre::SceneNodemLevelP1
 
Ogre::SceneNodemLevelP2
 
Ogre::SceneNodemLogic
 Scene node for the level.
 
Ogre::SceneNodemObjectMarker
 
Ogre::SceneNodemEventMarker
 
Ogre::SceneNodemCameraNode
 Scene node for the chase camera.
 
OgreContainermGeometryContainerP1
 OgreContainer for the scene node copy update.
 
OgreContainermGeometryContainerP2
 
OgreContainermGeometryContainerBoth
 
OgreContainermGameContainer
 
OgreContainermCameraContainer
 
OgreContainermPCModelContainer
 
ParametermP1ActionParameter
 
ParametermP2ActionParameter
 
int mJumpAnimLength
 
int mWalkAnimLength
 
int mDeathAnimLength
 
int mFallAnimLength
 
int mPlatform1Loop
 
int mPlatform2Loop
 
int mPlatform3Loop
 
float mScale
 
float mStepSize
 
float mIntervalLength
 
float mAnimScale
 
float mLavaStep
 
NumberParametermJumpStart
 
NumberParametermJumpEnd
 
NumberParametermWalk
 
NumberParametermJump
 
NumberParametermDeath
 
NumberParametermFall
 
NumberParametermDive
 
NumberParametermPlatform1Anim
 
NumberParametermPlatform2Anim
 
NumberParametermPlatform3Anim
 
NumberParametermRings
 
NumberParametermEndScreen
 
ParametermWaitIdle
 
ParametermJumpIdle
 
ParametermPosition
 
ParametermOrientation
 

Detailed Description

The S3DGame class.

Constructor & Destructor Documentation

S3DGameNode::S3DGame::S3DGame ( const QString &  name,
ParameterGroup parameterRoot 
)

Constructor of the S3DGameNode class.

Initialization of non-integral static const class members.

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

Constructors and Destructors Constructor of the S3DGame class.

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

Destructor of the S3DGameNode class.

Destructor of the S3DGame 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 S3DGameNode::S3DGame::updateGame ( )
privateslot

Slot which is called on new frame.

Slot which is called on timer update.

void S3DGameNode::S3DGame::timerEvent ( )
privateslot

Slot which is called on timer update.

Public Functions.

Private Slots Slot which is called on timer update.

void S3DGameNode::S3DGame::loadReady ( )
privatevirtualslot

Executed when scene loading is ready.

void S3DGameNode::S3DGame::ResetGame ( )
protectedvirtual
void S3DGameNode::S3DGame::UpdateCharacterPosition ( Path path,
float  alpha,
float  height 
)
private
void S3DGameNode::S3DGame::ProcessEvents ( )
private
void S3DGameNode::S3DGame::UpdateWorldObjects ( )
private
void S3DGameNode::S3DGame::AdvanceToNextPath ( Path overNextPath = NULL)
private
bool S3DGameNode::S3DGame::CheckReady ( )
private
void S3DGameNode::S3DGame::AdvanceTime ( int &  time,
const int &  step,
const int &  max 
)
private
void S3DGameNode::S3DGame::AdvanceTimeReset ( int &  time,
const int &  step,
const int &  max 
)
private
void S3DGameNode::S3DGame::AdvanceTimeReset ( float &  time,
const float &  step,
const float &  max 
)
private
void S3DGameNode::S3DGame::PlayDeathAnim ( )
private
void S3DGameNode::S3DGame::UpdatePlatforms ( )
private
void S3DGameNode::S3DGame::SetTransparency ( QString  materialName,
float  alpha 
)
private
float S3DGameNode::S3DGame::getPlatformTransparency ( float  alpha)
private
float S3DGameNode::S3DGame::getPlatformMoveAlpha ( float  alpha)
private
void S3DGameNode::S3DGame::UpdateCharacter ( )
private
void S3DGameNode::S3DGame::AnimateLava ( )
private

Member Data Documentation

float S3DGameNode::S3DGame::m_normalizedTime
private

Storage for the normalized timer input.

Path* S3DGameNode::S3DGame::mCurrentPath
private
Path* S3DGameNode::S3DGame::mNextPath
private
Path* S3DGameNode::S3DGame::mCheckpoint
private
bool S3DGameNode::S3DGame::mP1Action
private
bool S3DGameNode::S3DGame::mP2Action
private
bool S3DGameNode::S3DGame::mPlayDeath
private
int S3DGameNode::S3DGame::mDeathAnimTimer
private
int S3DGameNode::S3DGame::mWalkAnimTimer
private
int S3DGameNode::S3DGame::mFallAnimTimer
private
int S3DGameNode::S3DGame::mJumpAnimTimer
private
int S3DGameNode::S3DGame::mPCTime
private
int S3DGameNode::S3DGame::mPCLoopTime
private
int S3DGameNode::S3DGame::mPCStep
private
bool S3DGameNode::S3DGame::mPlatform1
private
bool S3DGameNode::S3DGame::mPlatform2
private
bool S3DGameNode::S3DGame::mPlatform3
private
int S3DGameNode::S3DGame::mPlatform1Time
private
int S3DGameNode::S3DGame::mPlatform2Time
private
int S3DGameNode::S3DGame::mPlatform3Time
private
float S3DGameNode::S3DGame::mPlatform1Alpha
private
float S3DGameNode::S3DGame::mPlatform2Alpha
private
float S3DGameNode::S3DGame::mPlatform3Alpha
private
int S3DGameNode::S3DGame::mEndScreenTime
private
int S3DGameNode::S3DGame::mEndScreenTimeMax
private
float S3DGameNode::S3DGame::mLavaTimer
private
AnimatedDoor* S3DGameNode::S3DGame::mDoor
private
Ogre::Vector3 S3DGameNode::S3DGame::mOrigin
private
bool S3DGameNode::S3DGame::mCreateJump
private
bool S3DGameNode::S3DGame::mCreateFall
private
bool S3DGameNode::S3DGame::mCreateDive
private
QTime S3DGameNode::S3DGame::mTime
private
int S3DGameNode::S3DGame::mElapsed
private

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