CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Geometry utilities


Compounds

class  csBox2
 A bounding box in 2D space. 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  csCatmullRomSpline
 A CatmullRom spline. 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  iClipper2D
 This interfaces represents a 2D clipper for polygons. More...

class  csCubicSpline
 A cubic spline. More...

class  csDefaultVertexArrayPool
 This is a default implementation of csVertexArrayPool. 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  csDVector3
 A 3D vector. More...

class  csDVector4
 A 3D vector. More...

class  csFrustum
 A general frustum. More...

class  csGeomDebugHelper
 This is a class that does unit testing (and other debug stuff) for most of csgeom classes. 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  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...

struct  csMeshedPolygon
 A polygon. More...

class  csOBB
 Oriented bounding box (OBB). More...

class  csOBBFrozen
 Version of the csOBB with frozen corners (for optimization purposes). More...

struct  iObjectModel
 This interface represents data related to some geometry in object space. More...

class  csObjectModel
 Helper class to make it easier to implement iObjectModel in mesh objects. More...

struct  iObjectModelListener
 Implement this class if you're interested in hearing about when the object model changes. More...

class  csOrthoTransform
 A class which defines a reversible transformation from one coordinate system to another by maintaining an inverse transformation matrix. More...

struct  iPath
 A path in 3D. More...

class  csPath
 A path in 3D. More...

class  csPlane2
 A plane in 2D space. More...

class  csPlane3
 A plane in 3D space. More...

struct  csPoint
 A 2D point object. More...

class  csPoly2D
 The following class represents a general 2D polygon with a bounding box. More...

class  csPoly2DEdges
 The following class represents a general 2D polygon represented with edges instead of vertices. More...

class  csPoly2DEdgesPool
 This is an object pool which holds objects of type csPoly2DEdges. 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 csPolygon2D. 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...

struct  iPolygonMesh
 This interface reprents a mesh of polygons. More...

class  csPolygonMesh
 A convenience polygon mesh implementation that you can feed with vertices and polygons from another source. More...

class  csPolygonMeshBox
 A convenience polygon mesh implementation that represents a cube. More...

struct  csPolygonMeshEdge
 A definition of one edge. More...

class  csPolygonMeshTools
 A set of tools to work with iPolygonMesh instances. More...

class  csPolyIndexed
 The following class represents a general polygon. More...

class  csPooledVertexArrayPool
 This is another implementation of csVertexArrayPool. 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  csSphere
 This class represents a sphere. More...

class  csSpline
 A spline superclass. More...

class  csSquaredDist
 Some functions to perform squared distance calculations. More...

class  csStackedVertexArrayPool
 This is another implementation of csVertexArrayPool. More...

class  csSubRect
 Sub-rectangle. More...

class  csSubRectangles
 A class managing allocations of sub-rectangles. More...

class  csSubRectangles2
 A class managing allocations of sub-rectangles. More...

class  csTesselator
 A general purpose tesselation mechanism. More...

class  csTextureTrans
 This is a static class which encapsulates a few functions that can transform texture information into a texture matrix/vector. More...

class  csTransform
 A class which defines a transformation from one coordinate system to another. More...

struct  csTriangle
 A triangle. 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. More...

class  csVertexArrayPool
 This is a generalized vertex array pool. 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...


Corner indices

For csBox2::GetCorner().

#define CS_BOX_CORNER_xy   0
 min X, min Y. More...

#define CS_BOX_CORNER_xY   1
 min X, max Y. More...

#define CS_BOX_CORNER_Xy   2
 max X, min Y. More...

#define CS_BOX_CORNER_XY   3
 max X, max Y. More...


Indices of edges for cxBox2.

Index e+1 is opposite edge of e (with e even).

#define CS_BOX_EDGE_xy_Xy   0
 from min X, min Y to max X, min Y. More...

#define CS_BOX_EDGE_Xy_xy   1
 from max X, min Y to min X, min Y. More...

#define CS_BOX_EDGE_Xy_XY   2
 from max X, min Y to max X, max Y. More...

#define CS_BOX_EDGE_XY_Xy   3
 from max X, max Y to max X, min Y. More...

#define CS_BOX_EDGE_XY_xY   4
 from max X, max Y to min X, max Y. More...

