PhotoGENius V1.0.0
A basic library for generating photorealistic images, developed for the course Numerical techniques for photorealistic image generation.
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PGENLib.Transformation Struct Reference

An affine transformation. This class encodes an affine transformation. It has been designed with the aim of making the calculation of the inverse transformation particularly efficient. More...

Public Member Functions

 Transformation ()
 Constructor, without any parameter.
 
 Transformation (float a, float b, float c, float d, float e, float f, float g, float h, float i, float l, float s, float n, float o, float p, float q, float r)
 
 Transformation (Matrix4x4 a, Matrix4x4 inva)
 
 Transformation (Matrix4x4 a)
 
bool IsConsistent ()
 Check the internal consistency of the transformation.
 
Transformation Inverse ()
 Returns a struct Transformation object representing the inverse affine transformation.
 

Static Public Member Functions

static bool are_close (Matrix4x4 a, Matrix4x4 b)
 Check wheather two matrices are equals. More...
 
static bool are_close (Transformation a, Transformation b)
 Check whether two Transformations are equals. More...
 
static Transformation operator* (Transformation a, Transformation b)
 Product Transformation-Transformation, returns a Transformation.dot More...
 
static Point operator* (Transformation a, Point p)
 Product Transformation-Point, returns a Point. More...
 
static Vec operator* (Transformation a, Vec v)
 Product Transformation-Vec, returns a Vec. More...
 
static Normal operator* (Transformation a, Normal n)
 Product Transformation-Normal, returns a Normal. More...
 
static Transformation Translation (Vec v)
 Returns a Transformation object, encoding a rigid translation. More...
 
static Transformation RotationX (float ang)
 Return a Transformation object, encoding a rotation around the X axis. The parameter ang specifies the rotation angle (in degrees). The positive sign is given by the right-hand rule.
 
static Transformation RotationY (float ang)
 Return a Transformation object, encoding a rotation around the Y axis. The parameter ang specifies the rotation angle (in degrees). The positive sign is given by the right-hand rule.
 
static Transformation RotationZ (float ang)
 Return a Transformation object, encoding a rotation around the Z axis. The parameter ang specifies the rotation angle (in degrees). The positive sign is given by the right-hand rule.
 
static Transformation Scaling (Vec v)
 Returns a Transformation object, encoding a scaling.
 

Public Attributes

Matrix4x4 m
 
Matrix4x4 invm
 

Detailed Description

An affine transformation. This class encodes an affine transformation. It has been designed with the aim of making the calculation of the inverse transformation particularly efficient.

Member Function Documentation

◆ are_close() [1/2]

static bool PGENLib.Transformation.are_close ( Matrix4x4  a,
Matrix4x4  b 
)
static

Check wheather two matrices are equals.

Parameters
a
b
Returns

◆ are_close() [2/2]

static bool PGENLib.Transformation.are_close ( Transformation  a,
Transformation  b 
)
static

Check whether two Transformations are equals.

Parameters
a
b
Returns

◆ operator*() [1/4]

static Normal PGENLib.Transformation.operator* ( Transformation  a,
Normal  n 
)
static

Product Transformation-Normal, returns a Normal.

Parameters
a
n
Returns
a normal

◆ operator*() [2/4]

static Point PGENLib.Transformation.operator* ( Transformation  a,
Point  p 
)
static

Product Transformation-Point, returns a Point.

Parameters
a
p
Returns
a point

◆ operator*() [3/4]

static Transformation PGENLib.Transformation.operator* ( Transformation  a,
Transformation  b 
)
static

Product Transformation-Transformation, returns a Transformation.dot

Parameters
a
b
Returns

◆ operator*() [4/4]

static Vec PGENLib.Transformation.operator* ( Transformation  a,
Vec  v 
)
static

Product Transformation-Vec, returns a Vec.

Parameters
a
v
Returns
a vector

◆ Translation()

static Transformation PGENLib.Transformation.Translation ( Vec  v)
static

Returns a Transformation object, encoding a rigid translation.

Parameters
v
Returns

The documentation for this struct was generated from the following file: