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

Class representing the model of the scene containing objects like meshes, cameras and lights. More...

#include <SceneModel.h>

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

Public Slots

void connectParameters (Parameter *sourceParameter, Parameter *targetParameter)
 Creates a connection between the given parameters.
 
void connectParameters (Node *sourceNode, Node *targetNode)
 Create connections between two nodes (connect by name).
 
void createCamera (ViewingParameters *viewingParameters)
 Creates a new camera with parameters initialized according to the given viewing parameters.
 
void deleteCamera (const QString &cameraName)
 Deletes an existing camera.
 
void updateCamera (const QString &cameraName, ViewingParameters *viewingParameters)
 Applies the given viewing parameters to the camera with the given name.
 
void cameraListRequested ()
 Sends the list of camereas when requested.
 
void applyCamera (const QString &cameraName, ViewingParameters *viewingParameters)
 Applies the viewing parameters of the camera with the given name to the given viewing parameters.
 
void deleteObject (const QString &name)
 Deletes a given object.
 
void selectDeselectObject (const QString &name)
 Selects and deselects a given object.
 
void deleteSelected ()
 Deletes the currently selected objects from the scene.
 
void selectAll ()
 Selects all objects in the scene.
 
void evaluateSelectedObjects ()
 Sets the evaluation flag of the selected objects to True.
 
void ignoreSelectedObjects ()
 Sets the evaluation flag of the selected objects to False.
 
void graphicsSceneSelectionChanged ()
 Updates the selection model according to the currently selected graphics items in the graphics scene.
 
void changeNodeName (const QString &name)
 Updates the m_graphicsItemList in case a node has changed its name.
 
void selectObject (const QString &name, bool toggle=false)
 Selects the object with the given name or toggles the selection state of the object with the given name.
 
void deselectObject (const QString &name="")
 Deselects the object with the given name.
 
void setCurrentFrame (int index, bool realtime=false)
 Sets the index of the current frame in the scene's time.
 
void updateFrame ()
 Triggers set frame one time.
 
void setStartFrame (int index)
 Sets the index of the start frame in the scene's time.
 
void setEndFrame (int index)
 Sets the index of the end frame in the scene's time.
 
void setInFrame (int index)
 Sets the index of the in frame in the scene's time.
 
void setOutFrame (int index)
 Sets the index of the out frame in the scene's time.
 
void setFrameStep (int frameStep)
 Sets the frame step to use for the scene.
 
void setFrameRate (int frameRate)
 Sets the frame rate to use for the scene.
 
void frameSelectedObjects (ViewingParameters *viewingParameters)
 Adjusts the given viewing parameters so that the currently selected objects are centered in the view.
 
void setViewNode (unsigned int stageIndex, ViewNode *viewNode)
 Sets the node that currently has the view flag set.
 
void rebuildScene ()
 Rebuilds the OGRE scene by obtaining the Ogre scene node from the current view node.
 
void redrawTriggered ()
 Redraws the OGRE scene when active view node exists.
 
void setNewNodePosition (const QPointF &scenePosition)
 Sets the scene coordinates to use when creating a new node.
 
void addKey (NumberParameter *numberParameter)
 Adds a keyframe for the given number parameter at the current frame index.
 

Signals

void sceneNameChanged (const QString &name)
 Signal that is emitted when the scene name has changed.
 
void realtimeModeToggled (bool realtime)
 Signal that is emitted when the realtime mode has changed.
 
void selectionChanged (bool objectsSelected)
 Signal that is emitted when the selection has changed.
 
void currentFrameSet (int index)
 Signal that is emitted when the index of the current frame in the scene's time has been changed.
 
void startFrameSet (int index)
 Signal that is emitted when the index of the start frame in the scene's time has been changed.
 
void endFrameSet (int index)
 Signal that is emitted when the index of the end frame in the scene's time has been changed.
 
void inFrameSet (int index)
 Signal that is emitted when the index of the in frame in the scene's time has been changed.
 
void outFrameSet (int index)
 Signal that is emitted when the index of the out frame in the scene's time has been changed.
 
void frameStepSet (int frameStep)
 Signal that is emitted when the frame step for the scene has been changed.
 
void frameRateSet (int frameRate)
 Signal that is emitted when the frame rate for the scene has been changed.
 
void modified ()
 Signal that is emitted when the internal state of the scene model has changed.
 
