Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csDPlane Class Reference

A plane in 3D space. More...

#include <math3d_d.h>

List of all members.

Public Methods

 csDPlane ()
 Initialize to the xy plane.

 csDPlane (const csDVector3 &plane_norm, double d=0)
 Initialize the plane.

 csDPlane (double a, double b, double c, double d=0)
 Initialize the plane.

csDVector3Normal ()
 Return the normal vector of this plane.

const csDVector3Normal () const
 Return the normal vector of this plane.

double A () const
 Return the A component of this plane.

double B () const
 Return the B component of this plane.

double C () const
 Return the C component of this plane.

double D () const
 Return the D component of this plane.

double& A ()
 Return the A component of this plane.

double& B ()
 Return the B component of this plane.

double& C ()
 Return the C component of this plane.

double& D ()
 Return the D component of this plane.

void Set (double a, double b, double c, double d)
 Set the value of the four plane components.

double Classify (const csDVector3 &pt) const
 Classify the given vector with regards to this plane.

double Distance (const csDVector3 &pt) const
 Compute the distance from the given vector to this plane. More...

void Invert ()
 Reverses the direction of the plane while maintianing the plane itself.

void Normalize ()
 Normalizes the plane equation so that 'norm' is a unit vector.


Public Attributes

csDVector3 norm
 The normal vector (or the (A,B,C) components).

double DD
 The D component of the plane.


Static Public Methods

double Classify (double A, double B, double C, double D, const csDVector3 &pt)
 Classify a vector with regards to four plane components.


Detailed Description

A plane in 3D space.

The plane is given by the equation AAx + BBy + CCz + DD = 0, Where (AA,BB,CC) is given by the vector 'norm'.


Member Function Documentation

double csDPlane::Distance ( const csDVector3 & pt ) const [inline]
 

Compute the distance from the given vector to this plane.

This function assumes that 'norm' is a unit vector. If not, the function returns distance times the magnitude of 'norm'.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000