In file include/csengine/polyplan.h:

## class csPolyPlane : public csObject

> This class represents a texture plane

## Inheritance:

### Public Methods

float Classify(const csVector3& pt)
  Classify a vector with regards to this plane in world space
void ClosestPoint(csVector3& v, csVector3& isect)
  Return the closest point on the plane to a point in 3D space (using world coordinates)
csPolyPlane()
float Distance(csVector3& v)
  Return the minimum distance from the plane to a point in 3D space (using world coordinates)
void GetCameraNormal(float* p_A, float* p_B, float* p_C, float* p_D)
  Get the normal in camera space
csPlane& GetCameraPlane()
  Get the camera version of the plane
void GetObjectNormal(float* p_A, float* p_B, float* p_C, float* p_D)
  Get the normal in object space
csPlane& GetObjectPlane()
  Get the object version of the plane
void GetTextureSpace(csMatrix3& tx_matrix, csVector3& tx_vector)
  Get the transformation from object to texture space.
void GetWorldNormal(float* p_A, float* p_B, float* p_C, float* p_D)
  Get the normal in world space
csPlane& GetWorldPlane()
  Get the world version of the plane
bool IntersectSegment(const csVector3& start, const csVector3& end, csVector3& isect, float* pr)
  Run a segment through this plane (in world space) and see where it intersects
bool NearlyEqual(csPolyPlane* plane)
  Check if this plane is nearly equal to another one in world space coordinates (it only checks on the component values
void ObjectToWorld(const csReversibleTransform& obj, csVector3& vertex1)
  Transform this plane from object space to world space using the given matrices
void SetTextureSpace(float xo, float yo, float zo, float x1, float y1, float z1, float len1, float x2, float y2, float z2, float len2)
void SetTextureSpace(float xo, float yo, float zo, float x1, float y1, float z1, float len)
void SetTextureSpace(csVector3& v_orig, csVector3& v1, float len)
void SetTextureSpace(csVector3& v_orig, csVector3& v_u, csVector3& v_v)
void SetTextureSpace(float xo, float yo, float zo, float xu, float yu, float zu, float xv, float yv, float zv)
void SetTextureSpace(float xo, float yo, float zo, float xu, float yu, float zu, float xv, float yv, float zv, float xw, float yw, float zw)
void SetTextureSpace(csMatrix3& tx_matrix, csVector3& tx_vector)
void SetTextureSpace(csVector3& v_orig, csVector3& v1, float len1, csVector3& v2, float len2)
float SquaredDistance(csVector3& v)
  Return the minimum squared distance from the plane to a point in 3D space (using world coordinates)
bool VisibleFromPoint(const csVector3& p)
  Check if the plane in world space is visible from the given point
void WorldToCamera(const csReversibleTransform& t, csVector3& vertex1)
  Transform the same way from world space to camera space
virtual ~csPolyPlane()

### Private Fields

friend class csPolygon2D
friend class csPolyTexture
friend class Dumper
csMatrix3 m_cam2tex
  Transformed texture space transformation
csMatrix3 m_obj2tex
  Transformation from object to texture space.
csMatrix3 m_world2tex
  Transformation from world to texture space.
csPlane plane_cam
  The camera space plane equation.
csPlane plane_obj
  The object space plane equation (this is fixed).
csPlane plane_wor
  The world space plane equation.
csVector3 v_cam2tex
csVector3 v_obj2tex
  Translation from object to texture space.
csVector3 v_world2tex
  Translation from world to texture space.

### Inherited from csObject:

### Public Methods

CS_ID GetID()
csObject* GetObj(const csIdType& objtype)
virtual csObject* GetObjectParent()
void ObjAdd(csObject* obj)
csObjIterator ObjGet(const csIdType& objtype)
void ObjRelease(csObject* obj)
void ObjRemove(csObject* obj)

### Private Fields

CS_ID csid_value
csObjTree* objtree

### Private Methods

virtual void SetObjectParent(csObject* parent)

### Inherited from csBase:

## Documentation

> This class represents a texture plane. This is a plane that defines the orientation and offset of a texture. It can be used by several polygons to let the textures fit perfectly.

`friend class csPolygon2D`

`friend class csPolyTexture`

`friend class Dumper`

`csPlane plane_obj`
  The object space plane equation (this is fixed).

`csPlane plane_wor`
  The world space plane equation.

`csPlane plane_cam`
  The camera space plane equation.

`csMatrix3 m_obj2tex`
  Transformation from object to texture space.

`csVector3 v_obj2tex`
  Translation from object to texture space.

`csMatrix3 m_world2tex`
  Transformation from world to texture space.

`csVector3 v_world2tex`
  Translation from world to texture space.

`csMatrix3 m_cam2tex`
  Transformed texture space transformation. This transforms a coordinate from camera space to texture space. This transformation is obtained by using m_world2tex and v_world2tex with the camera transformation.

`csVector3 v_cam2tex`

`csPolyPlane()`

`virtual ~csPolyPlane()`

`void ObjectToWorld(const csReversibleTransform& obj, 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 WorldToCamera(const csReversibleTransform& t, csVector3& vertex1)`
  Transform the same way from world space to camera space. The given vertex should be in camera space.

`void SetTextureSpace(csVector3& v_orig, csVector3& v1, float len1, csVector3& v2, float len2)`

`void SetTextureSpace(float xo, float yo, float zo, float x1, float y1, float z1, float len1, float x2, float y2, float z2, float len2)`

`void SetTextureSpace(float xo, float yo, float zo, float x1, float y1, float z1, float len)`

`void SetTextureSpace(csVector3& v_orig, csVector3& v1, float len)`

`void SetTextureSpace(csVector3& v_orig, csVector3& v_u, csVector3& v_v)`

`void SetTextureSpace(float xo, float yo, float zo, float xu, float yu, float zu, float xv, float yv, float zv)`

`void SetTextureSpace(float xo, float yo, float zo, float xu, float yu, float zu, float xv, float yv, float zv, float xw, float yw, float zw)`

`void SetTextureSpace(csMatrix3& tx_matrix, csVector3& tx_vector)`

`void GetTextureSpace(csMatrix3& tx_matrix, csVector3& tx_vector)`
  Get the transformation from object to texture space.

`bool VisibleFromPoint(const csVector3& p)`
  Check if the plane in world space is visible from the given point. To do this it will only do back-face culling.

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

`float Distance(csVector3& v)`
  Return the minimum distance from the plane to a point in 3D space (using world coordinates)

`bool NearlyEqual(csPolyPlane* plane)`
  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).

`float Classify(const csVector3& pt)`
  Classify a vector with regards to this plane in world space

`void ClosestPoint(csVector3& v, csVector3& isect)`
  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)`
  Run a segment through this plane (in world 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.

`csPlane& GetObjectPlane()`
  Get the object version of the plane

`csPlane& GetWorldPlane()`
  Get the world version of the plane

`csPlane& GetCameraPlane()`
  Get the camera version of the plane

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

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

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

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de