3D City v-1.0
Computer Graphics Project
node Struct Reference

anything that can be transformed( has modelmatrix ) More...

#include <node.h>

Inheritance diagram for node:
pointLight

Public Member Functions

void delpos (const vec3 &delta)
 
void setpos (const vec3 &position)
 
void setScale (const vec3 &scale)
 
void setRotation (float angle, const vec3 &axis)
 
const mat4f & refreshModel ()
 
void draw (engine &graphicsEngine, mat4f matModel_in=mat4f())
 

Public Attributes

std::unordered_map< std::string, node * > children
 
std::vector< drawable< Vertex > * > meshes
 
mat4f matModel = mat4f()
 

Private Attributes

mat4f scaling = mat4f()
 
mat4f translation = mat4f()
 
mat4f rotation = mat4f()
 

Detailed Description

anything that can be transformed( has modelmatrix )

Definition at line 14 of file node.h.

Member Function Documentation

◆ delpos()

void node::delpos ( const vec3 &  delta)

Definition at line 6 of file node.cpp.

◆ draw()

void node::draw ( engine &  graphicsEngine,
mat4f  matModel_in = mat4f() 
)

Definition at line 39 of file node.cpp.

◆ refreshModel()

const mat4f & node::refreshModel ( )

Definition at line 26 of file node.cpp.

◆ setpos()

void node::setpos ( const vec3 &  position)

Definition at line 11 of file node.cpp.

◆ setRotation()

void node::setRotation ( float  angle,
const vec3 &  axis 
)

Definition at line 21 of file node.cpp.

◆ setScale()

void node::setScale ( const vec3 &  scale)

Definition at line 16 of file node.cpp.

Member Data Documentation

◆ children

std::unordered_map<std::string, node *> node::children

Definition at line 15 of file node.h.

◆ matModel

mat4f node::matModel = mat4f()

Definition at line 17 of file node.h.

◆ meshes

std::vector<drawable<Vertex> *> node::meshes

Definition at line 16 of file node.h.

◆ rotation

mat4f node::rotation = mat4f()
private

Definition at line 34 of file node.h.

◆ scaling

mat4f node::scaling = mat4f()
private

Definition at line 32 of file node.h.

◆ translation

mat4f node::translation = mat4f()
private

Definition at line 33 of file node.h.