hx3d  1
2D/3D Simple Game Framework
Public Member Functions | Public Attributes | List of all members
hx3d::graphics::Transform Class Reference

2D/3D transform. More...

#include <transform.hpp>

Public Member Functions

glm::mat4 compute ()
 Build the model matrix using the position, scale, size and rotation. More...
 
Transform add (const Transform &transform)
 Add a transform to another. More...
 
glm::vec3 realSize ()
 Get the real size (size * scale). More...
 
bool contains (glm::vec2 point)
 Check a point in the transform. More...
 
void show ()
 Show the transform information. (Debug)
 

Public Attributes

glm::vec3 position
 Position.
 
glm::vec3 scale
 Scale.
 
glm::vec3 size
 Size.
 
glm::vec3 rotation
 Rotation.
 

Detailed Description

2D/3D transform.

Definition at line 35 of file transform.hpp.

Member Function Documentation

Transform hx3d::graphics::Transform::add ( const Transform transform)

Add a transform to another.

In use for parent/child transform calculation.

Parameters
transformOther transform
Returns
Current transform

Definition at line 55 of file transform.cpp.

glm::mat4 hx3d::graphics::Transform::compute ( )

Build the model matrix using the position, scale, size and rotation.

Returns
Matrix (mat4)

Definition at line 43 of file transform.cpp.

bool hx3d::graphics::Transform::contains ( glm::vec2  point)

Check a point in the transform.

Parameters
point2D point
Returns
True/False

Definition at line 80 of file transform.cpp.

glm::vec3 hx3d::graphics::Transform::realSize ( )

Get the real size (size * scale).

Returns
Real size

Definition at line 76 of file transform.cpp.


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