#define CS_BOX_EDGE_xY_XY   5
 from min X, max Y to max X, max Y. More...

#define CS_BOX_EDGE_xY_xy   6
 from min X, max Y to min X, min Y. More...

#define CS_BOX_EDGE_xy_xY   7
 from min X, min Y to min X, max Y. More...


Indices of corner vertices for csBox3.

Used by csBox3::GetCorner().

#define CS_BOX_CORNER_xyz   0
 min X, min Y, min Z. More...

#define CS_BOX_CORNER_xyZ   1
 min X, min Y, max Z. More...

#define CS_BOX_CORNER_xYz   2
 min X, max Y, min Z. More...

#define CS_BOX_CORNER_xYZ   3
 min X, max Y, max Z. More...

#define CS_BOX_CORNER_Xyz   4
 min X, min Y, min Z. More...

#define CS_BOX_CORNER_XyZ   5
 max X, min Y, max Z. More...

#define CS_BOX_CORNER_XYz   6
 max X, max Y, min Z. More...

#define CS_BOX_CORNER_XYZ   7
 max X, max Y, max Z. More...


Indices of faces for csBox3.

Used by csBox3::GetSide().

#define CS_BOX_SIDE_x   0
 min X. More...

#define CS_BOX_SIDE_X   1
 max X. More...

#define CS_BOX_SIDE_y   2
 min Y. More...

#define CS_BOX_SIDE_Y   3
 max Y. More...

#define CS_BOX_SIDE_z   4
 min Z. More...

#define CS_BOX_SIDE_Z   5
 max Z. More...

#define CS_BOX_INSIDE   6
 inside. More...


Indices of edges for cxBox3.

Index e+1 is opposite edge of e (with e even).

#define CS_BOX_EDGE_Xyz_xyz   0
 from max X, min Y, min Z to min X, min Y, min Z. More...

#define CS_BOX_EDGE_xyz_Xyz   1
 from min X, min Y, min Z to max X, min Y, min Z. More...

#define CS_BOX_EDGE_xyz_xYz   2
 from min X, min Y, min Z to min X, max Y, min Z. More...

#define CS_BOX_EDGE_xYz_xyz   3
 from min X, max Y, min Z to min X, min Y, min Z. More...

#define CS_BOX_EDGE_xYz_XYz   4
 from min X, max Y, min Z to max X, max Y, min Z. More...

#define CS_BOX_EDGE_XYz_xYz   5
 from max X, max Y, min Z to min X, max Y, min Z. More...

#define CS_BOX_EDGE_XYz_Xyz   6
 from max X, max Y, min Z to max X, min Y, min Z. More...

#define CS_BOX_EDGE_Xyz_XYz   7
 from max X, min Y, min Z to max X, max Y, min Z. More...

#define CS_BOX_EDGE_Xyz_XyZ   8
 from max X, min Y, min Z to max X, min Y, max Z. More...

#define CS_BOX_EDGE_XyZ_Xyz   9
 from max X, min Y, max Z to max X, min Y, min Z. More...

#define CS_BOX_EDGE_XyZ_XYZ   10
 from max X, min Y, max Z to max X, max Y, max Z. More...

#define CS_BOX_EDGE_XYZ_XyZ   11
 from max X, max Y, max Z to max X, min Y, max Z. More...

#define CS_BOX_EDGE_XYZ_XYz   12
 from max X, max Y, max Z to max X, max Y, min Z. More...

#define CS_BOX_EDGE_XYz_XYZ   13
 from max X, max Y, min Z to max X, max Y, max Z. More...

#define CS_BOX_EDGE_XYZ_xYZ   14
 from max X, max Y, max Z to min X, max Y, max Z. More...

#define CS_BOX_EDGE_xYZ_XYZ   15
 from min X, max Y, max Z to max X, max Y, max Z. More...

#define CS_BOX_EDGE_xYZ_xYz   16
 from min X, max Y, max Z to min X, max Y, min Z. More...

#define CS_BOX_EDGE_xYz_xYZ   17
 from min X, max Y, min Z to min X, max Y, max Z. More...

