Class TCastleAbstractPrimitive
Unit
CastleScene
Declaration
type TCastleAbstractPrimitive = class(TCastleTransform)
Description
Base class to express primitives that can be easily added and adjusted inside TCastleViewport.
Such primitives can be anything visible that can be expressed using X3D nodes (like boxes or spheres). Particular descendants of this class, like TCastleBox or TCastleSphere, define a particular primitive. Note: for things not directly visible (like lights) descending from this class is not useful. Instead descend from TCastleTransform.
Using this class is somewhat similar to using TCastleScene, and loading (using TCastleSceneCore.Load) an X3D nodes graph with appropriate primitives. In fact, that is exactly what happens internally. But using this class is simpler (it hides X3D nodes from you, although it also hides some possibilities) and you can customize such primitives using the CGE editor.
Hierarchy
Overview
Methods
Properties
Description
Methods
|
constructor Create(AOwner: TComponent); override; |
This item has no description. |
|
destructor Destroy; override; |
This item has no description. |
|
function HasColliderMesh: Boolean; override; |
This item has no description. Showing description inherited from TCastleTransform.HasColliderMesh.
Does this transform have a collision mesh that TCastleMeshCollider can use. Default implementation returns False .
|
Properties
|
property ShapeNode: TShapeNode read FShapeNode; |
Descendants should add primitive X3D geometry node here.
|
|
property Color: TCastleColor read FColor write SetColor; |
Color of the text. Opaque white by default.
What exactly it means, depends on Material:
|
|
property Material: TPrimitiveMaterial read FMaterial write SetMaterial default pmPhysical; |
Material type (which determines lighting calculation) for this primitive.
|
|
property TextureNormalMap: String read FTextureNormalMap write SetTextureNormalMap; |
Normal map texture URL. Providing normal enhances the details visible on the surface because of lighting. The normalmap texture mapping is the same as Texture mapping.
|
|
property PreciseCollisions: Boolean read FPreciseCollisions write SetPreciseCollisions default false; |
Resolve collisions precisely with the primitive geometry. When this is False we will only consider the primitive bounding box for collisions, so e.g. player will not be able to move within sphere's box corners.
|
|
property ColorPersistent: TCastleColorPersistent read FColorPersistent ; |
Color that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Color directly.
See also
- Color
- Color of the text.
|
Generated by PasDoc 0.16.0-snapshot.