Unit X3DTriangles

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Triangles in VRML/X3D models (TTriangle) and octrees that resolve collisions with such triangles (TBaseTrianglesOctree).

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
Object TTriangle Triangle in VRML/X3D model.
Class TBaseTrianglesOctreeNode  
Class TBaseTrianglesOctree Abstract class for octrees that can check and return collisions with TTriangle.
Class TOctreeIgnoreForShadowRaysAndOneItem Simple utility class to easily ignore all transparent, non-shadow-casting triangles, and, additionally, one chosen triangle.

Types

TCollisionCount = Int64;
TMailboxTag = Int64;
PTriangle = ˆTTriangle;
TTriangleList = specialize TGenericStructList<TTriangle>;
TEnumerateTriangleFunc = procedure (const Triangle: PTriangle) of object;

Variables

TriangleCollisionTestsCounter: Cardinal;

Description

Types

TCollisionCount = Int64;
 
TMailboxTag = Int64;
 
PTriangle = ˆTTriangle;
 
TTriangleList = specialize TGenericStructList<TTriangle>;
 
TEnumerateTriangleFunc = procedure (const Triangle: PTriangle) of object;

Callback for TBaseTrianglesOctree.EnumerateTriangles.

Variables

TriangleCollisionTestsCounter: Cardinal;

Counter of collision tests done by TTriangle when the actual collision calculation had to be done. This counts all calls to TTriangle.SegmentDirCollision and TTriangle.RayCollision when the result had to be actually geometrically calculated (result was not in the cache aka "mailbox").

It is especially useful to look at this after using some spatial data structure, like an octree. The goal of tree structures is to minimize this number.

It is a global variable, because that's the most comfortable way to use it. Triangles are usually wrapped in an octree (like TTriangleOctree), or even in an octree of octrees (like TShapeOctree). Tracking collisions using the global variable is most comfortable, instead of spending time on propagating this (purely debugging) information through the octree structures.


Generated by PasDoc 0.13.0 on 2013-08-17 21:27:17