Class TBaseTrianglesOctreeNode

Unit

Declaration

type TBaseTrianglesOctreeNode = class(TOctreeNode)

Description

Hierarchy

  • TObject
  • TOctreeNode
  • TBaseTrianglesOctreeNode

Overview

Methods

Protected function CommonSphere(const pos: TVector3; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
Protected function CommonSphereLeaf(const pos: TVector3; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Protected function CommonSphere2D(const pos: TVector2; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
Protected function CommonSphere2DLeaf(const pos: TVector2; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Protected function CommonPoint2D(const Point: TVector2; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
Protected function CommonPoint2DLeaf(const Point: TVector2; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Protected function CommonBox(const ABox: TBox3D; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
Protected function CommonBoxLeaf(const ABox: TBox3D; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Protected function CommonSegment( out Intersection: TVector3; out IntersectionDistance: Single; const pos1, pos2: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
Protected function CommonSegmentLeaf( out Intersection: TVector3; out IntersectionDistance: Single; const pos1, pos2: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Protected function CommonRay( out Intersection: TVector3; out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
Protected function CommonRayLeaf( out Intersection: TVector3; out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Public function SphereCollision(const pos: TVector3; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Public function IsSphereCollision(const pos: TVector3; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
Public function SphereCollision2D(const pos: TVector2; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Public function IsSphereCollision2D(const pos: TVector2; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
Public function PointCollision2D(const Point: TVector2; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Public function IsPointCollision2D(const Point: TVector2; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
Public function BoxCollision(const ABox: TBox3D; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Public function IsBoxCollision(const ABox: TBox3D; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
Public function SegmentCollision( out Intersection: TVector3; out IntersectionDistance: Single; const pos1, pos2: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Public function IsSegmentCollision( const pos1, pos2: TVector3; const Tag: TMailboxTag; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
Public function RayCollision( out Intersection: TVector3; out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
Public function IsRayCollision( const RayOrigin, RayDirection: TVector3; const Tag: TMailboxTag; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;

Description

Methods

Protected function CommonSphere(const pos: TVector3; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;

These realize the common implementation of SphereCollision: traversing down the octree nodes. They take care of traversing down the non-leaf nodes, you only have to override the CommonXxxLeaf versions where you handle the leaves (and you have to call CommonXxx from normal Xxx routines).

Protected function CommonSphereLeaf(const pos: TVector3; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Protected function CommonSphere2D(const pos: TVector2; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
 
Protected function CommonSphere2DLeaf(const pos: TVector2; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Protected function CommonPoint2D(const Point: TVector2; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
 
Protected function CommonPoint2DLeaf(const Point: TVector2; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Protected function CommonBox(const ABox: TBox3D; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
 
Protected function CommonBoxLeaf(const ABox: TBox3D; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Protected function CommonSegment( out Intersection: TVector3; out IntersectionDistance: Single; const pos1, pos2: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
 
Protected function CommonSegmentLeaf( out Intersection: TVector3; out IntersectionDistance: Single; const pos1, pos2: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Protected function CommonRay( out Intersection: TVector3; out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle;
 
Protected function CommonRayLeaf( out Intersection: TVector3; out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Public function SphereCollision(const pos: TVector3; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;

See TBaseTrianglesOctree for documentation of these routines.

Note that methods here do not try to limit detected intersections to their boxes. If you will insert a large triangle into a node, that is partially inside and partially outside of this node, the collision methods may find an intersection outside of this node.

This is not be a problem for a root node, since the root node has a box such that every triangle is completely inside. But it is important to remember when you implement recursive *Collision calls in nodes: if you want to query your subnodes in some particular order (for example to honour ReturnClosestIntersection = True), then remember that one subnode may detect a collision that in fact happened in other subnode.

Public function IsSphereCollision(const pos: TVector3; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
 
Public function SphereCollision2D(const pos: TVector2; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Public function IsSphereCollision2D(const pos: TVector2; const Radius: Single; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
 
Public function PointCollision2D(const Point: TVector2; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Public function IsPointCollision2D(const Point: TVector2; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
 
Public function BoxCollision(const ABox: TBox3D; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Public function IsBoxCollision(const ABox: TBox3D; const TriangleToIgnore: PTriangle; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
 
Public function SegmentCollision( out Intersection: TVector3; out IntersectionDistance: Single; const pos1, pos2: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Public function IsSegmentCollision( const pos1, pos2: TVector3; const Tag: TMailboxTag; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
 
Public function RayCollision( out Intersection: TVector3; out IntersectionDistance: Single; const RayOrigin, RayDirection: TVector3; const Tag: TMailboxTag; const ReturnClosestIntersection: boolean; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): PTriangle; virtual; abstract;
 
Public function IsRayCollision( const RayOrigin, RayDirection: TVector3; const Tag: TMailboxTag; const TriangleToIgnore: PTriangle; const IgnoreMarginAtStart: boolean; const TrianglesToIgnoreFunc: TTriangleIgnoreFunc): boolean; virtual; abstract;
 

Generated by PasDoc 0.16.0.