| Description | Hierarchy | Fields | Methods | Properties |
type TFB_CollisionPrimitive = class(TObject)
Abstract collision primitive class. Notes for implementing an own primitive:
Implement the TFB_CollisionPrimitive.Intersects function
Implement an offset matrix, if necessary. It would be intelligent to set it within the constructor (in most cases).
Setting the fields TFB_CollisionPrimitive.FMinDimension and TFB_CollisionPrimitive.FMinDimension is absolutely necessary. It would be intelligent to do this in the constructor. Do not forget to allow for the offset matrix.
The intersection point (field FIntersecPoint) must be set at a positive TFB_CollisionPrimitive.Intersects query.
If your primitive consists of several normals and/or materials, set the relevant one for the current impact at a positive TFB_CollisionPrimitive.Intersects query.
![]() |
FMinDimension: TFB_Vectorf3; |
![]() |
FMaxDimension: TFB_Vectorf3; |
![]() |
FMaterial: TFB_Material; |
![]() |
FNormal: TFB_Vectorf3; |
![]() |
FIntersecPoint: TFB_Vectorf3; |
![]() |
function Intersects(APos1, APos2: TFB_Vectorf3): Boolean; virtual; abstract; |
![]() |
property MinDimension: TFB_Vectorf3 read FMinDimension write FMinDimension; |
![]() |
property MaxDimension: TFB_Vectorf3 read FMaxDimension write FMaxDimension; |
![]() |
property Material: TFB_Material read FMaterial write FMaterial; |
![]() |
property Normal: TFB_Vectorf3 read FNormal write FNormal; |
![]() |
property IntersectionPoint: TFB_Vectorf3 read FIntersecPoint write FIntersecPoint; |
![]() |
FMinDimension: TFB_Vectorf3; |
|
Negative boundary point | |
![]() |
FMaxDimension: TFB_Vectorf3; |
|
Positive boundary point | |
![]() |
FMaterial: TFB_Material; |
|
Primitive material | |
![]() |
FNormal: TFB_Vectorf3; |
|
Primitive normal | |
![]() |
FIntersecPoint: TFB_Vectorf3; |
|
Absolute point of the last impact | |
![]() |
function Intersects(APos1, APos2: TFB_Vectorf3): Boolean; virtual; abstract; |
|
Returns true, if the line intersects the primitive. Parameters
| |
![]() |
property MinDimension: TFB_Vectorf3 read FMinDimension write FMinDimension; |
|
Absolute smallest coordinates of the primitive (maybe with an offset) | |
![]() |
property MaxDimension: TFB_Vectorf3 read FMaxDimension write FMaxDimension; |
|
Absolute largest coordinates of the primitive (maybe with an offset) | |
![]() |
property Material: TFB_Material read FMaterial write FMaterial; |
|
Material of the whole object or the at the place of the last positive collision check | |
![]() |
property Normal: TFB_Vectorf3 read FNormal write FNormal; |
|
Normal at the point of the last positive collision check | |
![]() |
property IntersectionPoint: TFB_Vectorf3 read FIntersecPoint write FIntersecPoint; |
|
Point of last intersection | |