Unit Collisions
Description
Collisions unit(C) 2006-2007 George "Mirage" Bakhtadze. www.casteng.com
The source code may be used under either MPL 1.1 or LGPL 2.1 license. See included license.txt file
Unit contains collision detection routines
Functions and Procedures
Overview
function OOBBOOBBColDet (const Transform1, Transform2: Base3D.TMatrix4s; const OOBB1, OOBB2: TBoundingVolume): Boolean; |
function OOBBOOBBColDet2D(const Transform1, Transform2: Base3D.TMatrix4s; const OOBB1, OOBB2: TBoundingVolume): Boolean; |
function RayCircleColDet(const RayOrigin, RayDir, SphereOrigin: BaseTypes.TVector3s; SphereRadius: Single; var Point: BaseTypes.TVector3s): Boolean; |
function RaySphereColDet(const RayOrigin, RayDir, SphereOrigin: BaseTypes.TVector3s; SphereRadius: Single; var Point: BaseTypes.TVector3s): Boolean; |
function SphereOOBBColDet(const Transform1, Transform2: Base3D.TMatrix4s; const Sphere, OOBB: TBoundingVolume): Boolean; |
function VolumeColDet(Volume1, Volume2: TBoundingVolumes; const Transform1, Transform2: Base3D.TMatrix4s): TCollisionResult; |
function VolumeColTest(const Volume1, Volume2: TBoundingVolumes; const Transform1, Transform2: Base3D.TMatrix4s): Boolean; |
Description
Returns True if the two given OOBBs intersects. Transform1 and Transform2 specifies location and orientation of the volumes within the world space and should not contain scale.
Returns True if the two given OOBBs intersects in XZ plane. It's faster then OOBBOOBBColDet a little. Transform1 and Transform2 specifies location and orientation of the volumes within the world space and should not contain scale.
Returns True if a ray with the specified origin and direction intersects with a sphere with the specified origin and radius. Point is filled with the nearest to ray origin intersection point if any
Returns True if a ray with the specified origin and direction intersects with a sphere with the specified origin and radius. Point is filled with the nearest to ray origin intersection point if any
Returns True if the given sphere intersects with the given OOBB. Transform1 and Transform2 specifies location and orientation of the volumes within the world space and should not contain scale.
Checks two arrays of bounding volumes for collision and returns result in TCollisionResult structure. Transform1 and Transform2 specifies location and orientation of the volume arrays within the world space and should not contain scale.
Returns True if there is an intersection between bounding volumes from the given arrays. Transform1 and Transform2 specifies location and orientation of the volume arrays within the world space and should not contain scale.
Types
Overview
Description
Bounding volume data structure VolumeKind - bvkOOBB - object-oriented bounding box, bvkSphere - sphere Offset - offset of the volume's center Dimensions - half-size of a box or radius of a sphere (in x component)
Array of bounding volumes
Data structure of a collision-test result. Contains the two collided volumes or nils if no collision detected
Enumerations
|
Last modified: 26 Oct, 2008
Copyright (C) 2006-2008, casteng.com
|