Geno3D
A simple 3D visualisation library, using C++/SFML.
 All Classes Functions Variables
Public Member Functions | Private Attributes | List of all members
Geno3D::Transformation Class Reference

#include <Transformation.hpp>

Inheritance diagram for Geno3D::Transformation:
Geno3D::Transformable

Public Member Functions

void translate (float x, float y, float z) override
 
void scale (float m) override
 
void rotate (float x, float y, float z) override
 
void transform (const Transformation &t) override
 
Eigen::Matrix3Xf apply (Eigen::Matrix3Xf m) const
 
float determinant () const
 

Private Attributes

Eigen::Matrix3f tMatrix
 The transformation matrix.
 

Detailed Description

A compound transformation to apply to a Transformable. Chain multiple transformations in order as a single transformation matrix.

Member Function Documentation

Eigen::Matrix3Xf Geno3D::Transformation::apply ( Eigen::Matrix3Xf  m) const

Apply the transformation to a matrix.

Parameters
mthe matrix to apply to.

References tMatrix.

Referenced by Geno3D::SunLight::transform(), Geno3D::Camera::transform(), and Geno3D::Object::transform().

float Geno3D::Transformation::determinant ( ) const

Get the determinant of the transformation matrix.

References tMatrix.

Referenced by Geno3D::Object::transform().

void Geno3D::Transformation::rotate ( float  x,
float  y,
float  z 
)
overridevirtual

Rotate by Euler angles, in radians.

Parameters
xthe angle to rotate by about the x-axis
ythe angle to rotate by about the y-axis
zthe angle to rotate by about the z-axis

Implements Geno3D::Transformable.

References tMatrix.

void Geno3D::Transformation::scale ( float  m)
overridevirtual

Scale by a factor.

Parameters
mthe factor to scale by

Implements Geno3D::Transformable.

References tMatrix.

void Geno3D::Transformation::transform ( const Transformation t)
overridevirtual

Transform by a compound transformation.

Parameters
tthe transformation to apply

Implements Geno3D::Transformable.

References tMatrix.

void Geno3D::Transformation::translate ( float  x,
float  y,
float  z 
)
overridevirtual

Translate the transformation by a 3D vector. This will not translate the object, rather the rows of the transformation matrix will be translated.

Parameters
xthe amount to translate in the x-axis
ythe amount to translate in the y-axis
zthe amount to translate in the z-axis

Implements Geno3D::Transformable.

References tMatrix.


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