vtdata library
Public Types | Public Member Functions | Public Attributes
FPlane Class Reference
Inheritance diagram for FPlane:
Inheritance graph
[legend]

List of all members.

Public Types

enum  IntersectionType {
  COLINEAR, COPLANAR, PARALLEL, FACING_AWAY,
  INTERSECTING
}

Public Member Functions

 FPlane (float a, float b, float c, float d)
 Construct from parametric coefficients.
 FPlane (const FPoint3 &p, const FPoint3 &q, const FPoint3 &r)
 Construct from three points.
 FPlane (const FPoint3 &Point, const FPoint3 &Normal)
 Construct from point and normal vector.
const FPlaneoperator= (const FPlane &rhs)
void Set (const FPoint3 &p, const FPoint3 &n)
void Set (float a, float b, float c, float d)
float Distance (const FPoint3 &v) const
const IntersectionType Intersection (const FPlane &Plane, FPoint3 &Origin, FPoint3 &Direction, float fEpsilon=0.0) const
 Intersection of two planes.
const IntersectionType RayIntersection (const FPoint3 &Origin, const FPoint3 &Direction, float &fDistance, FPoint3 &Intersection, float fEpsilon=0.0) const
 Intersection of ray with plane.
const IntersectionType LineIntersection (const FPoint3 &Origin, const FPoint3 &Direction, FPoint3 &Intersection, float fEpsilon=0.0) const
 Intersection of line with plane.
const IntersectionType ThreePlanesIntersection (const FPlane &Plane1, const FPlane &Plane2, FPoint3 &Intersection, float fEpsilon=0.0) const
 Intersection of three planes.

Public Attributes

float w

Detailed Description

A class representing an infinite plane, interface single-precision (float).


Member Function Documentation

const FPlane::IntersectionType FPlane::Intersection ( const FPlane Plane,
FPoint3 Origin,
FPoint3 Direction,
float  fEpsilon = 0.0 
) const

Intersection of two planes.

Find the intersection of two planes. which in the general case is a line. The line is provided as a ray (origin and direction).

Returns:
status, which is either INTERSECTING, COPLANAR, or PARALLEL. In the case of INTERSECTING, then the Origin and Direction parameters describe the line of intersection.
const FPlane::IntersectionType FPlane::RayIntersection ( const FPoint3 Origin,
const FPoint3 Direction,
float &  fDistance,
FPoint3 Intersection,
float  fEpsilon = 0.0 
) const

Intersection of ray with plane.

Compute Ray-Plane intersection.

Parameters:
Origin,DirectionThe position and direction that define the ray.
fDistanceThe distance along the ray to the intersection point.
IntersectionThe intersection point.
fEpsilonSmall value to test for numeric equivalenccy.
Returns:
The intersection result (PARALLEL, FACING_AWAY, or INTERSECTING)
 All Classes Files Functions Variables Enumerations Enumerator