Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

gbmath::geometry::intersect Namespace Reference

Intersection functions for different geometry. More...


Enumerations

enum  
 Constants representing collision results.


Functions

int AABBPlane (const AABB &box, const Plane &plane)
int AABBRay (const AABB &box, const Ray &ray, float &oTime, float eps)
int AABBTriangle (const AABB &box, const Triangle &tri)
int CapsuleAABB (const Capsule &cap, const AABB &box)
int CapsuleCapsule (const Capsule &cap1, const Capsule &cap2, float &oTime, float eps)
int CapsulePoint (const Capsule &cap, const V3 &point, float &oTime)
int CapsuleSegment (const Capsule &cap, const Segment &seg, float &oCaptime, float &oSegtime)
int CapsuleTriangle (const Capsule &cap, const Triangle &tri, V3 &oNormal, float &oTime)
int PlanePoint (const Plane &pl, const V3 &point, float eps)
int PlaneRay (const Plane &pl, const Ray &ray, float &oTime, float eps)
int PlaneSegment (const Plane &pl, const Segment &seg, float &oFrac, float eps)
int RayRay (const Ray &ray1, const Ray &ray2, float &oDist1, float &oDist2, float eps)
int SegmentSegment (const Segment &seg1, const Segment &seg2, float &o_time1, float &o_time2)
int SpherePoint (const Sphere &sphere, V3 &point)
int SphereRay (const Sphere &sphere, const Ray &ray)
int SphereSphere (const Sphere &sphere1, const Sphere &sphere2)
int SphereSphere (const Sphere &sphere1, const Sphere &sphere2, float &oDist)
int TriangleSegment (const Triangle &tri, const Segment &seg, float &oFrac)
int RayRay (const Ray &ray1, const Ray &ray2, float eps=constants::Eps3)
int SphereRay (const Sphere &sphere, const Ray &ray, float &oTime1, float &oTime2, float eps=constants::Eps3)
int SphereSegment (const Sphere &sphere, const Segment &segment)
int SphereSegment (const Sphere &sphere, const Segment &segment, float &oFrac1, float &oFrac2)


Detailed Description

Intersection functions for different geometry.

For a description of the geometry, refer to the geometry header.


Function Documentation

int gbmath::geometry::intersect::AABBPlane const AABB   box,
const Plane   plane
 

Return values:
NOHIT  No intersection.
HIT  Intersected.

int gbmath::geometry::intersect::AABBRay const AABB   box,
const Ray   ray,
float &    oTime,
float    eps = constants::Eps3
 

Return values:
NOHIT  No intersection.
HIT  oTime is set to time of intersection.

int gbmath::geometry::intersect::AABBTriangle const AABB   box,
const Triangle   tri
 

Return values:
NOHIT  No intersection.
HIT  Intersected.

int gbmath::geometry::intersect::CapsuleAABB const Capsule   capsule,
const AABB   box
 

Return values:
NOHIT  No intersection.
HIT  Intersected

int gbmath::geometry::intersect::CapsuleCapsule const Capsule   capsule1,
const Capsule   capsule2,
float &    oTime,
float    eps = constants::Eps3
 

Return values:
NOHIT  No intersection.
HIT  oTime is set to time of intersection.

int gbmath::geometry::intersect::CapsulePoint const Capsule   capsule,
const V3   point,
float &    oTime
 

Return values:
NOHIT  No intersection.
HIT  oTime is set to time of intersection.

int gbmath::geometry::intersect::CapsuleSegment const Capsule   capsule,
const Segment   segment,
float &    oCaptime,
float &    oSegtime
 

Return values:
NOHIT  No intersection.
HIT  oCaptime is set to capsule time of intersection. oSegtime is set to segment time of intersection.

int gbmath::geometry::intersect::CapsuleTriangle const Capsule   capsule,
const Triangle   triangle,
V3   oNormal,
float &    oTime
 

Return values:
NOHIT  No intersection.
HIT  oNormal is set to normal of reflection. oTime is set to time of intersection.

int gbmath::geometry::intersect::PlanePoint const Plane   pl,
const V3   point,
float    eps = constants::Eps3
 

Return values:
FRONT  Point is in positive halfspace.
BACK  Point is in negative halfspace.
ON  Point is on plane.

int gbmath::geometry::intersect::PlaneRay const Plane   plane,
const Ray   ray,
float &    oTime,
float    eps = constants::Eps3
 

Return values:
NOHIT  No intersection.
FRONT  oTime is set to intersection time.
BACK  oTime is set to intersection time.

int gbmath::geometry::intersect::PlaneSegment const Plane   plane,
const Segment   segment,
float &    oFrac,
float    eps = constants::Eps3
 

Return values:
NOHIT  No intersection.
FRONT  oFrac is set to fraction of segment intersection.
BACK  oFrac is set to fraction of segment intersection.

int gbmath::geometry::intersect::RayRay const Ray   ray1,
const Ray   ray2,
float    eps = constants::Eps3
 

Return values:
NOHIT  No intersection.
HIT  Intersected.

int gbmath::geometry::intersect::RayRay const Ray   ray1,
const Ray   ray2,
float &    oDist1,
float &    oDist2,
float    eps = constants::Eps3
 

Return values:
NOHIT  No intersection.
HIT  oDist1 is set to dist of ray1 intersection.
oDist2  is set to dist of ray2 intersection.

int gbmath::geometry::intersect::SegmentSegment const Segment   segment1,
const Segment   segment2,
float &    oTime1,
float &    oTime2
 

Return values:
NOHIT  No intersection.
HIT  oTime1 is set to time of seg1 intersection. oTime2 is set to time of seg2 intersection.

int gbmath::geometry::intersect::SpherePoint const Sphere   sphere,
V3   point
 

Return values:
NOHIT  No intersection.
HIT  Intersect or on sphere.

int SphereRay const Sphere   sphere,
const Ray   ray,
float &    oTime1,
float &    oTime2,
float    eps = constants::Eps3
 

Return values:
NOHIT  No intersection.
HIT  oTime1 is set to time of early intersection. oTime2 is set to time of late intersection.

int gbmath::geometry::intersect::SphereRay const Sphere   sphere,
const Ray   ray
 

Return values:
NOHIT  No intersection.
HIT  Intersected.
INSIDE  Ray was inside of sphere.

int SphereSegment const Sphere   sphere,
const Segment   segment,
float &    oFrac1,
float &    oFrac2
 

Return values:
NOHIT  No intersection.
HIT  oFrac1 is set to fraction of segment length of first intesection. oFrac2 is set to second intersection.

int SphereSegment const Sphere   sphere,
const Segment   segment
 

Return values:
NOHIT  No intersection.
HIT  Intersected.

int gbmath::geometry::intersect::SphereSphere const Sphere   sphere1,
const Sphere   sphere2,
float &    oDist
 

Return values:
NOHIT  No intersection.
HIT  Intersected. oDist is set to difference of seg1 and seg2 distance and sum of their radii

int gbmath::geometry::intersect::SphereSphere const Sphere   sphere1,
const Sphere   sphere2
 

Return values:
NOHIT  No intersection.
HIT  Intersected.

int gbmath::geometry::intersect::TriangleSegment const Triangle   triangle,
const Segment   segment,
float &    oFrac
 

Return values:
NOHIT  No intersection.
HIT  oTime is set to fraction of segment intersection.


Generated on Mon Sep 2 14:52:34 2002 for GunBuster Engine by doxygen1.2.17