#define CS_BOX_EDGE_xYZ_xyZ   18
 from min X, max Y, max Z to min X, min Y, max Z. More...

#define CS_BOX_EDGE_xyZ_xYZ   19
 from min X, min Y, max Z to min X, max Y, max Z. More...

#define CS_BOX_EDGE_xyZ_xyz   20
 from min X, min Y, max Z to min X, min Y, min Z. More...

#define CS_BOX_EDGE_xyz_xyZ   21
 from min X, min Y, min Z to min X, min Y, max Z. More...

#define CS_BOX_EDGE_xyZ_XyZ   22
 from min X, min Y, max Z to max X, min Y, max Z. More...

#define CS_BOX_EDGE_XyZ_xyZ   23
 from max X, min Y, max Z to min X, min Y, max Z. More...


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.

#define CS_FRUST_OUTSIDE   0
 The polygon is fully outside frustum. More...

#define CS_FRUST_INSIDE   1
 The polygon is fully inside frustum. More...

#define CS_FRUST_COVERED   2
 The polygon fully covers the frustum. More...

#define CS_FRUST_PARTIAL   3
 The polygon is partially inside frustum. More...


Clipper return codes

The clipper routines return one of CS_CLIP_OUTSIDE, CS_CLIP_INSIDE, CS_CLIP_CLIPPED so that we can distinguish between the cases when input polygon is completely outside the clipping polygon (thus it is not visible), completely inside the clipping polygon (thus it has not changed) and partially outside, partially inside (thus it was clipped).

#define CS_CLIP_OUTSIDE   0
 The input polygon is completely outside of clipper polygon. More...

#define CS_CLIP_INSIDE   1
 The input polygon is completely inside (thus has not changed). More...

#define CS_CLIP_CLIPPED   2
 The input polygon was partially inside, partially outside. More...


Additional vertex informations

#define CS_VERTEX_ORIGINAL   0
 The output vertex is one of the input vertices. More...

#define CS_VERTEX_ONEDGE   1
 The output vertex is located on one of the edges of the original polygon. More...

#define CS_VERTEX_INSIDE   2
 The output vertex is located somewhere inside the original polygon. More...


Bounding box types

#define CS_BBOX_NORMAL   0
 For iObjectModel::GetObjectBoundingBox() get a normal bounding box which may or may not be recalculated depending on the changing geometry of the object. More...

#define CS_BBOX_ACCURATE   1
 For iObjectModel::GetObjectBoundingBox() get a totally accurate bounding box. More...

#define CS_BBOX_MAX   2
 For iObjectModel::GetObjectBoundingBox() get the maximum bounding box that this object will ever use. More...


flags for iPolygonMesh.

#define CS_POLYMESH_CLOSED   1
 If this flag is set then the object is closed. More...

#define CS_POLYMESH_NOTCLOSED   2
 If this flag is set then the object is not closed. More...

#define CS_POLYMESH_CONVEX   4
 If this flag is set then the object is convex. More...

#define CS_POLYMESH_NOTCONVEX   8
 If this flag is set then the object is not convex. More...

#define CS_POLYMESH_DEFORMABLE   16
 Set this flag if the polygon mesh is deformable. More...

#define CS_POLYMESH_TRIANGLEMESH   32
 Set this flag if the native or desired format of the polygon mesh is a triangle mesh. More...


Defines

#define CS_BOUNDINGBOX_MAXVALUE   1000000000.
 The maximum value that a coordinate in the bounding box can use. More...

#define MAX_OUTPUT_VERTICES   64
 Maximal number of vertices in output (clipped) polygons. More...


Typedefs

typedef void(* csAAPFCBPixel )(int x, int y, float area, void *arg)
 "Draw one pixel" callback. More...

typedef void(* csAAPFCBBox )(int x, int y, int w, int h, void *arg)
 "Draw a box" callback. More...


Functions

void BuildSqrtTable ()
 declare table of square roots. More...

float FastSqrt (float n)
 fast square root, looks up table build by BuildSqrtTable(). More...

void csAntialiasedPolyFill (csVector2 *iVertices, int iVertexCount, void *iArg, csAAPFCBPixel iPutPixel, csAAPFCBBox iDrawBox=0)
 This function takes a 2D polygon and splits it against a integer grid into many sub-polygons. More...