void triggerRedraw ()
 Signal emitted when ogre scene node has changed in a a way that only scene redraw is needed. No structural change.
 
void renderingTriggered ()
 Signal emitted when render targets should be updated.
 
void imageSet (unsigned int stageIndex, Ogre::TexturePtr image)
 Signal that is emitted when the image to be viewed has been changed.
 
void objectCreated (const QString &objectName)
 Signal that is emitted when a new object has been created.
 
void camerasUpdated (const QList< Node * > &cameraNodes, const QString &cameraName)
 Signal that is emitted when the list of cameras has changed.
 
void loadSceneElementsReady ()
 Signal that is emitted when the parameter loading is ready.
 
void loadReady ()
 Signal that is emitted when the scene loading is ready.
 
void saveStart ()
 Signal that is emitted when the scene loading is ready.
 

Public Member Functions

 SceneModel ()
 Constructor of the SceneModel class.
 
 ~SceneModel ()
 Destructor of the SceneModel class.
 
QString getName () const
 Returns the name of the scene.
 
void setName (const QString &name)
 Sets the name of the scene.
 
NodeModelgetNodeModel () const
 Returns the node model that holds all scene objects like meshes, cameras and lights.
 
QItemSelectionModel * getSelectionModel () const
 Returns the selection model to use for synchronizing selections in all views.
 
NodeGraphicsItemgetGraphicsItem (const QString &name) const
 Returns the graphics graphics item associated with a node by name.
 
QGraphicsScene * getGraphicsScene () const
 Returns the graphics scene to use for all network views.
 
QList< QAction * > getControlActions () const
 Returns a list of actions representing scene time controls.
 
QStringList getSelectedObjects (bool onlyConnections=false) const
 Builds a list of object names from the current selection.
 
int getFrameStep () const
 Returns the frame step currently set for the scene.
 
int getFrameRate () const
 Returns the frame rate currently set for the scene.
 
void getFrameRange (int &firstFrame, int &lastFrame) const
 Fills the given frame index variables with the frame range available for the scene time.
 
int getCurrentFrame () const
 Returns the index of the current frame in the scene's time.
 
int getStartFrame () const
 Returns the index of the start frame in the scene's time.
 
int getEndFrame () const
 Returns the index of the end frame in the scene's time.
 
int getInFrame () const
 Returns the index of the in frame in the scene's time.
 
int getOutFrame () const
 Returns the index of the out frame in the scene's time.
 
void createSceneRoot ()
 Creates the OGRE scene root scene node.
 
void createScene (daeElement *rootElement)
 Creates the scene objects by parsing the COLLADA element tree contained in the given root element.
 
QString createObject (const QString &typeName, const QString &name="", const QPointF &position=QPointF(-1,-1), bool select=false, bool visible=true)
 Creates a scene object of the given type with the given name with a node graphics item at the given location and optionally selects it.
 
void connectParameters (Node *sourceNode, const QString &sourceParameterName, Node *targetNode, const QString &targetParameterName)
 Creates a connection between the parameters with the given names of the given nodes.
 
void connectParametersByName (Node *sourceNode, Node *targetNode)
 Connects all parameters with the same name of two nodes.
 
void createDaeElements (daeElement *parentElement)
 Creates a COLLADA element tree corresponding to the objects currently contained in the scene.
 
void createSceneDAEProperties (daeElement *parentElement) const
 Creates a COLLADA elements representing global scene properties.
 
void clear ()
 Deletes all objects contained in the scene.
 

Protected Member Functions

virtual void timerEvent (QTimerEvent *event)
 Handles timer events for the scene model.
 

Private Slots

void selectionModelSelectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
 Updates the scene model according to the given item selections.
 
void connectionDestroyed (Connection *connection)
 Removes the connection that has been destroyed from the list of connections.
 
void on_m_inFrameAction_triggered (bool checked=false)
 Event handler that is called when the in frame action has been triggered.
 
void on_m_previousKeyAction_triggered (bool checked=false)
 Event handler that is called when the previous key action has been triggered.
 
void on_m_previousFrameAction_triggered (bool checked=false)
 Event handler that is called when the previous frame action has been triggered.
 
void on_m_playAction_toggled (bool checked)
 Event handler that is called when the play action has been toggled.
 
