Class TCastleTransform

Unit

Declaration

type TCastleTransform = class(TCastleComponent)

Description

Group and transform (move, rotate, scale) children objects.

Add and remove children using the Add, Remove and similar methods. A child can be any TCastleTransform instance, in particular it can be a TCastleScene instance (which allows to load and render any 3D or 2D model).

Control the transformation using these properties:

  1. Move using Translation.

  2. Rotate using Rotation. The rotation is performed around the Center point. The rotation may be alternatively controlled using the Direction and Up vectors.

  3. Change size using Scale. Scale is done around Center and with orientation given by ScaleOrientation.

This class is the base object that is managed by the TCastleViewport. You insert instances of this class into TCastleViewport.Items, which is actually an instance of TCastleTransform too.

This class implements also optional gravity and physics. See the Gravity property for a simple unrealistic gravity model. See the RigidBody for a proper rigid-bidy simulation, with correct gravity model and collisions with other rigid bodies.

Source: transform/castletransform_transform.inc (line 51).

Hierarchy


Generated by PasDoc 0.17.0.snapshot.