Define Documentation

#define CS_BBOX_ACCURATE   1
 

For iObjectModel::GetObjectBoundingBox() get a totally accurate bounding box.

Not all plugins support this. Some will just return a normal bounding box.

Definition at line 51 of file igeom/objmodel.h.

#define CS_BBOX_MAX   2
 

For iObjectModel::GetObjectBoundingBox() get the maximum bounding box that this object will ever use.

For objects that don't have a preset maximum bounding box this just has to be a reasonable estimate of a realistic maximum bounding box.

Definition at line 58 of file igeom/objmodel.h.

#define CS_BBOX_NORMAL   0
 

For iObjectModel::GetObjectBoundingBox() get a normal bounding box which may or may not be recalculated depending on the changing geometry of the object.

Definition at line 45 of file igeom/objmodel.h.

#define CS_BOUNDINGBOX_MAXVALUE   1000000000.
 

The maximum value that a coordinate in the bounding box can use.

This is considered the 'infinity' value used for empty bounding boxes.

Definition at line 42 of file box.h.

Referenced by csBox2::csBox2, csBox3::csBox3, csBox3::StartBoundingBox, and csBox2::StartBoundingBox.

#define CS_BOX_CORNER_XY   3
 

max X, max Y.

Definition at line 54 of file box.h.

#define CS_BOX_CORNER_Xy   2
 

max X, min Y.

Definition at line 52 of file box.h.

#define CS_BOX_CORNER_xY   1
 

min X, max Y.

Definition at line 50 of file box.h.

#define CS_BOX_CORNER_xy   0
 

min X, min Y.

Definition at line 48 of file box.h.

#define CS_BOX_CORNER_XYZ   7
 

max X, max Y, max Z.

Definition at line 413 of file box.h.

#define CS_BOX_CORNER_XYz   6
 

max X, max Y, min Z.

Definition at line 411 of file box.h.

#define CS_BOX_CORNER_XyZ   5
 

max X, min Y, max Z.

Definition at line 409 of file box.h.

#define CS_BOX_CORNER_Xyz   4
 

min X, min Y, min Z.

Definition at line 407 of file box.h.

#define CS_BOX_CORNER_xYZ   3
 

min X, max Y, max Z.

Definition at line 405 of file box.h.

#define CS_BOX_CORNER_xYz   2
 

min X, max Y, min Z.

Definition at line 403 of file box.h.

#define CS_BOX_CORNER_xyZ   1
 

min X, min Y, max Z.

Definition at line 401 of file box.h.

#define CS_BOX_CORNER_xyz   0
 

min X, min Y, min Z.

Definition at line 399 of file box.h.

#define CS_BOX_EDGE_xy_xY   7
 

from min X, min Y to min X, max Y.

Definition at line 76 of file box.h.

#define CS_BOX_EDGE_xY_xy   6
 

from min X, max Y to min X, min Y.

Definition at line 74 of file box.h.

#define CS_BOX_EDGE_xY_XY   5
 

from min X, max Y to max X, max Y.

Definition at line 72 of file box.h.

#define CS_BOX_EDGE_XY_xY   4
 

from max X, max Y to min X, max Y.

Definition at line 70 of file box.h.

#define CS_BOX_EDGE_XY_Xy   3
 

from max X, max Y to max X, min Y.

Definition at line 68 of file box.h.

#define CS_BOX_EDGE_Xy_XY   2
 

from max X, min Y to max X, max Y.

Definition at line 66 of file box.h.

#define CS_BOX_EDGE_Xy_xy   1
 

from max X, min Y to min X, min Y.

Definition at line 64 of file box.h.

#define CS_BOX_EDGE_xy_Xy   0
 

from min X, min Y to max X, min Y.

Definition at line 62 of file box.h.

#define CS_BOX_EDGE_XyZ_xyZ   23
 

from max X, min Y, max Z to min X, min Y, max Z.

Definition at line 487 of file box.h.

#define CS_BOX_EDGE_xyZ_XyZ   22
 

from min X, min Y, max Z to max X, min Y, max Z.

Definition at line 485 of file box.h.

#define CS_BOX_EDGE_xyz_xyZ   21
 