void on_m_realtimeAction_toggled (bool checked)
 Event handler that is called when the realtime action has been toggled.
 
void on_m_nextFrameAction_triggered (bool checked=false)
 Event handler that is called when the next frame action has been triggered.
 
void on_m_nextKeyAction_triggered (bool checked=false)
 Event handler that is called when the next key action has been triggered.
 
void on_m_outFrameAction_triggered (bool checked=false)
 Event handler that is called when the out frame action has been triggered.
 

Private Member Functions

void initializeActions ()
 Initializes the actions that are contained in the scene model.
 
void updateActions ()
 Enables or disables the timeline actions according to the current frame index.
 
void deleteConnection (const QString &name, bool deleteGraphicItem=false)
 
QPointF decodePosition (std::string position, const QString &nodeName)
 Decodes the given position for node graphics items from a COLLADA scene file.
 
void createDaeElements (ParameterGroup *parameterGroup, daeElement *parentElement) const
 Creates COLLADA elements corresponding to the parameters contained in the given parameter group and adds them to the given parent element.
 
void createParameters (Node *node, ParameterGroup *parameterGroup, daeElement *parametersElement)
 

Private Attributes

QString m_name
 The name of the current scene.
 
NodeModelm_nodeModel
 The node model that holds all scene objects like meshes, cameras and lights.
 
QItemSelectionModel * m_selectionModel
 The selection model to use for synchronizing selections in all views.
 
QGraphicsScene * m_graphicsScene
 The graphics scene to use for all network views.
 
QHash< QString, QGraphicsItem * > m_graphicsItemMap
 A map for referencing graphics items by name.
 
QHash< QString, QGraphicsItem * > m_connectionGraphicsItemMap
 A map for referencing graphics items (connections) by name.
 
QHash< unsigned int, Connection * > m_connectionMap
 The list of connections currently set up in the scene.
 
QList< Node * > m_cameraNodes
 The list of camera nodes currently set up in the scene.
 
int m_newNodeIndex
 The number of newly created nodes to be used in the name of new nodes.
 
NumberParameterm_frameParameter
 The parameter containing the index of the current frame and the global frame range.
 
NumberParameterm_frameRangeParameter
 The parameter defining the indices of the in and out frames.
 
int m_frameStep
 The number of frames to advance the animation by each play back step.
 
NumberParameterm_fpsParameter
 The parameter containing the number of frames per second.
 
QTime m_lastTimestamp
 The last timestamp.
 
float m_averageFps
 The averarage fps.
 
unsigned int m_averageCounter
 The average counter.
 
QList< ViewNode * > m_viewNodeList
 The node that currently has the view flag set.
 
int m_timerId
 The ID of the scene timer.
 
Ogre::SceneNodem_sceneRoot
 The parent scene node for all scene objects to be displayed in viewports.
 
QPointF m_newNodePosition
 The position to use for new nodes.
 
QAction * m_inFrameAction
 The action for jumping to the in frame of the animation.
 
QAction * m_previousKeyAction
 The action for jumping to the previous key of the selected channel.
 
QAction * m_previousFrameAction
 The action for selecting the previous frame in the animation.
 
QAction * m_playAction
 The action for starting and stopping animation playback.
 
QAction * m_realtimeAction
 The action for starting and stopping realtime animation playback.
 
QAction * m_nextFrameAction
 The action for selecting the next frame in the animation.
 
QAction * m_nextKeyAction
 The action for jumping to the next key of the selected channel.
 
QAction * m_outFrameAction
 The action for jumping to the out frame of the animation.
 
QAction * m_separatorAction
 The action representing a separator for separating the playback options.
 
QAction * m_playOptionsAction
 The action for grouping playback options.
 
QAction * m_playLoopingAction
 The action representing the play looping option.
 
QAction * m_playOnceAction
 The action representing the play once option.
 

Detailed Description

Class representing the model of the scene containing objects like meshes, cameras and lights.

Inheritance Diagram
dot_inline_dotgraph_11.png
[legend]

Constructor & Destructor Documentation

Frapper::SceneModel::SceneModel ( )

Constructor of the SceneModel class.

Constructors and Destructors.

Frapper::SceneModel::~SceneModel ( )

Destructor of the SceneModel class.

Member Function Documentation

QString Frapper::SceneModel::getName ( ) const

Returns the name of the scene.

Public Functions.

Returns
The name of the scene.

Returns the name of the scene.

Returns
The name of the scene.
void Frapper::SceneModel::setName ( const QString &  name)

Sets the name of the scene.

Parameters
nameThe name of the scene.
NodeModel * Frapper::SceneModel::getNodeModel ( ) const

Returns the node model that holds all scene objects like meshes, cameras and lights.

Returns the standard item model that holds all scene objects like meshes, cameras and lights.

Returns
The node model that holds all scene objects.
The standard item model that holds all scene objects.
QItemSelectionModel * Frapper::SceneModel::getSelectionModel ( ) const

Returns the selection model to use for synchronizing selections in all views.

Returns
The selection model to use for synchronizing selections.
NodeGraphicsItem * Frapper::SceneModel::getGraphicsItem ( const QString &  name) const

Returns the graphics graphics item associated with a node by name.

Returns
The graphics item associated with the node.
QGraphicsScene * Frapper::SceneModel::getGraphicsScene ( ) const

Returns the graphics scene to use for all network views.

Returns
The graphics scene to use for all network views.
QList< QAction * > Frapper::SceneModel::getControlActions ( ) const

Returns a list of actions representing scene time controls.

Returns
A list of actions representing scene time controls.
QStringList Frapper::SceneModel::getSelectedObjects ( bool  onlyConnections = false) const

Builds a list of object names from the current selection.

Returns
A list of names of the currently selected objects.
int Frapper::SceneModel::getFrameStep ( ) const

Returns the frame step currently set for the scene.

Returns
The frame step currently set for the scene.
int Frapper::SceneModel::getFrameRate ( ) const

Returns the frame rate currently set for the scene.

Returns
The frame rate currently set for the scene.
void Frapper::SceneModel::getFrameRange ( int &  firstFrame,
int &  lastFrame 
) const

Fills the given frame index variables with the frame range available for the scene time.

Parameters
firstFrameThe index of the first frame in the scene's time range.
lastFrameThe index of the last frame in the scene's time range.
int Frapper::SceneModel::getCurrentFrame ( ) const

Returns the index of the current frame in the scene's time.

Returns
The index of the current frame in the scene's time.
int Frapper::SceneModel::getStartFrame ( ) const

Returns the index of the start frame in the scene's time.

Returns
The index of the start frame in the scene's time.
int Frapper::SceneModel::getEndFrame ( ) const

Returns the index of the end frame in the scene's time.

Returns
The index of the end frame in the scene's time.
int Frapper::SceneModel::getInFrame ( ) const

Returns the index of the in frame in the scene's time.

Returns
The index of the in frame in the scene's time.
int Frapper::SceneModel::getOutFrame ( ) const

Returns the index of the out frame in the scene's time.

Returns
The index of the out frame in the scene's time.
void Frapper::SceneModel::createSceneRoot ( )

Creates the OGRE scene root scene node.

void Frapper::SceneModel::createScene ( daeElement *  rootElement)

Creates the scene objects by parsing the COLLADA element tree contained in the given root element.

Parameters
rootElementThe root element of the tree to build the scene from.
QString Frapper::SceneModel::createObject ( const QString &  typeName,
const QString &  name = "",
const QPointF &  position = QPointF(-1, -1),
bool  select = false,
bool  visible = true 
)

Creates a scene object of the given type with the given name with a node graphics item at the given location and optionally selects it.

Parameters
typeNameThe name of the type of object to create.
nameThe name to give to the object to add to the model.
positionThe position for the object's node graphics item.
selectFlag to control whether to select the new node.
visibleFlag to control whether the object should be visible in the scene model.
Returns
The name of the created object, or an empty string if the object could not be created.
void Frapper::SceneModel::connectParameters ( Node sourceNode,
const QString &  sourceParameterName,
Node targetNode,
const QString &  targetParameterName 
)

Creates a connection between the parameters with the given names of the given nodes.

The parameters to be connected must have the same parameter type.

Parameters
sourceNodeThe source node for the new connection.
sourceParameterNameThe name of the output parameter of the source node.
targetNodeThe target node for the new connection.
targetParameterNameThe name of the input parameter of the target node.
void Frapper::SceneModel::connectParametersByName ( Node sourceNode,
Node targetNode 
)

Connects all parameters with the same name of two nodes.

