Record TTransformation

Hierarchy
Properties

Unit

Declaration

type TTransformation = record

Description

Describe transformation in a way comfortable to apply it in both ways.

Overview

Fields

Public Transform: TMatrix4;
Public InverseTransform: TMatrix4;
Public Scale: Single;

Methods

Public procedure Init;
Public procedure Multiply( const Center: TVector3; const Rotation: TVector4; const ScaleVector: TVector3; const ScaleOrientation: TVector4; const Translation: TVector3); overload;
Public procedure Multiply( const Rotation: TVector4; const ScaleVector: TVector3; const Translation: TVector3); overload;
Public procedure Translate(const Translation: TVector3);

Description

Fields

Public Transform: TMatrix4;

Transformation from local to outside coordinate space.

Public InverseTransform: TMatrix4;

Inverted Transform matrix.

Note that any scale with zero component along the way will make this partially invalid (we'll substitute identity in place of inverted scaling matrix). This is unavoidable, there's no reverse matrix for scaling with zero factor, since one resulting point may correpond to infinitely many source points (i.e., it's natural that such scaling function cannot be reversed).

Public Scale: Single;

A uniform scale of the matrix Transform. If the matrix causes non-uniform scaling, this value represents an average scale.

Methods

Public procedure Init;

Make no transformation (identity matrix, scale 1).

Public procedure Multiply( const Center: TVector3; const Rotation: TVector4; const ScaleVector: TVector3; const ScaleOrientation: TVector4; const Translation: TVector3); overload;

Modify transformation by an additional translation, rotation, scaling.

Multiplies at the same time transformation matrix in Transform, and it's inverse in InverseTransform. The precise meaning of Center, Translation and other parameters follows exactly the X3D Transform node definition (see http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/group.html#Transform ).

Parameters
Rotation
Rotation is expressed as a 4D vector, in which the first 3 components specify the rotation axis (does not need to be normalized, but must be non-zero), and the last component is the rotation angle in radians.
Public procedure Multiply( const Rotation: TVector4; const ScaleVector: TVector3; const Translation: TVector3); overload;
 
Public procedure Translate(const Translation: TVector3);

Modify transformation by an additional translation.


Generated by PasDoc 0.15.0.