Castle Game EngineIntroduction Units Class Hierarchy Classes, Interfaces, Objects and Records Types Variables Constants Functions and Procedures Identifiers
|
Unit CastleTransform
Description
Group and transform 3D scenes (TCastleTransform).
Uses
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Description
Functions and Procedures
procedure TransformMatricesMult(var Transform, InverseTransform: TMatrix4; const Center: TVector3; const Rotation: TVector4; const Scale: TVector3; const ScaleOrientation: TVector4; const Translation: TVector3); |
Apply transformation to a matrix. Calculates at the same time transformation matrix, and it's inverse, and multiplies given Transform, InverseTransform appropriately. The precise meaning of Center, Translation and such 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.
|
Types
TRenderFromViewFunction = procedure of object; |
|
TRemoveType = (...); |
Values
-
rtNone
-
rtRemove
-
rtRemoveAndFree
|
TOrientationType = (...); |
Orientation of the model is 3D world, determining where is the conceptual "up" direction of the model, and where is it facing. Used by the TCastleTransform.Orientation and TCastleTransform.DefaultOrientation.
Values
-
otUpYDirectionMinusZ: Orientation sensible for models oriented around Y axis. That is when gravity pulls in -Y and GravityUp vector is +Y. Transformation makes -Z and +Y match (respectively) Direction and Up.
This matches default direction/up of OpenGL and VRML/X3D cameras.
For example, using this value for TCastleTransform.Orientation (or even TCastleTransform.DefaultOrientation) is sensible if you use default Blender X3D exporter, and you let the exporter to make a transformation (to make +Z up into +Y up). This is the default setting. Then you can follow the standard Blender view names ("front", "top" and such) when modelling, and Blender tools like "X-axis mirror" will work best.
-
otUpZDirectionMinusY: Orientation sensible for models oriented around Z axis. Transformation makes -Y and +Z match (respectively) Direction and Up.
Using this value for TCastleTransform.Orientation (or even TCastleTransform.DefaultOrientation) is sensible if you export your models from Blender without transforming them during export. Note that this is not the default Blender X3D exporter behavior. But you can configure the exporter to work like this (not transform), and then you can follow the standard Blender view names ("front", "top" and such) when modelling.
-
otUpZDirectionX:
Warning: this symbol is deprecated. Up in +Z (like otUpZDirectionMinusY) and direction in +X. Should not be used in new models.
|
Generated by PasDoc 0.15.0.
|