The parameters to be connected must have the same parameter type.

Parameters
sourceNodeThe source node for the new connections.
targetNodeThe target node for the new connections.
void Frapper::SceneModel::createDaeElements ( daeElement *  parentElement)

Creates a COLLADA element tree corresponding to the objects currently contained in the scene.

Parameters
parentElementThe element under which to create the COLLADA element tree representing the scene.
void Frapper::SceneModel::createSceneDAEProperties ( daeElement *  parentElement) const

Creates a COLLADA elements representing global scene properties.

Parameters
parentElementThe element under which to create the COLLADA element tree representing the scene.
void Frapper::SceneModel::clear ( )

Deletes all objects contained in the scene.

void Frapper::SceneModel::connectParameters ( Parameter sourceParameter,
Parameter targetParameter 
)
slot

Creates a connection between the given parameters.

Public Slots.

The parameters to be connected must have the same parameter type.

Parameters
sourceParameterThe output parameter of the source node to connect.
targetParameterThe input parameter of the target node to connect.

Creates a connection between the given parameters.

The parameters to be connected must have the same parameter type.

Parameters
sourceParameterThe output parameter of the source node to connect.
targetParameterThe input parameter of the target node to connect.
void Frapper::SceneModel::connectParameters ( Node sourceNode,
Node targetNode 
)
slot

Create connections between two nodes (connect by name).

Parameters
sourceNodeThe source node.
targetNodeThe target node.
void Frapper::SceneModel::createCamera ( ViewingParameters viewingParameters)
slot

Creates a new camera with parameters initialized according to the given viewing parameters.

Parameters
viewingParametersA collection of parameters for viewing the 3D scene.
void Frapper::SceneModel::deleteCamera ( const QString &  cameraName)
slot

Deletes an existing camera.

Parameters
cameraNameThe name of the camera to delete.
void Frapper::SceneModel::updateCamera ( const QString &  cameraName,
ViewingParameters viewingParameters 
)
slot

Applies the given viewing parameters to the camera with the given name.

Parameters
cameraNameThe name of the camera to update.
viewingParametersThe viewing parameters to apply to the camera with the given name.
void Frapper::SceneModel::cameraListRequested ( )
slot

Sends the list of camereas when requested.

void Frapper::SceneModel::applyCamera ( const QString &  cameraName,
ViewingParameters viewingParameters 
)
slot

Applies the viewing parameters of the camera with the given name to the given viewing parameters.

Parameters
cameraNameThe name of the camera to use.
viewingParametersThe viewing parameters to modify.
void Frapper::SceneModel::deleteObject ( const QString &  name)
slot

Deletes a given object.

void Frapper::SceneModel::selectDeselectObject ( const QString &  name)
slot

Selects and deselects a given object.

void Frapper::SceneModel::deleteSelected ( )
slot

Deletes the currently selected objects from the scene.

void Frapper::SceneModel::selectAll ( )
slot

Selects all objects in the scene.

void Frapper::SceneModel::evaluateSelectedObjects ( )
slot

Sets the evaluation flag of the selected objects to True.

void Frapper::SceneModel::ignoreSelectedObjects ( )
slot

Sets the evaluation flag of the selected objects to False.

void Frapper::SceneModel::graphicsSceneSelectionChanged ( )
slot

Updates the selection model according to the currently selected graphics items in the graphics scene.

Is called when the selection in the graphics scene has changed.

void Frapper::SceneModel::changeNodeName ( const QString &  name)
slot

Updates the m_graphicsItemList in case a node has changed its name.

void Frapper::SceneModel::selectObject ( const QString &  name,
bool  toggle = false 
)
slot

Selects the object with the given name or toggles the selection state of the object with the given name.

Parameters
nameThe name of the object to select.
toggleFlag that controls whether to toggle the selection of the object with the given name.
void Frapper::SceneModel::deselectObject ( const QString &  name = "")
slot

Deselects the object with the given name.

Parameters
nameThe name of the object to deselect.
void Frapper::SceneModel::setCurrentFrame ( int  index,
bool  realtime = false 
)
inlineslot

Sets the index of the current frame in the scene's time.

Parameters
indexThe new index of the current frame in the scene's time.
void Frapper::SceneModel::updateFrame ( )
slot

Triggers set frame one time.

void Frapper::SceneModel::setStartFrame ( int  index)
slot

