Unit CastleTransform

Description

Group and transform scenes (TCastleTransform).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Class ECannotAddToAnotherWorld  
Class ETransformParentUndefined  
Class EMultipleReferencesInWorld  
Class ENotAddedToWorld  
Class EPhysicsError  
Class TBaseShadowVolumeRenderer Shadow volumes helper, not depending on OpenGL.
Object TRayCollisionNode Information about ray collision with a single 3D object.
Class TRayCollision Represents a ray collision with a 3D objects tree.
Object TCollisionDetailsItem Detailed information about collision with a single 3D object.
Class TCollisionDetails Represents a collision with a 3D objects tree.
Record TPhysicsCollisionDetails  
Record TRenderStatistics Statistics about what was rendered during last frame.
Class TPrepareParams Information that a TCastleTransform object needs to prepare rendering.
Class TCastleTransformList List of TCastleTransform instances.
Class TCastleTransform Group and transform (move, rotate, scale) children objects.
Class TCastleAbstractRootTransform Root of transformations and scenes (tree of TCastleTransform and TCastleScene).
Class TPhysicsProperties Configure physics simulation calculation.
Class TCollider Shape used for collision detection of a rigid body TRigidBody.
Class TPlaneCollider Collide as an infinite plane.
Class TBoxCollider Collide as a box.
Class TSphereCollider Collide as a sphere.
Class TRigidBody Rigid body properties for the physics engine, see TCastleTransform.RigidBody.

Functions and Procedures

procedure TransformMatricesMult(var Transform, InverseTransform: TMatrix4; const Center: TVector3; const Rotation: TVector4; const Scale: TVector3; const ScaleOrientation: TVector4; const Translation: TVector3);

Types

TCastleTransformClass = class of TCastleTransform;
TRenderFromViewFunction = procedure (const RenderingCamera: TRenderingCamera) of object;
TVisibleChange = (...);
TVisibleChanges = set of TVisibleChange;
TVisibleChangeEvent = procedure (const Sender: TCastleTransform; const Changes: TVisibleChanges) of object;
TPrepareResourcesOption = (...);
TPrepareResourcesOptions = set of TPrepareResourcesOption;
PRayCollisionNode = ˆTRayCollisionNode;
PCollisionDetailsItem = ˆTCollisionDetailsItem;
TUserRenderingPass = 0..2;
TRemoveType = (...);
TOrientationType = (...);
TSceneManagerWorld = TCastleAbstractRootTransform deprecated 'use TCastleRootTransform';
T3DCoord = 0..2;
T3DCoords = set of T3DCoord;
TOnCollision = procedure (const CollisionDetails: TPhysicsCollisionDetails) of object;
TRigidBodyList = specialize TList<TRigidBody>;

Constants

rfOffScreen = rfRenderedTexture deprecated 'use rfRenderedTexture';

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

TCastleTransformClass = class of TCastleTransform;
 
TRenderFromViewFunction = procedure (const RenderingCamera: TRenderingCamera) of object;
 
TVisibleChange = (...);

Describe what visible thing changed for TCastleTransform.VisibleChangeHere.

Values
  • vcVisibleGeometry: Visible geometry (actual 3D shape) changed. It's not used when only light conditions, materials, textures and such changed.

    In practice, this means that the depth buffer from some point in space changed. Which means that shadow maps should be regenerated.

  • vcVisibleNonGeometry: Something visible, but not the geometry shape, changes. For example, material or texture on a visible surface changed.
TVisibleChanges = set of TVisibleChange;
 
TVisibleChangeEvent = procedure (const Sender: TCastleTransform; const Changes: TVisibleChanges) of object;
 
TPrepareResourcesOption = (...);

Various things that TCastleTransform.PrepareResources may prepare.

Values
  • prRenderSelf: Prepare resources for rendering *this* scene (on which TCastleTransform.PrepareResources is called).
  • prRenderClones: Prepare resources for rendering clones of the scene. E.g. textures, which are shared by clones using the cache.
  • prBackground
  • prBoundingBox
  • prShadowVolume
  • prSpatial: Prepare octrees (determined by things like TCastleSceneCore.Spatial).
  • prScreenEffects
TPrepareResourcesOptions = set of TPrepareResourcesOption;
 
PRayCollisionNode = ˆTRayCollisionNode;
 
PCollisionDetailsItem = ˆTCollisionDetailsItem;
 
TUserRenderingPass = 0..2;

Rendering pass, for user purposes. Useful to keep shaders cached when you render the same scene multiple times in the same frame (under different lighting conditions or other things that change shaders).

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.
TSceneManagerWorld = TCastleAbstractRootTransform deprecated 'use TCastleRootTransform';

Warning: this symbol is deprecated: use TCastleRootTransform

 
T3DCoord = 0..2;
 
T3DCoords = set of T3DCoord;
 
TOnCollision = procedure (const CollisionDetails: TPhysicsCollisionDetails) of object;
 
TRigidBodyList = specialize TList<TRigidBody>;
 

Constants

rfOffScreen = rfRenderedTexture deprecated 'use rfRenderedTexture';

Warning: this symbol is deprecated: use rfRenderedTexture

 

Generated by PasDoc 0.15.0.