Geometry utilities
Classes | |
class | csBox2 |
A bounding box in 2D space. More... | |
class | csBox2Int |
A 2D bounding box with integer coordinates. More... | |
class | csBox3 |
A bounding box in 3D space. More... | |
class | csBoxClipper |
The csBoxClipper class is able to clip convex polygons to a rectangle (such as the screen). More... | |
class | csBSpline |
A B-spline. More... | |
class | csBSPTree |
This BSP-tree is a binary tree that organizes a triangle mesh. More... | |
class | csCatmullRomSpline |
A CatmullRom spline. More... | |
class | csChainHull2D |
This is Andrew's monotone chain 2D convex hull algorithm. More... | |
struct | csClipInfo |
Structure for use with ClipToPlane. More... | |
class | csClipper |
The csClipper class is an abstract parent to all 2D clipping objects. More... | |
struct | csCompressVertex |
This structure is used by csVector3Array::CompressVertices(). More... | |
class | csCoverageTile |
Coverage tile. More... | |
class | csCubicSpline |
A cubic spline. More... | |
class | csDIntersect3 |
Some functions to perform various intersection calculations with 3D line segments. More... | |
class | csDMath3 |
Various assorted 3D mathematical functions. More... | |
class | csDMatrix3 |
A 3x3 matrix. More... | |
class | csDPlane |
A plane in 3D space. More... | |
class | csDSquaredDist |
Some functions to perform squared distance calculations. More... | |
class | csDualQuaternion |
Dual quaternion is a combination q = q0 + e*qe where e is the dual identity element (e^2 = 0) For the background, read "Preliminary Sketch of Biquaternions" [W Clifford, 1873]. More... | |
class | csDVector3 |
A 3D vector. More... | |
class | csEllipsoid |
This class represents an ellipsoid. More... | |
class | csFixed16 |
Encapsulation of a 16.16 fixed-point number. More... | |
class | csFixed24 |
Encapsulation of a 8.24 fixed-point number. More... | |
class | csFrustum |
A general frustum. More... | |
class | csIntersect2 |
Some functions to perform various intersection calculations with 2D line segments. More... | |
class | csIntersect3 |
Some functions to perform various intersection calculations with 3D line segments. More... | |
class | csKDTree |
A KD-tree. More... | |
class | csKDTreeChild |
A child in the KD-tree (usually some object). More... | |
class | csMath2 |
Various functions in 2D, such as 2D vector functions. More... | |
class | csMath3 |
Various assorted 3D mathematical functions. More... | |
class | csMatrix2 |
A 2x2 matrix. More... | |
class | csMatrix3 |
A 3x3 matrix. More... | |
class | csOBB |
Oriented bounding box (OBB). More... | |
class | csOBBFrozen |
Version of the csOBB with frozen corners (for optimization purposes). More... | |
class | csObjectModel |
Helper class to make it easier to implement iObjectModel in mesh objects. More... | |
class | csOrthoTransform |
A class which defines a reversible transformation from one coordinate system to another by maintaining an inverse transformation matrix. More... | |
class | csPath |
A path in 3D. More... | |
class | csPlane2 |
A plane in 2D space. More... | |
class | csPlane3 |
A plane in 3D space. More... | |
class | csPoly2D |
The following class represents a general 2D polygon. More... | |
class | csPoly2DFactory |
This factory is responsible for creating csPoly2D objects or subclasses of csPoly2D. More... | |
class | csPoly2DPool |
This is an object pool which holds objects of type csPoly2D. More... | |
class | csPoly3D |
The following class represents a general 3D polygon. More... | |
class | csPolygonClipper |
The csPolygonClipper class can be used for clipping any polygon against any other convex polygon. More... | |
class | csPolyIndexed |
The following class represents a general polygon. More... | |
class | csQuaternion |
Class for a quaternion. More... | |
class | csRect |
Rectangle class: simple class for manipulating 2D rectangles. More... | |
class | csRectRegion |
A rect region is a class that implements splittable 2d rectangles. More... | |
class | csReversibleTransform |
A class which defines a reversible transformation from one coordinate system to another by maintaining an inverse transformation matrix. More... | |
class | csSegment2 |
A 2D line segment. More... | |
class | csSegment3 |
A 3D line segment. More... | |
class | csSolidSpace |
This structure keeps track of solid space. More... | |
class | csSphere |
This class represents a sphere. More... | |
class | csSpline |
A spline superclass. More... | |
class | csSquaredDist |
Some functions to perform squared distance calculations. More... | |
struct | csTestRectData |
A structure used by csTiledCoverageBuffer::TestRectangle() and initialized by csTiledCoverageBuffer::PrepareTestRectangle(). More... | |
class | csTiledCoverageBuffer |
The tiled coverage Buffer. More... | |
class | csTransform |
A class which defines a transformation from one coordinate system to another. More... | |
struct | csTriangle |
A triangle. More... | |
class | csTriangleLODAlgo |
Algorithm class that calculates the cost of a vertex. More... | |
class | csTriangleLODAlgoEdge |
This subclass of csTriangleLODAlgo uses a very simple cost metric to calculate the vertex cost. More... | |
class | csTriangleMesh |
A mesh of triangles. More... | |
class | csTriangleMeshBox |
A convenience triangle mesh implementation that represents a cube. More... | |
struct | csTriangleMeshEdge |
A definition of one edge. More... | |
class | csTriangleMeshLOD |
A static class which performs the calculation of the best order to do the collapsing of a triangle mesh. More... | |
class | csTriangleMeshPointer |
A convenience triangle mesh which takes vertex and triangle pointers from another source. More... | |
class | csTriangleMeshTools |
A set of tools to work with iTriangleMesh instances. More... | |
class | csTriangleVertex |
The representation of a vertex in a triangle mesh. More... | |
class | csTriangleVertexCost |
The representation of a vertex in a triangle mesh. More... | |
class | csTriangleVertices |
A class which holds vertices and connectivity information for a triangle mesh. More... | |
class | csTriangleVerticesCost |
A class which holds vertices and connectivity information for a triangle mesh. More... | |
class | csTriangleVerticesSorted |
This class works closely with csTriangleVerticesCost and maintains a sorted (on cost) view of the vertices. More... | |
class | csVector2 |
A 2D vector. More... | |
class | csVector3 |
A 3D vector. More... | |
class | csVector3Array |
This is actually the same class as csPoly3D. More... | |
class | csVector4 |
A 4D vector with "float" components. More... | |
class | csVector4T< T > |
A 4D vector with variable type components. More... | |
struct | csVertexStatus |
The clipper can output additional information about each vertex in output polygon. More... | |
class | csXRotMatrix3 |
An instance of csMatrix3 that is initialized as a rotation about X. More... | |
class | csXScaleMatrix3 |
An instance of csMatrix3 that is initialized to scale the X dimension. More... | |
class | csYRotMatrix3 |
An instance of csMatrix3 that is initialized as a rotation about Y. More... | |
class | csYScaleMatrix3 |
An instance of csMatrix3 that is initialized to scale the Y dimension. More... | |
class | csZRotMatrix3 |
An instance of csMatrix3 that is initialized as a rotation about Z. More... | |
class | csZScaleMatrix3 |
An instance of csMatrix3 that is initialized to scale the Z dimension. More... | |
struct | iClipper2D |
This interfaces represents a 2D clipper for polygons. More... | |
struct | iDecal |
A decal created by the iDecalManager. More... | |
struct | iDecalAnimationControl |
A decal animation control, to be used by the iMeshObject when the vertices of the decal have to be animated. More... | |
struct | iDecalBuilder |
Interface for mesh objects to use to build decals for their mesh object. More... | |
struct | iDecalManager |
Creates and manages decals. More... | |
struct | iDecalTemplate |
Interface for a decal template which dictates the appearance of a newly created iDecal. More... | |
struct | iKDTreeObjectDescriptor |
If you implement this interface then you can give that to the KDtree. More... | |
struct | iKDTreeUserData |
The data type for user data to be attached to the KDTree. More... | |
struct | iObjectModel |
This interface represents data related to some geometry in object space. More... | |
struct | iObjectModelListener |
Implement this class if you're interested in hearing about when the object model changes. More... | |
struct | iPath |
A path in 3D. More... | |
struct | iTriangleMesh |
This interface reprents a mesh of triangles. More... | |
struct | iTriangleMeshIterator |
Iterator to iterate over all data mesh ID's in an object model. More... | |
Namespaces | |
namespace | CS |
Main namespace for CrystalSpace. | |
Defines | |
#define | CS_BOUNDINGBOX_MAXVALUE 1000000000. |
The maximum value that a coordinate in the bounding box can use. | |
#define | MAX_OUTPUT_VERTICES 64 |
Maximal number of vertices in output (clipped) polygons. | |
Typedefs | |
typedef bool( | csKDTreeVisitFunc )(csKDTree *treenode, void *userdata, uint32 timestamp, uint32 &frustum_mask) |
A callback function for visiting a KD-tree node. | |
Enumerations | |
enum | { CS_POL_SAME_PLANE = 0, CS_POL_FRONT = 1, CS_POL_BACK = 2, CS_POL_SPLIT_NEEDED = 3 } |
Values returned by csPoly3D::Classify. More... | |
enum | { CS_AXIS_NONE = -1, CS_AXIS_X = 0, CS_AXIS_Y = 1, CS_AXIS_Z = 2, CS_AXIS_W = 3 } |
Constants for axes. More... | |
Functions | |
template<class T > | |
T | csClamp (const T &a, T max, T min) |
Clamp a between max and min. | |
template<class T , class Tfactor > | |
T | csLerp (const T &a, const T &b, const Tfactor &f) |
Performs a linear interpolation between a and b with the factor f. | |
template<class T > | |
const T & | csMax (const T &a, const T &b) |
Returns bigger of a and b. | |
template<class T > | |
const T & | csMin (const T &a, const T &b) |
Returns smaller of a and b. | |
template<class T > | |
T | csSmoothStep (const T &a, T max, T min) |
Performs a smooth interpolation of a on range min to max. | |
template<class T , class U > | |
void | csSort (T &a, T &b, U &x, U &y) |
Sort a and b in order of size. | |
template<class T > | |
void | csSort (T &a, T &b) |
Sort a and b in order of size. | |
template<class T > | |
T | csSquare (const T &x) |
Returns the square of the argument. | |
Flags for iTriangleMesh | |
| |
enum | { CS_TRIMESH_CLOSED = 1, CS_TRIMESH_NOTCLOSED = 2, CS_TRIMESH_CONVEX = 4, CS_TRIMESH_NOTCONVEX = 8, CS_TRIMESH_DEFORMABLE = 16 } |
Corner indices | |
For csBox2::GetCorner(). | |
enum | { CS_BOX_CORNER_xy = 0, CS_BOX_CORNER_xY = 1, CS_BOX_CORNER_Xy = 2, CS_BOX_CORNER_XY = 3, CS_BOX_CENTER2 = 4 } |
Indices of edges for csBox2. | |
Index e+1 is opposite edge of e (with e even). | |
enum | { CS_BOX_EDGE_xy_Xy = 0, CS_BOX_EDGE_Xy_xy = 1, CS_BOX_EDGE_Xy_XY = 2, CS_BOX_EDGE_XY_Xy = 3, CS_BOX_EDGE_XY_xY = 4, CS_BOX_EDGE_xY_XY = 5, CS_BOX_EDGE_xY_xy = 6, CS_BOX_EDGE_xy_xY = 7 } |
Indices of corner vertices for csBox3. | |
Used by csBox3::GetCorner(). | |
enum | { CS_BOX_CORNER_xyz = 0, CS_BOX_CORNER_xyZ = 1, CS_BOX_CORNER_xYz = 2, CS_BOX_CORNER_xYZ = 3, CS_BOX_CORNER_Xyz = 4, CS_BOX_CORNER_XyZ = 5, CS_BOX_CORNER_XYz = 6, CS_BOX_CORNER_XYZ = 7, CS_BOX_CENTER3 = 8 } |
Indices of faces for csBox3. | |
Used by csBox3::GetSide(). | |
enum | { CS_BOX_SIDE_x = 0, CS_BOX_SIDE_X = 1, CS_BOX_SIDE_y = 2, CS_BOX_SIDE_Y = 3, CS_BOX_SIDE_z = 4, CS_BOX_SIDE_Z = 5, CS_BOX_INSIDE = 6 } |
Indices of edges for csBox3. | |
Index e+1 is opposite edge of e (with e even). | |
enum | { CS_BOX_EDGE_Xyz_xyz = 0, CS_BOX_EDGE_xyz_Xyz = 1, CS_BOX_EDGE_xyz_xYz = 2, CS_BOX_EDGE_xYz_xyz = 3, CS_BOX_EDGE_xYz_XYz = 4, CS_BOX_EDGE_XYz_xYz = 5, CS_BOX_EDGE_XYz_Xyz = 6, CS_BOX_EDGE_Xyz_XYz = 7, CS_BOX_EDGE_Xyz_XyZ = 8, CS_BOX_EDGE_XyZ_Xyz = 9, CS_BOX_EDGE_XyZ_XYZ = 10, CS_BOX_EDGE_XYZ_XyZ = 11, CS_BOX_EDGE_XYZ_XYz = 12, CS_BOX_EDGE_XYz_XYZ = 13, CS_BOX_EDGE_XYZ_xYZ = 14, CS_BOX_EDGE_xYZ_XYZ = 15, CS_BOX_EDGE_xYZ_xYz = 16, CS_BOX_EDGE_xYz_xYZ = 17, CS_BOX_EDGE_xYZ_xyZ = 18, CS_BOX_EDGE_xyZ_xYZ = 19, CS_BOX_EDGE_xyZ_xyz = 20, CS_BOX_EDGE_xyz_xyZ = 21, CS_BOX_EDGE_xyZ_XyZ = 22, CS_BOX_EDGE_XyZ_xyZ = 23 } |
Polygon-to-Frustum relations | |
Return values for csFrustum::Classify. The routine makes a difference whenever a polygon is fully outside the frustum, fully inside, fully covers the frustum or is partly inside, partly outside. | |
enum | { CS_FRUST_OUTSIDE = 0, CS_FRUST_INSIDE = 1, CS_FRUST_COVERED = 2, CS_FRUST_PARTIAL = 3 } |
Clipper return codes | |
The clipper routines return one of | |
enum | { CS_CLIP_OUTSIDE = 0, CS_CLIP_CLIPPED = 1, CS_CLIP_INSIDE = 2 } |
Additional vertex informations | |
| |
enum | { CS_VERTEX_ORIGINAL = 0, CS_VERTEX_ONEDGE = 1, CS_VERTEX_INSIDE = 2 } |
Clipped vertex type. More... | |
| |
bool | csFinite (double d) |
Checks if a double-precision floating point value is finite. | |
bool | csFinite (float f) |
Checks if a floating point value is finite. | |
bool | csNaN (double d) |
Checks if a double-precision floating point value is not-a-number. | |
bool | csNaN (float f) |
Checks if a floating point value is not-a-number. | |
bool | csNormal (double d) |
Checks if a double-precision floating point value is normal. | |
bool | csNormal (float f) |
Checks if a floating point value is normal (not infinite or nan). |
Define Documentation
#define CS_BOUNDINGBOX_MAXVALUE 1000000000. |
#define MAX_OUTPUT_VERTICES 64 |
Typedef Documentation
typedef bool( csKDTreeVisitFunc)(csKDTree *treenode, void *userdata, uint32 timestamp, uint32 &frustum_mask) |
A callback function for visiting a KD-tree node.
If this function returns true the traversal will continue. Otherwise Front2Back() will stop.
This function is itself responsible for calling Distribute() on the given treenode to ensure that the objects in this node are properly distributed to the children. If the function doesn't want or need this functionality it doesn't have to do Distribute().
If this function decides to process the given node then it is also responsible for checking the timestamp of every child in this node with the timestamp given to this function. If this timestamp is different the child has not been processed before. This function should then update the timestamp of the child. If this is not done then some objects will be encountered multiple times. In some cases this may not be a problem or even desired.
'frustum_mask' can be modified by this function to reduce the number of plane tests (for frustum culling) that have to occur for children of this node.
Enumeration Type Documentation
anonymous enum |
- Enumerator:
CS_TRIMESH_CLOSED The object is closed, if set.
With closed we mean that if you run a beam of light through the object (through any point outside the mesh to another point outside) it will always hit an even amount of faces (one going in, and one going out). If you don't set CLOSED or NOTCLOSED then the state is not known and the engine may test it if it wants.
CS_TRIMESH_NOTCLOSED The object is not closed, if set.
This is the opposite of CS_TRIMESH_CLOSED. Use this flag if you are absolutely certain that the object is not closed. The engine will not attempt to test if the object is really closed or not. If you don't set CLOSED or NOTCLOSED then the state is not known and the engine may test it if it wants.
CS_TRIMESH_CONVEX The object is convex, if set.
With convex we mean that if you run a beam of light through the object (through any point outside the mesh to another point outside) it will always hit exactly two faces (one going in, and one going out). If you don't * set CONVEX or NOTCONVEX then the state is not known and the engine may test it if it wants.
CS_TRIMESH_NOTCONVEX The object is not convex, if set.
This is the opposite of CS_TRIMESH_CONVEX. Use this flag if you are absolutely certain that the object is not convex. The engine will not attempt to test if the object is really convex or not. If you don't set CONVEX or NOTCONVEX then the state is not known and the engine may test it if it wants.
CS_TRIMESH_DEFORMABLE Set this flag if the triangle mesh is deformable.
anonymous enum |
Values returned by csPoly3D::Classify.
anonymous enum |
Constants for axes.
Can also be used as indices to csVector2::operator[], csVector3::operator[] and csVector4::operator[] for more readability.
anonymous enum |
anonymous enum |
- Enumerator:
anonymous enum |
- Enumerator:
anonymous enum |
anonymous enum |
- Enumerator:
anonymous enum |
anonymous enum |
anonymous enum |
Function Documentation
T csClamp | ( | const T & | a, | |
T | max, | |||
T | min | |||
) | [inline] |
bool csFinite | ( | double | d | ) |
Checks if a double-precision floating point value is finite.
- Deprecated:
- Deprecated in 2.0. Use CS::IsFinite() instead.
bool csFinite | ( | float | f | ) |
Checks if a floating point value is finite.
- Deprecated:
- Deprecated in 2.0. Use CS::IsFinite() instead.
T csLerp | ( | const T & | a, | |
const T & | b, | |||
const Tfactor & | f | |||
) | [inline] |
const T& csMax | ( | const T & | a, | |
const T & | b | |||
) | [inline] |
const T& csMin | ( | const T & | a, | |
const T & | b | |||
) | [inline] |
bool csNaN | ( | double | d | ) |
Checks if a double-precision floating point value is not-a-number.
- Deprecated:
- Deprecated in 2.0. Use CS::IsNaN() instead.
bool csNaN | ( | float | f | ) |
Checks if a floating point value is not-a-number.
- Deprecated:
- Deprecated in 2.0. Use CS::IsNan() instead.
bool csNormal | ( | double | d | ) |
Checks if a double-precision floating point value is normal.
- Deprecated:
- Deprecated in 2.0. Usage not recommended as results are inconsistent across platforms.
bool csNormal | ( | float | f | ) |
Checks if a floating point value is normal (not infinite or nan).
- Deprecated:
- Deprecated in 2.0. Usage not recommended as results are inconsistent across platforms.
T csSmoothStep | ( | const T & | a, | |
T | max, | |||
T | min | |||
) | [inline] |
void csSort | ( | T & | a, | |
T & | b, | |||
U & | x, | |||
U & | y | |||
) | [inline] |
void csSort | ( | T & | a, | |
T & | b | |||
) | [inline] |
Generated for Crystal Space 2.0 by doxygen 1.6.1