Sets the index of the start frame in the scene's time.

Parameters
indexThe new index of the start frame in the scene's time.
void Frapper::SceneModel::setEndFrame ( int  index)
slot

Sets the index of the end frame in the scene's time.

Parameters
indexThe new index of the end frame in the scene's time.
void Frapper::SceneModel::setInFrame ( int  index)
slot

Sets the index of the in frame in the scene's time.

Parameters
indexThe new index of the in frame in the scene's time.
void Frapper::SceneModel::setOutFrame ( int  index)
slot

Sets the index of the out frame in the scene's time.

Parameters
indexThe new index of the out frame in the scene's time.
void Frapper::SceneModel::setFrameStep ( int  frameStep)
slot

Sets the frame step to use for the scene.

Parameters
frameStepThe frame step to use for the scene.
void Frapper::SceneModel::setFrameRate ( int  frameRate)
slot

Sets the frame rate to use for the scene.

Parameters
frameRateThe frame rate to use for the scene.
void Frapper::SceneModel::frameSelectedObjects ( ViewingParameters viewingParameters)
slot

Adjusts the given viewing parameters so that the currently selected objects are centered in the view.

All objects will be framed if no objects are currently selected.

Parameters
viewingParametersThe viewing parameters to modify.
void Frapper::SceneModel::setViewNode ( unsigned int  stageIndex,
ViewNode viewNode 
)
slot

Sets the node that currently has the view flag set.

Parameters
stageIndexThe index of the stage for which to set the view node (currently not used).
viewNodeThe new node that is currently viewed.
void Frapper::SceneModel::rebuildScene ( )
slot

Rebuilds the OGRE scene by obtaining the Ogre scene node from the current view node.

Obtains the OGRE scene node from the current view node and adds it as a child to the scene root scene node.

void Frapper::SceneModel::redrawTriggered ( )
slot

Redraws the OGRE scene when active view node exists.

void Frapper::SceneModel::setNewNodePosition ( const QPointF &  scenePosition)
slot

Sets the scene coordinates to use when creating a new node.

Parameters
scenePositionThe position in scene coordinates to use for a new node.
void Frapper::SceneModel::addKey ( NumberParameter numberParameter)
slot

Adds a keyframe for the given number parameter at the current frame index.

Parameters
numberParameterThe number parameter to add a keyframe for.
void Frapper::SceneModel::sceneNameChanged ( const QString &  name)
signal

Signal that is emitted when the scene name has changed.

Parameters
nameThe scene name.
void Frapper::SceneModel::realtimeModeToggled ( bool  realtime)
signal

Signal that is emitted when the realtime mode has changed.

Parameters
realtimeFlag that states whether realtime mode is enabled or not.
void Frapper::SceneModel::selectionChanged ( bool  objectsSelected)
signal

Signal that is emitted when the selection has changed.

Parameters
objectsSelectedFlag that states whether objects in the scene are selected.
void Frapper::SceneModel::currentFrameSet ( int  index)
signal

Signal that is emitted when the index of the current frame in the scene's time has been changed.

Parameters
indexThe new index of the current frame in the scene's time.
void Frapper::SceneModel::startFrameSet ( int  index)
signal

Signal that is emitted when the index of the start frame in the scene's time has been changed.

Parameters
indexThe new index of the start frame in the scene's time.
void Frapper::SceneModel::endFrameSet ( int  index)
signal

Signal that is emitted when the index of the end frame in the scene's time has been changed.

Parameters
indexThe new index of the end frame in the scene's time.
void Frapper::SceneModel::inFrameSet ( int  index)
signal

Signal that is emitted when the index of the in frame in the scene's time has been changed.

Parameters
indexThe new index of the in frame in the scene's time.
void Frapper::SceneModel::outFrameSet ( int  index)
signal

Signal that is emitted when the index of the out frame in the scene's time has been changed.

Parameters
indexThe new index of the out frame in the scene's time.
void Frapper::SceneModel::frameStepSet ( int  frameStep)
signal

Signal that is emitted when the frame step for the scene has been changed.

Parameters
frameStepThe new frame step to use for the scene.
void Frapper::SceneModel::frameRateSet ( int  frameRate)
signal

Signal that is emitted when the frame rate for the scene has been changed.

