TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
Node Class Referencefinal

Model node. More...

#include <tdme/engine/model/Node.h>

Collaboration diagram for Node:
Collaboration graph

Public Member Functions

 Node (Model *model, Node *parentNode, const string &id, const string &name)
 Public constructor. More...
 
 ~Node ()
 Destructor. More...
 
ModelgetModel ()
 
NodegetParentNode ()
 
const string & getId ()
 Returns id. More...
 
const string & getName ()
 
bool isEmpty () const
 
bool isJoint () const
 
void setJoint (bool isJoint)
 Sets up if this node is a joint or not. More...
 
const Matrix4x4getTransformationsMatrix () const
 
void setTransformationsMatrix (const Matrix4x4 &transformationsMatrix)
 
bool hasUpdate ()
 
bool hasVerticesUpdate ()
 
const vector< Vector3 > & getVertices () const
 
void setVertices (const vector< Vector3 > &vertices)
 Set vertices. More...
 
bool hasNormalsUpdate ()
 
const vector< Vector3 > & getNormals () const
 
void setNormals (const vector< Vector3 > &normals)
 Set normals. More...
 
const vector< TextureCoordinate > & getTextureCoordinates () const
 
void setTextureCoordinates (const vector< TextureCoordinate > &textureCoordinates)
 Set texture coordinates. More...
 
const vector< Vector3 > & getTangents () const
 
void setTangents (const vector< Vector3 > &tangents)
 Set tangents. More...
 
const vector< Vector3 > & getBitangents () const
 
void setBitangents (const vector< Vector3 > &bitangents)
 Set bitangents. More...
 
AnimationgetAnimation ()
 
void setAnimation (Animation *animation)
 Sets animation object. More...
 
SkinninggetSkinning ()
 
void setSkinning (Skinning *skinning)
 Sets skinning object. More...
 
int32_t getFaceCount () const
 
const vector< FacesEntity > & getFacesEntities () const
 
FacesEntitygetFacesEntity (const string &id)
 Find faces entity by id. More...
 
void setFacesEntities (const vector< FacesEntity > &facesEntities)
 Set up faces entities. More...
 
const vector< Vector3 > & getOrigins () const
 
void setOrigins (const vector< Vector3 > &origins)
 Set origins. More...
 
map< string, Node * > & getSubNodes ()
 
NodegetSubNodeById (const string &nodeId)
 Returns a sub node by id. More...
 

Private Attributes

Modelmodel
 
NodeparentNode
 
string id
 
string name
 
bool joint
 
Matrix4x4 transformationsMatrix
 
vector< Vector3vertices
 
vector< Vector3normals
 
vector< TextureCoordinatetextureCoordinates
 
vector< Vector3tangents
 
vector< Vector3bitangents
 
Animationanimation
 
Skinningskinning
 
vector< FacesEntityfacesEntities
 
vector< Vector3origins
 
map< string, Node * > subNodes
 
bool verticesUpdated
 
bool normalsUpdated
 

Detailed Description

Model node.

Author
andreas.drewke
Version
$Id$

Definition at line 30 of file Node.h.

Constructor & Destructor Documentation

◆ Node()

Node ( Model model,
Node parentNode,
const string &  id,
const string &  name 
)

Public constructor.

Parameters
modelmodel
parentNodeparent node
idid
namename

Definition at line 31 of file Node.cpp.

◆ ~Node()

~Node ( )

Destructor.

Definition at line 45 of file Node.cpp.

Member Function Documentation

◆ getAnimation()

Animation * getAnimation ( )
inline
Returns
animation

Definition at line 225 of file Node.h.

◆ getBitangents()

const vector< Vector3 > & getBitangents ( ) const
inline
Returns
bitangents

Definition at line 212 of file Node.h.

◆ getFaceCount()

int32_t getFaceCount ( ) const
Returns
number of faces in node

Definition at line 109 of file Node.cpp.

◆ getFacesEntities()

const vector< FacesEntity > & getFacesEntities ( ) const
inline
Returns
faces entities

Definition at line 256 of file Node.h.

◆ getFacesEntity()

FacesEntity * getFacesEntity ( const string &  id)

Find faces entity by id.

Parameters
idid
Returns
faces entity

Definition at line 118 of file Node.cpp.

◆ getId()

const string & getId ( )
inline

Returns id.

Returns
id

Definition at line 85 of file Node.h.

◆ getModel()

Model * getModel ( )
inline
Returns
model

Definition at line 70 of file Node.h.

◆ getName()

const string & getName ( )
inline
Returns
node's name

Definition at line 92 of file Node.h.

◆ getNormals()

const vector< Vector3 > & getNormals ( ) const
inline
Returns
normals

Definition at line 173 of file Node.h.

◆ getOrigins()

const vector< Vector3 > & getOrigins ( ) const
inline
Returns
origins

Definition at line 276 of file Node.h.

◆ getParentNode()

Node * getParentNode ( )
inline
Returns
parent node

Definition at line 77 of file Node.h.

◆ getSkinning()

Skinning * getSkinning ( )
inline
Returns
skinning or null

Definition at line 238 of file Node.h.

◆ getSubNodeById()

Node * getSubNodeById ( const string &  nodeId)

Returns a sub node by id.

Parameters
nodeIdnodeId
Returns
sub node or null