from min X, min Y, min Z to min X, min Y, max Z.

Definition at line 483 of file box.h.

#define CS_BOX_EDGE_xyZ_xyz   20
 

from min X, min Y, max Z to min X, min Y, min Z.

Definition at line 481 of file box.h.

#define CS_BOX_EDGE_xyZ_xYZ   19
 

from min X, min Y, max Z to min X, max Y, max Z.

Definition at line 479 of file box.h.

#define CS_BOX_EDGE_xYZ_xyZ   18
 

from min X, max Y, max Z to min X, min Y, max Z.

Definition at line 477 of file box.h.

#define CS_BOX_EDGE_xYz_xYZ   17
 

from min X, max Y, min Z to min X, max Y, max Z.

Definition at line 475 of file box.h.

#define CS_BOX_EDGE_xYZ_xYz   16
 

from min X, max Y, max Z to min X, max Y, min Z.

Definition at line 473 of file box.h.

#define CS_BOX_EDGE_xYZ_XYZ   15
 

from min X, max Y, max Z to max X, max Y, max Z.

Definition at line 471 of file box.h.

#define CS_BOX_EDGE_XYZ_xYZ   14
 

from max X, max Y, max Z to min X, max Y, max Z.

Definition at line 469 of file box.h.

#define CS_BOX_EDGE_XYz_XYZ   13
 

from max X, max Y, min Z to max X, max Y, max Z.

Definition at line 467 of file box.h.

#define CS_BOX_EDGE_XYZ_XYz   12
 

from max X, max Y, max Z to max X, max Y, min Z.

Definition at line 465 of file box.h.

#define CS_BOX_EDGE_XYZ_XyZ   11
 

from max X, max Y, max Z to max X, min Y, max Z.

Definition at line 463 of file box.h.

#define CS_BOX_EDGE_XyZ_XYZ   10
 

from max X, min Y, max Z to max X, max Y, max Z.

Definition at line 461 of file box.h.

#define CS_BOX_EDGE_XyZ_Xyz   9
 

from max X, min Y, max Z to max X, min Y, min Z.

Definition at line 459 of file box.h.

#define CS_BOX_EDGE_Xyz_XyZ   8
 

from max X, min Y, min Z to max X, min Y, max Z.

Definition at line 457 of file box.h.

#define CS_BOX_EDGE_Xyz_XYz   7
 

from max X, min Y, min Z to max X, max Y, min Z.

Definition at line 455 of file box.h.

#define CS_BOX_EDGE_XYz_Xyz   6
 

from max X, max Y, min Z to max X, min Y, min Z.

Definition at line 453 of file box.h.

#define CS_BOX_EDGE_XYz_xYz   5
 

from max X, max Y, min Z to min X, max Y, min Z.

Definition at line 451 of file box.h.

#define CS_BOX_EDGE_xYz_XYz   4
 

from min X, max Y, min Z to max X, max Y, min Z.

Definition at line 449 of file box.h.

#define CS_BOX_EDGE_xYz_xyz   3
 

from min X, max Y, min Z to min X, min Y, min Z.

Definition at line 447 of file box.h.

#define CS_BOX_EDGE_xyz_xYz   2
 

from min X, min Y, min Z to min X, max Y, min Z.

Definition at line 445 of file box.h.

#define CS_BOX_EDGE_xyz_Xyz   1
 

from min X, min Y, min Z to max X, min Y, min Z.

Definition at line 443 of file box.h.

#define CS_BOX_EDGE_Xyz_xyz   0
 

from max X, min Y, min Z to min X, min Y, min Z.

Definition at line 441 of file box.h.

#define CS_BOX_INSIDE   6
 

inside.

Definition at line 433 of file box.h.

#define CS_BOX_SIDE_X   1
 

max X.

Definition at line 423 of file box.h.

#define CS_BOX_SIDE_x   0
 

min X.

Definition at line 421 of file box.h.

#define CS_BOX_SIDE_Y   3
 

max Y.

Definition at line 427 of file box.h.

#define CS_BOX_SIDE_y   2
 

min Y.

Definition at line 425 of file box.h.

#define CS_BOX_SIDE_Z   5
 

max Z.

