Class TTriangleOctree
Unit
CastleTriangleOctree
Declaration
type TTriangleOctree = class(TBaseTrianglesOctree)
Description
Octree based on triangles. Allows for fast collision-detection with a set of triangles. Each triangle is a TTriangle structure, that keeps triangle geometry in 3D space, and links to parent VRML Shapes and such.
Hierarchy
Overview
Fields
Methods
Description
Fields
 |
Triangles: TTriangleList; |
All our triangles.
By keeping a list of triangles here, and only keeping indexes to this table in leafs (in ItemsIndices) we conserve a lot of memory. This also allows to use mailboxes and fast TriangleToIgnore (because every triangle has a unique index, and a pointer too, shared even if this triangle is placed in multiple leaves).
|
 |
DirectCollisionTestsCounter: TCollisionCount; |
Direct collisions counter, to test octree efficiency.
It is incremented each time XxxCollision make a direct collision test, that is when some single triangle is tested for collision with a sphere, line segment and such. The very idea of octree is to minimize this number.
0 by default.
|
Methods
 |
constructor Create(const ARootBox: TBox3D); overload; |
|
 |
destructor Destroy; override; |
|
 |
function TrianglesCount: Cardinal; override; |
|
Generated by PasDoc 0.12.1 on 2013-02-04 20:26:52
|