VPlane Class Reference

#include <VPlane.h>

List of all members.

Public Member Functions

 VPlane ()
 VPlane (float n_x, float n_y, float n_z, float _d)
 VPlane (VVector m_Vec1, VVector m_Vec2, VVector m_Vec3)
 VPlane (VVector m_Normal, VVector m_Point)
VPlanenormalize ()
VPlaneoperator= (const VPlane rhs)
bool isInFront (VVector &p) const
float distance (const VVector &p) const
bool intersect (const VVector &start, const VVector &dir, VVector &result) const
bool intersects (const VVector &start, const VVector &dir) const
VVector getNormal ()
std::string toString ()
float * getArray ()

Public Attributes

float & nx
float & ny
float & nz
float & d
float values [4]
VVector mNormal


Detailed Description

class representing a Plane

Definition at line 14 of file VPlane.h.


Constructor & Destructor Documentation

VPlane::VPlane (  )  [inline]

default constructor

Definition at line 29 of file VPlane.h.

References mNormal, nx, ny, nz, and values.

VPlane::VPlane ( float  n_x,
float  n_y,
float  n_z,
float  _d 
) [inline]

constructor with given values

Parameters:
n_x x Value of Normal
n_y y Value of Normal
n_z z Value of Normal
_d distance Value to Plane

Definition at line 46 of file VPlane.h.

References mNormal, nx, ny, nz, and values.

VPlane::VPlane ( VVector  m_Vec1,
VVector  m_Vec2,
VVector  m_Vec3 
) [inline]

constructor with 3 Points. Points must be given in counter clockwise order

Parameters:
m_Vec1 Point1 of Plane
m_Vec2 Point2 of Plane
m_Vec3 Point3 of Plane

Definition at line 63 of file VPlane.h.

References d, VVector::getCross(), VVector::getDot(), VVector::getX(), VVector::getY(), VVector::getZ(), mNormal, VVector::normalize(), nx, ny, and nz.

VPlane::VPlane ( VVector  m_Normal,
VVector  m_Point 
) [inline]

constructor with given Point and Normal

Parameters:
m_Normal NormalVector of Plane
m_Point Point on Plane

Definition at line 83 of file VPlane.h.

References d, VVector::getDot(), VVector::getX(), VVector::getY(), VVector::getZ(), nx, ny, and nz.


Member Function Documentation

VPlane& VPlane::normalize (  )  [inline]

normalizes the plane

Returns:
reference to normalized plane

Definition at line 96 of file VPlane.h.

References d, nx, ny, and nz.

VPlane& VPlane::operator= ( const VPlane  rhs  )  [inline]

Definition at line 113 of file VPlane.h.

References d, mNormal, nx, ny, and nz.

bool VPlane::isInFront ( VVector p  )  const [inline]

Determine whether a point is at the "back" or in the "front" of the plane.

Parameters:
p Vector to test
Returns:
bool containing if the Vector is in Front of the plane

Definition at line 129 of file VPlane.h.

References d, VVector::getX(), VVector::getY(), VVector::getZ(), nx, ny, and nz.

float VPlane::distance ( const VVector p  )  const [inline]

returns the signed distance.

Parameters:
p Vector to test
Returns:
T containing the distance

Definition at line 139 of file VPlane.h.

References d, VVector::getX(), VVector::getY(), VVector::getZ(), nx, ny, and nz.

bool VPlane::intersect ( const VVector start,
const VVector dir,
VVector result 
) const [inline]

Intersect with a ray.

Parameters:
start Start point of the ray.
dir Direction of the ray.
result The resulting intersection point.
Returns:
true if there's an intersection, or false if there's not.

Definition at line 150 of file VPlane.h.

References d, EPSILON, VVector::getX(), VVector::getY(), VVector::getZ(), nx, ny, and nz.

Referenced by intersects().

bool VPlane::intersects ( const VVector start,
const VVector dir 
) const [inline]

Test for intersection. This works identically to Intersect(), except for the missing result parameter. This method is intended for use when you are only interested in whether there is an intersection, but not the actual intersection point.

Definition at line 178 of file VPlane.h.

References intersect().

VVector VPlane::getNormal (  )  [inline]

returns the plane Normal

Returns:
Vector3 containing the Plane Normal

Definition at line 188 of file VPlane.h.

References nx, ny, and nz.

std::string VPlane::toString (  )  [inline]

method to make an output

Returns:
string containing the values

Definition at line 197 of file VPlane.h.

References d, nx, ny, and nz.

float* VPlane::getArray (  )  [inline]

Definition at line 205 of file VPlane.h.

References values.


Member Data Documentation

float& VPlane::nx

Definition at line 17 of file VPlane.h.

Referenced by distance(), getNormal(), intersect(), isInFront(), normalize(), operator=(), toString(), and VPlane().

float& VPlane::ny

Definition at line 18 of file VPlane.h.

Referenced by distance(), getNormal(), intersect(), isInFront(), normalize(), operator=(), toString(), and VPlane().

float& VPlane::nz

Definition at line 19 of file VPlane.h.

Referenced by distance(), getNormal(), intersect(), isInFront(), normalize(), operator=(), toString(), and VPlane().

float& VPlane::d

Definition at line 20 of file VPlane.h.

Referenced by distance(), intersect(), isInFront(), normalize(), operator=(), toString(), and VPlane().

float VPlane::values[4]

Definition at line 22 of file VPlane.h.

Referenced by getArray(), and VPlane().

VVector VPlane::mNormal

Definition at line 24 of file VPlane.h.

Referenced by operator=(), and VPlane().


The documentation for this class was generated from the following file:
Generated on Mon Jan 21 01:15:17 2008 for FlowVis by  doxygen 1.5.4