Definition at line 431 of file box.h.

#define CS_BOX_SIDE_z   4
 

min Z.

Definition at line 429 of file box.h.

#define CS_CLIP_CLIPPED   2
 

The input polygon was partially inside, partially outside.

Definition at line 50 of file clip2d.h.

#define CS_CLIP_INSIDE   1
 

The input polygon is completely inside (thus has not changed).

Definition at line 48 of file clip2d.h.

#define CS_CLIP_OUTSIDE   0
 

The input polygon is completely outside of clipper polygon.

Definition at line 46 of file clip2d.h.

#define CS_FRUST_COVERED   2
 

The polygon fully covers the frustum.

Definition at line 44 of file frustum.h.

#define CS_FRUST_INSIDE   1
 

The polygon is fully inside frustum.

Definition at line 42 of file frustum.h.

#define CS_FRUST_OUTSIDE   0
 

The polygon is fully outside frustum.

Definition at line 40 of file frustum.h.

#define CS_FRUST_PARTIAL   3
 

The polygon is partially inside frustum.

Definition at line 46 of file frustum.h.

#define CS_POLYMESH_CLOSED   1
 

If this flag is set then the object is closed.

With closed we mean that if you run a beam of light through the object it will always hit an even amount of faces (one going in, and one going out).

Definition at line 38 of file igeom/polymesh.h.

#define CS_POLYMESH_CONVEX   4
 

If this flag is set then the object is convex.

With convex we mean that if you run a beam of light through the object it will always hit an two faces (one going in, and one going out).

Definition at line 55 of file igeom/polymesh.h.

#define CS_POLYMESH_DEFORMABLE   16
 

Set this flag if the polygon mesh is deformable.

Definition at line 70 of file igeom/polymesh.h.

#define CS_POLYMESH_NOTCLOSED   2
 

If this flag is set then the object is not closed.

This is the opposite of CS_POLYMESH_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.

Definition at line 48 of file igeom/polymesh.h.

#define CS_POLYMESH_NOTCONVEX   8
 

If this flag is set then the object is not convex.

This is the opposite of CS_POLYMESH_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.

Definition at line 65 of file igeom/polymesh.h.

#define CS_POLYMESH_TRIANGLEMESH   32
 

Set this flag if the native or desired format of the polygon mesh is a triangle mesh.

If this flag is set it means that GetTriangles() is very cheap. The presence of this flag does not mean that GetPolygons() will not work.

Definition at line 78 of file igeom/polymesh.h.

#define CS_VERTEX_INSIDE   2
 

The output vertex is located somewhere inside the original polygon.

Definition at line 79 of file clip2d.h.

#define CS_VERTEX_ONEDGE   1
 

The output vertex is located on one of the edges of the original polygon.

Definition at line 77 of file clip2d.h.

#define CS_VERTEX_ORIGINAL   0
 

The output vertex is one of the input vertices.

Definition at line 75 of file clip2d.h.

#define MAX_OUTPUT_VERTICES   64
 

Maximal number of vertices in output (clipped) polygons.

Definition at line 34 of file clip2d.h.


Typedef Documentation

typedef void(* csAAPFCBBox)(int x, int y, int w, int h, void *arg)
 

"Draw a box" callback.

Definition at line 42 of file polyaa.h.

typedef void(* csAAPFCBPixel)(int x, int y, float area, void *arg)
 

"Draw one pixel" callback.

We have two types of callback: one for "drawing a pixel", the area of the pixel is passed to the callback routine. The second routine is for "drawing a box", the area of every "pixel" is always 1.0.

Definition at line 40 of file polyaa.h.


Function Documentation

void BuildSqrtTable  
 

declare table of square roots.

void csAntialiasedPolyFill csVector2   iVertices,
int    iVertexCount,
void *    iArg,
csAAPFCBPixel    iPutPixel,
csAAPFCBBox    iDrawBox = 0
 

This function takes a 2D polygon and splits it against a integer grid into many sub-polygons.

Then the area of each subpolygon is computed and a callback function is called, with the area of sub-polygon passed as argument.

float FastSqrt float    n
 

fast square root, looks up table build by BuildSqrtTable().


Generated for Crystal Space by doxygen 1.2.14