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
Public Member Functions | Private Attributes | Friends | List of all members
Scene::Node Class Reference

Public Member Functions

 Node (Scene *scene, mat4 const &local)
 
mat4 transformationByTime (uint const animation, float const time)
 
void updateInstance (SceneInstance &instance, float time, mat4 const &parentTransformation)
 

Private Attributes

Scenem_scene
 
vector< unique_ptr< Node > > m_children
 
vector< Mesh * > m_meshes
 
mat4 m_local
 
int m_idx
 
bool m_isBone
 
map< uint, NodeAnimationm_animations
 

Friends

class Scene
 

Detailed Description

Scene::Node hosts a node in the local scene-graph.

Definition at line 268 of file Scene.hpp.

Constructor & Destructor Documentation

Node ( Scene scene,
mat4 const &  local 
)

Constructs a Scene::Node

Parameters
sceneThe scene this node belongs to
localThe local transoformation of this node

Definition at line 769 of file Scene.cpp.

Member Function Documentation

mat4 transformationByTime ( uint const  animation,
float const  time 
)

Returns the transformation for this node if it had a certain animation at a certain time-stamp.

Parameters
animationThe animation-id
timeThe time-stamp
Returns
The tranformation

Definition at line 792 of file Scene.cpp.

void updateInstance ( SceneInstance instance,
float  time,
mat4 const &  parentTransformation 
)

Updates the model-matrices/bone-matrices hosted by this node for a certain SceneInstance.

Parameters
instanceThe SceneInstance which should be updated
timeThe time-stamp
parentTransformationThe parent-transformation which should be used.

Definition at line 775 of file Scene.cpp.

Friends And Related Function Documentation

friend class Scene
friend

Definition at line 278 of file Scene.hpp.

Member Data Documentation

map<uint, NodeAnimation> m_animations
private

All animation for this node by their animation-id

Definition at line 276 of file Scene.hpp.

vector<unique_ptr<Node> > m_children
private

All children of this node

Definition at line 271 of file Scene.hpp.

int m_idx
private

The node-index

Definition at line 274 of file Scene.hpp.

bool m_isBone
private

Wheter this node is a bone or not

Definition at line 275 of file Scene.hpp.

mat4 m_local
private

The local transformation of this node

Definition at line 273 of file Scene.hpp.

vector<Mesh*> m_meshes
private

All meshes at this node

Definition at line 272 of file Scene.hpp.

Scene* m_scene
private

The scene this node belongs to

Definition at line 270 of file Scene.hpp.


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