Parameters
frameRateThe new frame rate to use for the scene.
void Frapper::SceneModel::modified ( )
signal

Signal that is emitted when the internal state of the scene model has changed.

void Frapper::SceneModel::triggerRedraw ( )
signal

Signal emitted when ogre scene node has changed in a a way that only scene redraw is needed. No structural change.

void Frapper::SceneModel::renderingTriggered ( )
signal

Signal emitted when render targets should be updated.

void Frapper::SceneModel::imageSet ( unsigned int  stageIndex,
Ogre::TexturePtr  image 
)
signal

Signal that is emitted when the image to be viewed has been changed.

Parameters
stageIndexThe index of the stage to which the image belongs.
imageThe image that is to be viewed.
void Frapper::SceneModel::objectCreated ( const QString &  objectName)
signal

Signal that is emitted when a new object has been created.

Parameters
objectNameThe name of the created object.
void Frapper::SceneModel::camerasUpdated ( const QList< Node * > &  cameraNodes,
const QString &  cameraName 
)
signal

Signal that is emitted when the list of cameras has changed.

Parameters
cameraNamesList of cameras in the scene.
cameraNameName of new created camera.
void Frapper::SceneModel::loadSceneElementsReady ( )
signal

Signal that is emitted when the parameter loading is ready.

void Frapper::SceneModel::loadReady ( )
signal

Signal that is emitted when the scene loading is ready.

void Frapper::SceneModel::saveStart ( )
signal

Signal that is emitted when the scene loading is ready.

void Frapper::SceneModel::timerEvent ( QTimerEvent *  event)
protectedvirtual

Handles timer events for the scene model.

Protected Events.

Parameters
eventThe description of the timer event.

Handles timer events for the scene model.

Parameters
eventThe description of the timer event.
void Frapper::SceneModel::selectionModelSelectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
)
privateslot

Updates the scene model according to the given item selections.

Private Slots.

Is called when the selection in the selection model has changed.

Parameters
selectedThe list of selected items.
deselectedThe list of deselected items.

Updates the scene model according to the given item selections.

Is called when the selection in the selection model has changed.

Parameters
selectedThe list of selected items.
deselectedThe list of deselected items.
void Frapper::SceneModel::connectionDestroyed ( Connection connection)
privateslot

Removes the connection that has been destroyed from the list of connections.

Is called when a connection has been destroyed.

void Frapper::SceneModel::on_m_inFrameAction_triggered ( bool  checked = false)
privateslot

Event handler that is called when the in frame action has been triggered.

Parameters
checkedThe state of the action.
void Frapper::SceneModel::on_m_previousKeyAction_triggered ( bool  checked = false)
privateslot

Event handler that is called when the previous key action has been triggered.

Parameters
checkedThe state of the action.
void Frapper::SceneModel::on_m_previousFrameAction_triggered ( bool  checked = false)
privateslot

Event handler that is called when the previous frame action has been triggered.

Parameters
checkedThe state of the action.
void Frapper::SceneModel::on_m_playAction_toggled ( bool  checked)
privateslot

Event handler that is called when the play action has been toggled.

Parameters
checkedThe state of the play action.
checkedThe state of the action.
void Frapper::SceneModel::on_m_realtimeAction_toggled ( bool  checked)
privateslot

Event handler that is called when the realtime action has been toggled.

Parameters
checkedThe state of the action.
void Frapper::SceneModel::on_m_nextFrameAction_triggered ( bool  checked = false)
privateslot

Event handler that is called when the next frame action has been triggered.

Parameters
checkedThe state of the action.
void Frapper::SceneModel::on_m_nextKeyAction_triggered ( bool  checked = false)
privateslot

Event handler that is called when the next key action has been triggered.

Parameters
checkedThe state of the action.
void Frapper::SceneModel::on_m_outFrameAction_triggered ( bool  checked = false)
privateslot

Event handler that is called when the out frame action has been triggered.

Parameters
checkedThe state of the action.
void Frapper::SceneModel::initializeActions ( )
private

Initializes the actions that are contained in the scene model.

Private Functions.

void Frapper::SceneModel::updateActions ( )
private

Enables or disables the timeline actions according to the current frame index.

void Frapper::SceneModel::deleteConnection ( const QString &  name,
bool  deleteGraphicItem = false 
)
private
QPointF Frapper::SceneModel::decodePosition ( std::string  position,
const QString &  nodeName 
)
private

