| Description | Hierarchy | Fields | Methods | Properties |
type TFB_CollisionTree = class(TObject)
Particle collision tree
![]() |
constructor Create; |
![]() |
destructor Destroy; override; |
![]() |
procedure SetTreeMatrix(ARef: Pointer); |
![]() |
procedure SetOffsetMatrix(ARef: Pointer); |
![]() |
procedure SetMaterial(AMaterial: TFB_Material); |
![]() |
procedure AddHeightmap(AWidth, AHeight, ADepth: Single; ARows, ACols: Integer; ADataForm: Cardinal; AHeightData: PSingle; ACallback: TFB_MaterialSetCallback = nil); |
![]() |
procedure AddSphere(ARadius: Single); |
![]() |
procedure AddCube(AWidth, AHeight, ADepth: Single); |
![]() |
procedure AddCone(ABaseRadius, ATopRadius, AHeight: Single; ATopCap: Boolean = True; ABaseCap: Boolean = True); |
![]() |
procedure AddCustomPrimitive(APrimitive: TFB_CollisionPrimitive); |
![]() |
procedure FaceBegin(AMode: Cardinal); |
![]() |
procedure FaceVertex(x, y, z: Single); overload; |
![]() |
procedure FaceVertex(ARef: PSingle); overload; |
![]() |
procedure FaceEnd; |
![]() |
procedure Compile; |
![]() |
procedure DrawBoundingBoxes(); |
![]() |
property BoundOffset: Single read FBoundOffset write FBoundOffset; |
![]() |
property FullDetection: Boolean read FFullDetection write FFullDetection; |
![]() |
constructor Create; |
|
Class constructor | |
![]() |
destructor Destroy; override; |
|
Class destructor | |
![]() |
procedure SetTreeMatrix(ARef: Pointer); |
|
Global tree translation matrix, OpenGL format. Parameters
| |
![]() |
procedure SetMaterial(AMaterial: TFB_Material); |
|
Sets the material to use for following primitives. If AMaterial is 'nil', the default material 'fb_collision_mat_default' with Friction=0 will be used. | |
![]() |
procedure AddHeightmap(AWidth, AHeight, ADepth: Single; ARows, ACols: Integer; ADataForm: Cardinal; AHeightData: PSingle; ACallback: TFB_MaterialSetCallback = nil); |
|
Adds a heightmap to the collision tree. Parameters
See also | |
![]() |
procedure AddSphere(ARadius: Single); |
|
Adds a sphere to the collision tree. | |
![]() |
procedure AddCustomPrimitive(APrimitive: TFB_CollisionPrimitive); |
|
Adds a custom descendant of TFB_CollisionPrimitive to the tree. Note that setting an offset matrix with TFB_CollisionTree.SetOffsetMatrix has no effect here. The matrix must be set manually. | |
![]() |
procedure FaceBegin(AMode: Cardinal); |
|
Inits vertex recording for adding faces to the tree. Parameters
See also | |
![]() |
procedure FaceVertex(x, y, z: Single); overload; |
|
Adds and interpretates a face vertex on positiom x|y|z | |
![]() |
procedure FaceEnd; |
|
Resets the interpretation values. | |
![]() |
procedure Compile; |
|
Compiles the collision tree. Without this, the tree will not have an effect. It's possible to later add elements and recompile it. | |
![]() |
procedure DrawBoundingBoxes(); |
|
Draws the bounding boxes of all primitives | |
![]() |
property FullDetection: Boolean read FFullDetection write FFullDetection; |
|
If true, then a detected collision will not stop further collision detection. False by default. | |