Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csPolyPlane Class Reference

This class represents a polygon plane. More...

#include <polyplan.h>

List of all members.

Public Methods

 csPolyPlane ()
 Constructor. Reference count is initialized to 1.

void IncRef ()
 Maintain a reference counter for texture type objects.

void DecRef ()
 Decrement usage counter.

void ObjectToWorld (const csReversibleTransform &obj, const csVector3 &vertex1)
 Transform this plane from object space to world space using the given matrices. More...

void WorldToCamera (const csReversibleTransform &t, const csVector3 &vertex1)
 Transform this plane from world space to camera space using the given matrices. More...

float SquaredDistance (csVector3 &v) const
 Return the minimum squared distance from the plane to a point in 3D space (using world coordinates).

bool NearlyEqual (csPolyPlane *plane) const
 Check if this plane is nearly equal to another one in world space coordinates (it only checks on the component values. More...

void ClosestPoint (csVector3 &v, csVector3 &isect) const
 Return the closest point on the plane to a point in 3D space (using world coordinates).

bool IntersectSegment (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr) const
 Run a segment through this plane (in object space) and see where it intersects. More...

csPlane3GetObjectPlane ()
 Get the object version of the plane.

const csPlane3GetObjectPlane () const
 Get the object version of the plane.

csPlane3GetWorldPlane ()
 Get the world version of the plane.

const csPlane3GetWorldPlane () const
 Get the world version of the plane.

csPlane3GetCameraPlane ()
 Get the camera version of the plane.

const csPlane3GetCameraPlane () const
 Get the camera version of the plane.

void GetObjectNormal (float *p_A, float *p_B, float *p_C, float *p_D) const
 Get the normal in object space.

void GetWorldNormal (float *p_A, float *p_B, float *p_C, float *p_D) const
 Get the normal in world space.

void GetCameraNormal (float *p_A, float *p_B, float *p_C, float *p_D) const
 Get the normal in camera space.


Friends

class  csPolygon2D
class  csPolyTexture


Detailed Description

This class represents a polygon plane.

Never 'delete' an instance of this class directly but instead call 'DecRef()'.


Member Function Documentation

bool csPolyPlane::IntersectSegment ( const csVector3 & start,
const csVector3 & end,
csVector3 & isect,
float * pr ) const
 

Run a segment through this plane (in object space) and see where it intersects.

Put value in 'pr' between 0 and 1 for position on segment (0 is at start, 1 is at end) and also put intersection point in 'isect'. Return false if there is no intersection.

bool csPolyPlane::NearlyEqual ( csPolyPlane * plane ) const [inline]
 

Check if this plane is nearly equal to another one in world space coordinates (it only checks on the component values.

The planes are not normalized).

void csPolyPlane::ObjectToWorld ( const csReversibleTransform & obj,
const csVector3 & vertex1 )
 

Transform this plane from object space to world space using the given matrices.

One vertex on the plane is also given so that we can more easily recompute the 'D' component of the plane. The given vertex should be in world space.

void csPolyPlane::WorldToCamera ( const csReversibleTransform & t,
const csVector3 & vertex1 )
 

Transform this plane from world space to camera space using the given matrices.

One vertex on the plane is also given so that we can more easily recompute the 'D' component of the plane. The given vertex should be in camera space.


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