Decodes the given position for node graphics items from a COLLADA scene file.

Parameters
positionThe position value to decode into a Qt position.
nodeNameThe name of the node whose position value to decode (used for log messages only).
Returns
The position corresponding to the given position value.
void Frapper::SceneModel::createDaeElements ( ParameterGroup parameterGroup,
daeElement *  parentElement 
) const
private

Creates COLLADA elements corresponding to the parameters contained in the given parameter group and adds them to the given parent element.

Parameters
parameterGroupThe parameter group to create COLLADA elements from.
parentElementThe element under which to create the COLLADA elements representing the parameter group.
void Frapper::SceneModel::createParameters ( Node node,
ParameterGroup parameterGroup,
daeElement *  parametersElement 
)
private

Member Data Documentation

QString Frapper::SceneModel::m_name
private

The name of the current scene.

NodeModel* Frapper::SceneModel::m_nodeModel
private

The node model that holds all scene objects like meshes, cameras and lights.

QItemSelectionModel* Frapper::SceneModel::m_selectionModel
private

The selection model to use for synchronizing selections in all views.

QGraphicsScene* Frapper::SceneModel::m_graphicsScene
private

The graphics scene to use for all network views.

QHash<QString, QGraphicsItem *> Frapper::SceneModel::m_graphicsItemMap
private

A map for referencing graphics items by name.

QHash<QString, QGraphicsItem *> Frapper::SceneModel::m_connectionGraphicsItemMap
private

A map for referencing graphics items (connections) by name.

QHash<unsigned int, Connection *> Frapper::SceneModel::m_connectionMap
private

The list of connections currently set up in the scene.

QList<Node *> Frapper::SceneModel::m_cameraNodes
private

The list of camera nodes currently set up in the scene.

int Frapper::SceneModel::m_newNodeIndex
private

The number of newly created nodes to be used in the name of new nodes.

NumberParameter* Frapper::SceneModel::m_frameParameter
private

The parameter containing the index of the current frame and the global frame range.

NumberParameter* Frapper::SceneModel::m_frameRangeParameter
private

The parameter defining the indices of the in and out frames.

int Frapper::SceneModel::m_frameStep
private

The number of frames to advance the animation by each play back step.

NumberParameter* Frapper::SceneModel::m_fpsParameter
private

The parameter containing the number of frames per second.

QTime Frapper::SceneModel::m_lastTimestamp
private

The last timestamp.

float Frapper::SceneModel::m_averageFps
private

The averarage fps.

unsigned int Frapper::SceneModel::m_averageCounter
private

The average counter.

QList<ViewNode *> Frapper::SceneModel::m_viewNodeList
private

The node that currently has the view flag set.

int Frapper::SceneModel::m_timerId
private

The ID of the scene timer.

Ogre::SceneNode* Frapper::SceneModel::m_sceneRoot
private

The parent scene node for all scene objects to be displayed in viewports.

QPointF Frapper::SceneModel::m_newNodePosition
private

The position to use for new nodes.

QAction* Frapper::SceneModel::m_inFrameAction
private

The action for jumping to the in frame of the animation.

QAction* Frapper::SceneModel::m_previousKeyAction
private

The action for jumping to the previous key of the selected channel.

QAction* Frapper::SceneModel::m_previousFrameAction
private

The action for selecting the previous frame in the animation.

QAction* Frapper::SceneModel::m_playAction
private

The action for starting and stopping animation playback.

QAction* Frapper::SceneModel::m_realtimeAction
private

The action for starting and stopping realtime animation playback.

QAction* Frapper::SceneModel::m_nextFrameAction
private

The action for selecting the next frame in the animation.

QAction* Frapper::SceneModel::m_nextKeyAction
private

The action for jumping to the next key of the selected channel.

QAction* Frapper::SceneModel::m_outFrameAction
private

The action for jumping to the out frame of the animation.

QAction* Frapper::SceneModel::m_separatorAction
private

The action representing a separator for separating the playback options.

QAction* Frapper::SceneModel::m_playOptionsAction
private

The action for grouping playback options.

QAction* Frapper::SceneModel::m_playLoopingAction
private

The action representing the play looping option.

QAction* Frapper::SceneModel::m_playOnceAction
private

The action representing the play once option.


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