Number5
Visualisierung 2 Project - Florian Schober (0828151, f.schober@live.com), Andreas Walch (0926780, walch.andreas89@gmail.com)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Protected Attributes | Private Attributes | Friends | List of all members
SceneInstance Class Reference

#include <Scene.hpp>

Inheritance diagram for SceneInstance:
ISceneObject

Classes

struct  AnimationStart
 

Public Member Functions

TransformationgetTransform ()
 
 SceneInstance (Application *app, Scene *parent, bool pickable=true)
 
virtual ~SceneInstance ()
 
virtual bool update (double time, double timeDelta)
 
void queueAnimation (float time, uint animation)
 
void queueAnimation (float time, string animation)
 
id_t const & getId () const
 
id_t const getPickId () const
 

Protected Attributes

Applicationm_app
 
id_t m_id
 
bool m_pickable
 

Private Attributes

Scenem_scene
 
Transformation m_transformation
 
vector< mat4 > m_state
 
AnimationStart m_animation
 
queue< AnimationStartm_animationQueue
 

Friends

class Scene
 

Detailed Description

SceneInstance holds information for one instance of a Scene-object.

Definition at line 11 of file Scene.hpp.

Constructor & Destructor Documentation

SceneInstance ( Application app,
Scene parent,
bool  pickable = true 
)

Creates a SceneInstance

Parameters
appThe global application
parentThe scene of which this object is an instance
pickableIf pickable is true this object will be drawn into the id-buffer to make it visible to the picker

Definition at line 3 of file Scene.cpp.

~SceneInstance ( )
virtual

Destructs a SceneInstance and unregisters it at its Scene.

Definition at line 10 of file Scene.cpp.

Member Function Documentation

id_t const& getId ( ) const
inlineinherited

Accessor to the objects id.

Returns
The objects id.

Definition at line 23 of file ISceneObject.hpp.

id_t const getPickId ( ) const
inlineinherited

Accessor to the picking-id. This is 0 for non-pickable obejcts, and the objects id for every other object.

Returns
The picking-id.

Definition at line 28 of file ISceneObject.hpp.

Transformation& getTransform ( )
inline

Accessor for instances transformation

Returns
a reference of the instances transformation

Definition at line 45 of file Scene.hpp.

void queueAnimation ( float  time,
uint  animation 
)

Queues an animation

Parameters
timeThe time to start at
animationThe animation to queue

Definition at line 32 of file Scene.cpp.

void queueAnimation ( float  time,
string  animation 
)

Queues an animation

Parameters
timeThe time to start at
animationThe name of the animation to queue

Definition at line 36 of file Scene.cpp.

bool update ( double  time,
double  timeDelta 
)
virtual

Updates animation-information.

Parameters
timeThe absolute frame time
timeDeltaThe time since the last frame
Returns
Wheter or not the object has changed since the last frame

Reimplemented from ISceneObject.

Definition at line 14 of file Scene.cpp.

Friends And Related Function Documentation

friend class Scene
friend

Definition at line 38 of file Scene.hpp.

Member Data Documentation

AnimationStart m_animation
private

The curren animation-info

Definition at line 35 of file Scene.hpp.

queue<AnimationStart> m_animationQueue
private

All queued animations

Definition at line 36 of file Scene.hpp.

Application* m_app
protectedinherited

The global application

Definition at line 14 of file ISceneObject.hpp.

id_t m_id
protectedinherited

The id of this object

Definition at line 15 of file ISceneObject.hpp.

bool m_pickable
protectedinherited

Wheter the object is packable or not

Definition at line 16 of file ISceneObject.hpp.

Scene* m_scene
private

The scene of which this object is an instance

Definition at line 32 of file Scene.hpp.

vector<mat4> m_state
private

The state of this instance (all model-/bone-matrices)

Definition at line 34 of file Scene.hpp.

Transformation m_transformation
private

The transformation of this instance

Definition at line 33 of file Scene.hpp.


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