Definition at line 142 of file Node.cpp.

◆ getSubNodes()

map< string, Node * > & getSubNodes ( )
inline
Returns
sub sub nodes of this node

Definition at line 289 of file Node.h.

◆ getTangents()

const vector< Vector3 > & getTangents ( ) const
inline
Returns
tangents

Definition at line 199 of file Node.h.

◆ getTextureCoordinates()

const vector< TextureCoordinate > & getTextureCoordinates ( ) const
inline
Returns
texture coordinates or null (optional)

Definition at line 186 of file Node.h.

◆ getTransformationsMatrix()

const Matrix4x4 & getTransformationsMatrix ( ) const
inline
Returns
transformations matrix related to parent node

Definition at line 121 of file Node.h.

◆ getVertices()

const vector< Vector3 > & getVertices ( ) const
inline
Returns
vertices

Definition at line 151 of file Node.h.

◆ hasNormalsUpdate()

bool hasNormalsUpdate ( )
inline
Returns
if normals have been updated

Definition at line 164 of file Node.h.

◆ hasUpdate()

bool hasUpdate ( )
inline
Returns
if vertices or normals have been changed

Definition at line 135 of file Node.h.

◆ hasVerticesUpdate()

bool hasVerticesUpdate ( )
inline
Returns
if vertices have been updated

Definition at line 142 of file Node.h.

◆ isEmpty()

bool isEmpty ( ) const
inline
Returns
if this node is empty

Definition at line 99 of file Node.h.

◆ isJoint()

bool isJoint ( ) const
inline
Returns
if this node is a joint/bone

Definition at line 106 of file Node.h.

◆ setAnimation()

void setAnimation ( Animation animation)

Sets animation object.

Parameters
animationanimation

Definition at line 97 of file Node.cpp.

◆ setBitangents()

void setBitangents ( const vector< Vector3 > &  bitangents)

Set bitangents.

Parameters
bitangentsbitangents

Definition at line 88 of file Node.cpp.

◆ setFacesEntities()

void setFacesEntities ( const vector< FacesEntity > &  facesEntities)

Set up faces entities.

Parameters
facesEntitiesfaces entity

Definition at line 125 of file Node.cpp.

◆ setJoint()

void setJoint ( bool  isJoint)
inline

Sets up if this node is a joint or not.

Parameters
isJointisbone

Definition at line 114 of file Node.h.

◆ setNormals()

void setNormals ( const vector< Vector3 > &  normals)

Set normals.

Parameters
normalsnormals

Definition at line 60 of file Node.cpp.

◆ setOrigins()

void setOrigins ( const vector< Vector3 > &  origins)

Set origins.

Parameters
originsrender node object origins

Definition at line 134 of file Node.cpp.

◆ setSkinning()

void setSkinning ( Skinning skinning)

Sets skinning object.

Parameters
skinningskinning

Definition at line 102 of file Node.cpp.

◆ setTangents()

void setTangents ( const vector< Vector3 > &  tangents)

Set tangents.

Parameters
tangentstangents

Definition at line 79 of file Node.cpp.

◆ setTextureCoordinates()

void setTextureCoordinates ( const vector< TextureCoordinate > &  textureCoordinates)

Set texture coordinates.

Parameters
textureCoordinatestexture coordinates

Definition at line 70 of file Node.cpp.

◆ setTransformationsMatrix()

void setTransformationsMatrix ( const Matrix4x4 transformationsMatrix)
inline
Returns
transformations matrix related to parent node

Definition at line 128 of file Node.h.

◆ setVertices()

void setVertices ( const vector< Vector3 > &  vertices)

Set vertices.

Parameters
verticesvertices

Definition at line 50 of file Node.cpp.

Member Data Documentation

◆ animation

Animation* animation
private

Definition at line 44 of file Node.h.

◆ bitangents

vector<Vector3> bitangents
private

Definition at line 43 of file Node.h.

◆ facesEntities

vector<FacesEntity> facesEntities
private

Definition at line 46 of file Node.h.

◆ id

string id
private

Definition at line 35 of file Node.h.

◆ joint

bool joint
private

Definition at line 37 of file Node.h.

◆ model

Model* model
private

Definition at line 33 of file Node.h.

◆ name

string name
private

Definition at line 36 of file Node.h.

◆ normals

vector<Vector3> normals
private

Definition at line 40 of file Node.h.

◆ normalsUpdated

bool normalsUpdated
private

Definition at line 51 of file Node.h.

◆ origins

vector<Vector3> origins
private

Definition at line 47 of file Node.h.

◆ parentNode

Node* parentNode
private

Definition at line 34 of file Node.h.

◆ skinning

Skinning* skinning
private

Definition at line 45 of file Node.h.

◆ subNodes

map<string, Node*> subNodes
private

Definition at line 48 of file Node.h.

◆ tangents

vector<Vector3> tangents
private

Definition at line 42 of file Node.h.

◆ textureCoordinates

vector<TextureCoordinate> textureCoordinates
private

Definition at line 41 of file Node.h.

◆ transformationsMatrix

Matrix4x4 transformationsMatrix
private

Definition at line 38 of file Node.h.

◆ vertices

vector<Vector3> vertices
private

Definition at line 39 of file Node.h.

◆ verticesUpdated

bool verticesUpdated
private

Definition at line 50 of file Node.h.


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