Classes | |
| class | cAABB< T > |
| Axis aligned bounding box template class interface. More... | |
| class | cBoundingVolumeAABB |
| struct | BufferCache< T, TDERIVED > |
| struct | BufferCacheVertex< TVERTEX > |
| struct | BufferCacheIndex |
| struct | sDampedSpring< T, TF, BASE, TREF > |
| Damped spring helper template. More... | |
| struct | sDampedSpringPosition< T, TF, BASE, TREF > |
| Damped spring with position helper template. More... | |
| class | cEllipsoid< T > |
| Ellipsoid template class. More... | |
| struct | sFVFGenConfig |
| FVF Generator configuration class. More... | |
| class | cFVFGen< fvf > |
| Metaprogram that generates a vertex structure according to the specified Flexible Vertex Format code. This implementation handles up to 8 texture coordinate sets. More... | |
| struct | sPackMeshRef |
| Pack mesh reference. More... | |
| struct | sPackMesh |
| Pack mesh. More... | |
| class | cMatrixStack< T, B > |
| class | cPolygon |
| class | cSphere< T > |
| Sphere template class. More... | |
| struct | sGraphicsStack< T > |
| struct | sGraphicsFixedMatrix |
| struct | sGraphicsStates |
| struct | sGraphicsRT |
| struct | sGraphicsAllStates |
| struct | sVertexArrayInitializer |
| Large vertex array initializer. More... | |
| class | cWidgetSinkImpl< T > |
Macros | |
| #define | TRACE_BUFFER_CACHE(X) |
| #define | niVertexFormat(FVF) |
| Macro to define a vertex format. More... | |
Typedefs | |
| typedef cAABB< tF32 > | cAABBf |
| Float AABB. More... | |
| typedef cAABB< tF64 > | cAABBd |
| Double AABB. More... | |
| typedef sDampedSpring< tF32, tF32, cUnknown, tF32 > | sDampedSpring1f |
| 1D spring. More... | |
| typedef sDampedSpring< tF32, tF32, cIUnknownImpl < iDampedSpring1 >, tF32 > | sDampedSpring1fImpl |
| 1D spring, implements the ni::iDampedSpring1 interface. More... | |
| typedef sDampedSpring< sVec2f, tF32 > | sDampedSpring2f |
| 2D spring. More... | |
| typedef sDampedSpring< sVec2f, tF32, cIUnknownImpl < iDampedSpring2 > > | sDampedSpring2fImpl |
| 2D spring, implements the ni::iDampedSpring2 interface. More... | |
| typedef sDampedSpring< sVec3f, tF32 > | sDampedSpring3f |
| 3D spring. More... | |
| typedef sDampedSpring< sVec3f, tF32, cIUnknownImpl < iDampedSpring3 > > | sDampedSpring3fImpl |
| 3D spring, implements the ni::iDampedSpring3 interface. More... | |
| typedef sDampedSpring< sVec4f, tF32 > | sDampedSpring4f |
| 4D spring. More... | |
| typedef sDampedSpring< sVec4f, tF32, cIUnknownImpl < iDampedSpring4 > > | sDampedSpring4fImpl |
| 4D spring, implements the ni::iDampedSpring4 interface. More... | |
| typedef sDampedSpringPosition < tF32, tF32, cUnknown, tF32 > | sDampedSpringPosition1f |
| 1D spring position. More... | |
| typedef sDampedSpringPosition < tF32, tF32, cIUnknownImpl < iDampedSpringPosition1, eIUnknownImplFlags_DontInherit1, iDampedSpring1 >, tF32 > | sDampedSpringPosition1fImpl |
| 1D spring position, implements the ni::iDampedSpringPosition1 interface. More... | |
| typedef sDampedSpringPosition < sVec2f, tF32 > | sDampedSpringPosition2f |
| 2D spring position. More... | |
| typedef sDampedSpringPosition < sVec2f, tF32, cIUnknownImpl < iDampedSpringPosition2, eIUnknownImplFlags_DontInherit1, iDampedSpring2 > > | sDampedSpringPosition2fImpl |
| 2D spring position, implements the ni::iDampedSpringPosition2 interface. More... | |
| typedef sDampedSpringPosition < sVec3f, tF32 > | sDampedSpringPosition3f |
| 3D spring position. More... | |
| typedef sDampedSpringPosition < sVec3f, tF32, cIUnknownImpl < iDampedSpringPosition3, eIUnknownImplFlags_DontInherit1, iDampedSpring3 > > | sDampedSpringPosition3fImpl |
| 3D spring position, implements the ni::iDampedSpringPosition3 interface. More... | |
| typedef sDampedSpringPosition < sVec4f, tF32 > | sDampedSpringPosition4f |
| 4D spring position. More... | |
| typedef sDampedSpringPosition < sVec4f, tF32, cIUnknownImpl < iDampedSpringPosition4, eIUnknownImplFlags_DontInherit1, iDampedSpring4 > > | sDampedSpringPosition4fImpl |
| 4D spring position, implements the ni::iDampedSpringPosition4 interface. More... | |
| typedef cEllipsoid< tF32 > | cEllipsoidf |
| Float Ellispoid. More... | |
| typedef astl::vector< cEllipsoidf > | tEllipsoidfVec |
| Vector of Float Ellipsoid. More... | |
| typedef tEllipsoidfVec::iterator | tEllipsoidfVecIt |
| Vector of Float Ellipsoid iterator. More... | |
| typedef tEllipsoidfVec::const_iterator | tEllipsoidfVecCIt |
| Vector of Float Ellipsoid constant iterator. More... | |
| typedef cEllipsoid< tF64 > | cEllipsoidd |
| Double Ellispoid. More... | |
| typedef astl::vector< cEllipsoidd > | tEllipsoiddVec |
| Vector of Double Ellipsoid. More... | |
| typedef tEllipsoiddVec::iterator | tEllipsoiddVecIt |
| Vector of Double Ellipsoid iterator. More... | |
| typedef tEllipsoiddVec::const_iterator | tEllipsoiddVecCIt |
| Vector of Double Ellipsoid constant iterator. More... | |
| typedef astl::vector< sPackMesh > | tPackMeshVec |
| Pack mesh vector. More... | |
| typedef cMatrixStack< tF32 > | cMatrixStackf |
| tF32 matrix stack. More... | |
| typedef cMatrixStack< tF64 > | cMatrixStackd |
| tF64 matrix stack. More... | |
| typedef cSphere< tF32 > | cSpheref |
| Float Sphere. More... | |
| typedef cSphere< tF64 > | cSphered |
| Double Sphere. More... | |
| typedef sGraphicsStack < sGraphicsFixedMatrix > | tGraphicsStackFixedMatrix |
| typedef sGraphicsStack < sGraphicsStates > | tGraphicsStackStates |
| typedef sGraphicsStack < sGraphicsRT > | tGraphicsStackRT |
| typedef sGraphicsStack < sGraphicsAllStates > | tGraphicsStackAllStates |
Functions | |
| tPtr | BitmapScanline (iBitmap2D *bmp, int y, int x=0) |
| template<typename T > | |
| sVec3< T > & | ColorScaleToUnit (sVec3< T > &aOut, const sVec3< T > &aCol) |
| template<class T > | |
| sVec3< T > & | ColorAdjustContrast (sVec3< T > &Out, const sVec3< T > &C, T c) |
| template<class T > | |
| sVec3< T > & | ColorAdjustSaturation (sVec3< T > &Out, const sVec3< T > &C, T s) |
| template<class T > | |
| sVec3< T > & | ColorGrey (sVec3< T > &Out, const sVec3< T > &C) |
| template<class T > | |
| sVec3< T > & | ColorBlackWhite (sVec3< T > &Out, const sVec3< T > &C, T s) |
| template<class T > | |
| sVec3< T > & | ColorGammaCorrect (sVec3< T > &Out, tF32 afFactor, const sVec3< T > *pSrc=NULL) |
| template<typename T > | |
| T | ColorLuminance (const sVec3< T > &aColor, const sVec3f &avLuminanceDistribution=kvColorLuminanceR21G71B07) |
| template<class T > | |
| sVec4< T > & | ColorAdjustContrast (sVec4< T > &Out, const sVec4< T > &C, T c) |
| template<class T > | |
| sVec4< T > & | ColorAdjustSaturation (sVec4< T > &Out, const sVec4< T > &C, T s) |
| template<class T > | |
| sVec4< T > & | ColorGrey (sVec4< T > &Out, const sVec4< T > &C) |
| template<class T > | |
| sVec4< T > & | ColorBlackWhite (sVec4< T > &Out, const sVec4< T > &C, T s) |
| template<typename T > | |
| T | ColorLuminance (const sVec4< T > &aColor, const sVec3f &avLuminanceDistribution=kvColorLuminanceR21G71B07) |
| template<typename T > | |
| sVec4< T > | ColorConvert_XYZ_RGB (const sVec4< T > &aXYZ, const sVec4< T > &aXYZRef) |
| Convert an XYZ to a RGB color. More... | |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_XYZ (const sVec4< T > &aRGB, const sVec4< T > &aXYZRef) |
| Convert a RGB color to a XYZ color. More... | |
| template<typename T > | |
| sVec4< T > | ColorConvert_XYZ_Yxy (const sVec4< T > &aXYZ) |
| Convert a normalize XYZ to Yxy. More... | |
| template<typename T > | |
| sVec4< T > | ColorConvert_Yxy_XYZ (const sVec4< T > &aYxy) |
| Convert a Yxy to XYZ. More... | |
| template<typename T > | |
| sVec4< T > | ColorConvert_XYZ_HunterLab (const sVec4< T > &aXYZ) |
| template<typename T > | |
| sVec4< T > | ColorConvert_HunterLab_XYZ (const sVec4< T > &aHLab) |
| template<typename T > | |
| sVec4< T > | ColorConvert_XYZ_CIELab (const sVec4< T > &aXYZ, const sVec4< T > &aXYZRef) |
| template<typename T > | |
| sVec4< T > | ColorConvert_CIELab_XYZ (const sVec4< T > &aCIELab, const sVec4< T > &aXYZRef) |
| template<typename T > | |
| sVec4< T > | ColorConvert_CIELab_CIELCH (const sVec4< T > &aCIELab) |
| template<typename T > | |
| sVec4< T > | ColorConvert_CIELCH_CIELab (const sVec4< T > &aCIELCH) |
| template<typename T > | |
| sVec4< T > | ColorConvert_XYZ_CIELuv (const sVec4< T > &aXYZ, const sVec4< T > &aXYZRef) |
| template<typename T > | |
| sVec4< T > | ColorConvert_CIELuv_XYZ (const sVec4< T > &aCIELuv, const sVec4< T > &aXYZRef) |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_HSL (const sVec4< T > &aRGB) |
| template<typename T > | |
| T | Hue_2_RGB (T v1, T v2, T vH) |
| template<typename T > | |
| sVec4< T > | ColorConvert_HSL_RGB (const sVec4< T > &aHSL) |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_HSV (const sVec4< T > &aRGB) |
| template<typename T > | |
| sVec4< T > | ColorConvert_HSV_RGB (const sVec4< T > &aHSV) |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_CMY (const sVec4< T > &aRGB) |
| template<typename T > | |
| sVec4< T > | ColorConvert_CMY_RGB (const sVec4< T > &aCMY) |
| template<typename T > | |
| sVec4< T > | ColorConvert_CMY_CMYK (const sVec4< T > &aCMY) |
| template<typename T > | |
| sVec4< T > | ColorConvert_CMYK_CMY (const sVec4< T > &aCMYK) |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_YIQ (const sVec4< T > &aRGB) |
| template<typename T > | |
| sVec4< T > | ColorConvert_YIQ_RGB (const sVec4< T > &aYIQ) |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_YUV (const sVec4< T > &aRGB) |
| template<typename T > | |
| sVec4< T > | ColorConvert_YUV_RGB (const sVec4< T > &aYUV) |
| template<typename T > | |
| sVec4< T > | ColorConvert_YIQ_YUV (const sVec4< T > &aYIQ) |
| template<typename T > | |
| sVec4< T > | ColorConvert_YUV_YIQ (const sVec4< T > &aYUV) |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_YCbCr (const sVec4< T > &aRGB) |
| template<typename T > | |
| sVec4< T > | ColorConvert_YCbCr_RGB (const sVec4< T > &aYCbCr) |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_YPbPr (const sVec4< T > &aRGB) |
| template<typename T > | |
| sVec4< T > | ColorConvert_YPbPr_RGB (const sVec4< T > &aYPbPr) |
| template<typename T > | |
| sVec4< T > | ColorConvert_RGB_YCoCg (const sVec4< T > &aRGB) |
| template<typename T > | |
| sVec4< T > | ColorConvert_YCoCg_RGB (const sVec4< T > &aYCoCg) |
| template<typename T > | |
| sVec4< T > | ColorConvert (eColorSpace aSource, eColorSpace aDest, const sVec4< T > &aColor, const sVec4< T > &aXYZRef) |
| template<typename T , typename TF > | |
| T | DampedSpringAcceleration (const T &D, const T &V, const TF Ks, const TF Kd) |
| Computes the acceleration of a damped spring system. More... | |
| template<typename T > | |
| T | DampedSpringGetDampingRatio (const T Ks, const T Kd) |
| Get the damping ratio of a spring set with the specified Ks/Kd constants. More... | |
| template<typename T > | |
| T | DampedSpringComputeKdFromDampingRatio (const T Ks, const T E) |
| Compute the value of Kd for the specified Ks that will result in a spring with the specified damping ratio. More... | |
| template<typename T , typename TF > | |
| void | DampedSpringIntegrateFrameEuler (T &aP, T &aV, const T &I, const TF Ks, const TF Kd, const TF dT) |
| Integrate one frame of the spring simulation using a simple euler method. More... | |
| template<typename T > | |
| tF32 | _DampedSpringDistance (const T &a, const T &b) |
| template<> | |
| tF32 | _DampedSpringDistance< tF32 > (const tF32 &a, const tF32 &b) |
| template<> | |
| tF32 | _DampedSpringDistance< sVec2f > (const sVec2f &a, const sVec2f &b) |
| template<> | |
| tF32 | _DampedSpringDistance< sVec3f > (const sVec3f &a, const sVec3f &b) |
| template<> | |
| tF32 | _DampedSpringDistance< sVec4f > (const sVec4f &a, const sVec4f &b) |
| tFVF | GetGeometryPackerStandardMaterialFVF (const iMaterial *apMat, tFVF aBase) |
| Get standard FVF used by the geometry packer. More... | |
| tU32 | PackGeometry (iGraphics *apGraphics, iGeometry *apGeom, tPtr apMeshes, tU32 anMeshStride, tU32 anNumMeshes, tU32 anGeomIndexBase, iMaterialLibrary *apMatLib, tIUnknownCVec &aOutput, eArrayUsage aUsage, tFVF aBaseFVF, tFVF aDefaultFVF, tBool abOneFVF) |
| Pack a geometry into several geometries. More... | |
| iGeometry * | PackSingleGeometry (iGraphics *apGraphics, iGeometry *apGeom, tPtr apMeshes, tU32 anMeshStride, tU32 anNumMeshes, tU32 anGeomIndexBase, iMaterialLibrary *apMatLib, eArrayUsage aUsage, tFVF aBaseFVF, tFVF aDefaultFVF) |
| Pack meshes into a single geometry. More... | |
| template<typename T > | |
| void | UDPointsSphereRandom (sVec3< T > *result, tU32 n) |
| Generates random points on a unit sphere. More... | |
| template<typename T > | |
| void | UDPointsSphereHammersley (sVec3< T > *result, tU32 n) |
| Generates hammersley base2 points on a unit sphere. More... | |
| template<typename T > | |
| void | UDPointsSphereHammersleyEx (sVec3< T > *result, tU32 n, tI32 p1) |
| Generates hammersley base p1 points on a unit sphere. More... | |
| template<typename T > | |
| void | UDPointsSphereHalton (sVec3< T > *result, tU32 n, tI32 p2=3) |
| Generates halton p1=2,p2 points on a unit sphere. More... | |
| template<typename T > | |
| void | UDPointsSphereHaltonEx (sVec3< T > *result, tU32 n, tI32 p1, tI32 p2) |
| Generates halton p1,p2 points on a unit sphere. More... | |
| template<typename T > | |
| void | UDPointsHemisphereRandom (sVec3< T > *result, tU32 n) |
| Generates random points on a unit hemisphere. More... | |
| template<typename T > | |
| void | UDPointsHemisphereHammersley (sVec3< T > *result, tU32 n) |
| Generates hammersley base2 points on a unit hemisphere. More... | |
| template<typename T > | |
| void | UDPointsHemisphereHammersleyEx (sVec3< T > *result, tU32 n, tI32 p1) |
| Generates hammersley base p1 points on a unit hemisphere. More... | |
| template<typename T > | |
| void | UDPointsHemisphereHalton (sVec3< T > *result, tU32 n, tI32 p2=3) |
| Generates halton p1=2,p2 points on a unit hemisphere. More... | |
| template<typename T > | |
| void | UDPointsHemisphereHaltonEx (sVec3< T > *result, tU32 n, tI32 p1, tI32 p2) |
| Generates halton p1,p2 points on a unit hemisphere. More... | |
| template<typename T > | |
| void | UDPointsPlaneRandom (sVec2< T > *result, tU32 n) |
| Generate random points on a unit plane. More... | |
| template<typename T > | |
| void | UDPointsPlaneHammersley (sVec2< T > *result, tU32 n) |
| Generate hammersley base2 points on a unit plane. More... | |
| template<typename T > | |
| void | UDPointsPlaneHammersleyEx (sVec2< T > *result, tU32 n, tI32 p1) |
| Generate hammersley base p1 points on a unit plane. More... | |
| template<typename T > | |
| void | UDPointsPlaneHalton (sVec2< T > *result, tU32 n, tI32 p2=3) |
| Generate halton p1=2,p2 points on a unit plane. More... | |
| template<typename T > | |
| void | UDPointsPlaneHaltonEx (sVec2< T > *result, tU32 n, tI32 p1, tI32 p2) |
| Generate halton p1,p2 points on a unit plane. More... | |
| tU32 | ULColorBlend15 (tU32 x, tU32 y, tU32 n) |
| Blend two 15 bits colors (RGB/BGR 555 colors) using a 0-255 blend factor. More... | |
| tU32 | ULColorBlend16 (tU32 x, tU32 y, tU32 n) |
| Blend two 16 bits colors (RGB/BGR 565 colors) using a 0-255 blend factor. More... | |
| tU32 | ULColorBlend24 (tU32 x, tU32 y, tU32 n) |
| Blend two 24/32 bits colors (RGB/BGR 888 colors) using a 0-255 blend factor. More... | |
| cPolygon (tFVF aFVF=eFVF_Position) | |
| Constructor. More... | |
| cPolygon (const cPolygon &aRight) | |
| Copy constructor. More... | |
| ~cPolygon () | |
| Destructor. More... | |
| void | ZeroMembers () |
| Zero class members. More... | |
| tBool | IsOK () const |
| Return eTrue if the polygon is ok. More... | |
| cSphere (const sVec3< T > &aPos, T aRadius) | |
| cSphere (const sVec3< T > &aPos) | |
| cSphere (T aRadius=1.0f) | |
| void | Transform (const sMatrixf &avMatrix) |
| Transform by the specified matrix. More... | |
Vertices | |
| void | SetFVF (tFVF aFVF) |
| Set the FVF. More... | |
| tFVF | GetFVF () const |
| Get the FVF. More... | |
| tBool | IsSameFVF (const cPolygon *aPoly) const |
| Check if the passed polygon's FVF is the same as this polygon's FVF. More... | |
| tU16 | GetVertexSize () const |
| Get the vertex size. More... | |
| void | ClearVertices () |
| Remove all vertices of the polygon. More... | |
| void | ReserveVertices (tU32 aunNumVert) |
| Reserve memory for the specified number of vertices. More... | |
| void | AddVertices (const tPtr apVerts, tU16 aunNumVert=1) |
| Add vertices to the polygon. More... | |
| void | AddVertices (const cFVFDescription &aFVF, const tPtr apVerts, tU16 aunNumVert=1) |
| Add vertices to the polygon. More... | |
| void | RemoveVertex (tU32 anVert=eInvalidHandle) |
| Remove a vertex of the polygon. More... | |
| void | SwapVertices (tU32 i, tU32 j) |
| Swap the content of two vertex. More... | |
| tU16 | GetNumVertices () const |
| Get the number of vertices in the polygon. More... | |
| tPtr | GetVertex (tU32 nVert) const |
| Get the vertex at the given index. More... | |
| void | SetNumVertices (tU16 anNum) |
| Set the number of vertices. More... | |
| iFile * | CreateVerticesFile () const |
| Create a vertices file. More... | |
| tPtr | GetFirstVertex () const |
| Get the first vertex. More... | |
| tPtr | GetNextVertex (tPtr apVert) const |
| Get the next vertex. More... | |
| tBool | IsEndVertex (tPtr apVert) const |
| Check if this is the end vertex. More... | |
| sVec3f * | GetPosition (tU32 nVert) const |
| Get the position at the given index. More... | |
| sVec3f * | GetFirstPosition () const |
| Get the first position. More... | |
| sVec3f * | GetNextPosition (sVec3f *apVert) const |
| Get the next position. More... | |
| tBool | IsEndPosition (sVec3f *apVert) const |
| Check if this is the end position. More... | |
| tBool | IsEmpty () const |
| Return eTrue if their's no vertex in the polygon. More... | |
| tBool | IsValidPolygon () const |
| Return eTrue if the polygon is valid, aka has at least 3 vertex. More... | |
| tBool | Exists (const sVec3f &pos, const tF32 epsilon) |
| return eTrue if a vertex with the given position is already in the list More... | |
| tBool | Exists (const sVec3f &pos) |
Misc infos | |
| sVec3f | GetCOM () const |
| Get the polygon center of mass. More... | |
| tF32 | GetArea () const |
| Get the polygon area. More... | |
Plane | |
| tBool | ComputePlane () |
| Compute the plane. More... | |
| tBool | ComputePlaneNormal (const sVec3f &vNormal) |
| Compute the plane using a given normal from a polygon which is coplanar. More... | |
| void | SetPlane (const sPlanef &plane) |
| Set the value of the plane with the given plane. More... | |
| sPlanef | GetPlane () const |
| Get the polygon's plane. More... | |
Intersection/Classification | |
| eClassify | Classify (const sPlanef &Plane, const tF32 epsilon) const |
| Classify along a plane. More... | |
| tBool | IsEqual (const cPolygon *b) const |
| Return eTrue if the specified polygon is the same as this polygon. More... | |
| tBool | Intersect (const sVec3f &pt, const tF32 fEpsilon=niEpsilon5) const |
| Return eTrue if the specified point is inside the polygon. More... | |
| tBool | Intersect (const cAABBf &aAABB, const tF32 fEpsilon=niEpsilon5) const |
| Return eTrue if the specified AABB intersect the polygon. More... | |
| eClassify | Classify (const sPlanef &Plane) const |
| Classify along a plane. More... | |
| tBool | IntersectPoint (const sVec3f &pt) const |
| tBool | IntersectAABB (const sVec3f &avMin, const sVec3f &avMax) const |
Splitting | |
| void | Split (const sPlanef &Plane, cPolygon *pFront, cPolygon *pBack, tBool abKeepCoplanar, tF32 epsilon) const |
| Split along a plane. More... | |
| tBool | Clip (const sPlanef *apPlanes, tU32 aulNumPlanes, cPolygon &aResult, tBool abKeepBack, tBool abKeepCoplanar, tF32 epsilon) const |
| Clip the polygon against the given set of planes. The planes are supposted to form a convex hull. More... | |
| void | Split (const sPlanef &Plane, cPolygon *pFront, cPolygon *pBack, tBool abKeepCoplanar) const |
| tBool | Clip (const tVec4fCVec *avPlanes, cPolygon *apResult, tBool abKeepBack, tBool abKeepCoplanar) const |
Misc operations | |
| tBool | GenerateBaseForPlane (const sPlanef &Plane, const tF32 fWidth=1024.0f, tBool bCCW=eFalse) |
| Generate vertices for the given plane the size is fWidth. More... | |
| tBool | GenerateBaseForPlaneAABB (const sPlanef &Plane, const sVec3f &avMin, const sVec3f &avMax, tBool bCCW=eFalse) |
| Generate vertices for the given plane the size is defined by the specified AABB. More... | |
| void | SortVerts () |
| Sort the vertices in clockwise order. More... | |
| void | Reverse () |
| Reverse the polygon facing. More... | |
| sVec3f & | ClosestPointOnPerimeter (sVec3f &Out, const sVec3f &pt, sVec3f *pEA=NULL, sVec3f *pEB=NULL, tBool *pbEdgeFlag=NULL) const |
| Return the closest point to the specified point that lay on an edge of this polygon. More... | |
| tBool | IsDegenerate () const |
| Check if the polygon is degenerate. More... | |
Material and Flags | |
| void | SetMaterial (tU32 aunMatID) |
| Set the polygon's material. More... | |
| void | SetFlags (tU32 anFlags) |
| Set the polygon's flags. More... | |
| tU32 | GetFlags () const |
| Get the polygon's flags. More... | |
| tU32 | GetMaterial () const |
| Get the polygon's material. More... | |
Creation & Copy | |
| void | CopyVertices (const cPolygon *apPoly) |
| Copy only the vertices of the specified polygon. More... | |
| void | Copy (const cPolygon *apPoly) |
| Copy the specified polygon in this polygon. More... | |
| cPolygon * | Create () const |
| Create a polygon with the same FVF as this polygon. More... | |
| cPolygon * | Clone () const |
| Create a copy of this polygon. More... | |
Properties | |
| void | SetRadius (T aRadius) |
| Set the sphere radius. More... | |
| T | GetRadius () const |
| Get the sphere radius. More... | |
| void | SetPosition (const sVec3< T > &aPos) |
| Set the sphere position. More... | |
| const sVec3< T > & | GetPosition () const |
| Get the sphere position. More... | |
| void | SetCenter (const sVec3< T > &aPos) |
| Set the sphere center (same as position). More... | |
| const sVec3< T > & | GetCenter () const |
| Get the sphere center (same as position). More... | |
Intersection tests | |
| tBool | Intersect (const sVec3< T > &vPos) const |
| Intersection with a point. More... | |
| T | Intersect (const sVec3< T > &avPos, const sVec3< T > &avDir) const |
| Intersection with a ray. More... | |
| #define TRACE_BUFFER_CACHE | ( | X | ) |
| #define niVertexFormat | ( | FVF | ) |
Macro to define a vertex format.
| typedef cAABB< tF32 > cAABBf |
Float AABB.
| typedef cAABB<tF64> cAABBd |
Double AABB.
| typedef sDampedSpring<tF32,tF32,cUnknown,tF32> sDampedSpring1f |
1D spring.
| typedef sDampedSpring<tF32,tF32,cIUnknownImpl<iDampedSpring1>,tF32 > sDampedSpring1fImpl |
1D spring, implements the ni::iDampedSpring1 interface.
| typedef sDampedSpring<sVec2f,tF32> sDampedSpring2f |
2D spring.
| typedef sDampedSpring<sVec2f,tF32,cIUnknownImpl<iDampedSpring2> > sDampedSpring2fImpl |
2D spring, implements the ni::iDampedSpring2 interface.
| typedef sDampedSpring<sVec3f,tF32> sDampedSpring3f |
3D spring.
| typedef sDampedSpring<sVec3f,tF32,cIUnknownImpl<iDampedSpring3> > sDampedSpring3fImpl |
3D spring, implements the ni::iDampedSpring3 interface.
| typedef sDampedSpring<sVec4f,tF32> sDampedSpring4f |
4D spring.
| typedef sDampedSpring<sVec4f,tF32,cIUnknownImpl<iDampedSpring4> > sDampedSpring4fImpl |
4D spring, implements the ni::iDampedSpring4 interface.
| typedef sDampedSpringPosition<tF32,tF32,cUnknown,tF32> sDampedSpringPosition1f |
1D spring position.
| typedef sDampedSpringPosition<tF32,tF32,cIUnknownImpl<iDampedSpringPosition1,eIUnknownImplFlags_DontInherit1,iDampedSpring1>,tF32 > sDampedSpringPosition1fImpl |
1D spring position, implements the ni::iDampedSpringPosition1 interface.
| typedef sDampedSpringPosition<sVec2f,tF32> sDampedSpringPosition2f |
2D spring position.
| typedef sDampedSpringPosition<sVec2f,tF32,cIUnknownImpl<iDampedSpringPosition2,eIUnknownImplFlags_DontInherit1,iDampedSpring2> > sDampedSpringPosition2fImpl |
2D spring position, implements the ni::iDampedSpringPosition2 interface.
| typedef sDampedSpringPosition<sVec3f,tF32> sDampedSpringPosition3f |
3D spring position.
| typedef sDampedSpringPosition<sVec3f,tF32,cIUnknownImpl<iDampedSpringPosition3,eIUnknownImplFlags_DontInherit1,iDampedSpring3> > sDampedSpringPosition3fImpl |
3D spring position, implements the ni::iDampedSpringPosition3 interface.
| typedef sDampedSpringPosition<sVec4f,tF32> sDampedSpringPosition4f |
4D spring position.
| typedef sDampedSpringPosition<sVec4f,tF32,cIUnknownImpl<iDampedSpringPosition4,eIUnknownImplFlags_DontInherit1,iDampedSpring4> > sDampedSpringPosition4fImpl |
4D spring position, implements the ni::iDampedSpringPosition4 interface.
| typedef cEllipsoid<tF32> cEllipsoidf |
Float Ellispoid.
| typedef astl::vector<cEllipsoidf> tEllipsoidfVec |
Vector of Float Ellipsoid.
| typedef tEllipsoidfVec::iterator tEllipsoidfVecIt |
Vector of Float Ellipsoid iterator.
| typedef tEllipsoidfVec::const_iterator tEllipsoidfVecCIt |
Vector of Float Ellipsoid constant iterator.
| typedef cEllipsoid<tF64> cEllipsoidd |
Double Ellispoid.
| typedef astl::vector<cEllipsoidd> tEllipsoiddVec |
Vector of Double Ellipsoid.
| typedef tEllipsoiddVec::iterator tEllipsoiddVecIt |
Vector of Double Ellipsoid iterator.
| typedef tEllipsoiddVec::const_iterator tEllipsoiddVecCIt |
Vector of Double Ellipsoid constant iterator.
| typedef astl::vector<sPackMesh> tPackMeshVec |
Pack mesh vector.
| typedef cMatrixStack<tF32> cMatrixStackf |
tF32 matrix stack.
| typedef cMatrixStack<tF64> cMatrixStackd |
tF64 matrix stack.
| typedef cSphere<tF32> cSpheref |
Float Sphere.
| typedef cSphere<tF64> cSphered |
Double Sphere.
| typedef sGraphicsStack<sGraphicsFixedMatrix> tGraphicsStackFixedMatrix |
| typedef sGraphicsStack<sGraphicsStates> tGraphicsStackStates |
| typedef sGraphicsStack<sGraphicsRT> tGraphicsStackRT |
| typedef sGraphicsStack<sGraphicsAllStates> tGraphicsStackAllStates |
| tPtr ni::BitmapScanline | ( | iBitmap2D * | bmp, |
| int | y, | ||
| int | x = 0 |
||
| ) |
| sVec3<T>& ni::ColorScaleToUnit | ( | sVec3< T > & | aOut, |
| const sVec3< T > & | aCol | ||
| ) |
| sVec3<T>& ni::ColorAdjustContrast | ( | sVec3< T > & | Out, |
| const sVec3< T > & | C, | ||
| T | c | ||
| ) |
| sVec3<T>& ni::ColorAdjustSaturation | ( | sVec3< T > & | Out, |
| const sVec3< T > & | C, | ||
| T | s | ||
| ) |
| sVec3<T>& ni::ColorGrey | ( | sVec3< T > & | Out, |
| const sVec3< T > & | C | ||
| ) |
| sVec3<T>& ni::ColorBlackWhite | ( | sVec3< T > & | Out, |
| const sVec3< T > & | C, | ||
| T | s | ||
| ) |
| sVec3<T>& ni::ColorGammaCorrect | ( | sVec3< T > & | Out, |
| tF32 | afFactor, | ||
| const sVec3< T > * | pSrc = NULL |
||
| ) |
| T ni::ColorLuminance | ( | const sVec3< T > & | aColor, |
| const sVec3f & | avLuminanceDistribution = kvColorLuminanceR21G71B07 |
||
| ) |
| sVec4<T>& ni::ColorAdjustContrast | ( | sVec4< T > & | Out, |
| const sVec4< T > & | C, | ||
| T | c | ||
| ) |
| sVec4<T>& ni::ColorAdjustSaturation | ( | sVec4< T > & | Out, |
| const sVec4< T > & | C, | ||
| T | s | ||
| ) |
| sVec4<T>& ni::ColorGrey | ( | sVec4< T > & | Out, |
| const sVec4< T > & | C | ||
| ) |
| sVec4<T>& ni::ColorBlackWhite | ( | sVec4< T > & | Out, |
| const sVec4< T > & | C, | ||
| T | s | ||
| ) |
| T ni::ColorLuminance | ( | const sVec4< T > & | aColor, |
| const sVec3f & | avLuminanceDistribution = kvColorLuminanceR21G71B07 |
||
| ) |
| sVec4<T> ni::ColorConvert_XYZ_RGB | ( | const sVec4< T > & | aXYZ, |
| const sVec4< T > & | aXYZRef | ||
| ) |
Convert an XYZ to a RGB color.
| sVec4<T> ni::ColorConvert_RGB_XYZ | ( | const sVec4< T > & | aRGB, |
| const sVec4< T > & | aXYZRef | ||
| ) |
Convert a RGB color to a XYZ color.
| sVec4<T> ni::ColorConvert_XYZ_Yxy | ( | const sVec4< T > & | aXYZ | ) |
Convert a normalize XYZ to Yxy.
| sVec4<T> ni::ColorConvert_Yxy_XYZ | ( | const sVec4< T > & | aYxy | ) |
Convert a Yxy to XYZ.
| sVec4<T> ni::ColorConvert_XYZ_HunterLab | ( | const sVec4< T > & | aXYZ | ) |
| sVec4<T> ni::ColorConvert_HunterLab_XYZ | ( | const sVec4< T > & | aHLab | ) |
| sVec4<T> ni::ColorConvert_XYZ_CIELab | ( | const sVec4< T > & | aXYZ, |
| const sVec4< T > & | aXYZRef | ||
| ) |
| sVec4<T> ni::ColorConvert_CIELab_XYZ | ( | const sVec4< T > & | aCIELab, |
| const sVec4< T > & | aXYZRef | ||
| ) |
| sVec4<T> ni::ColorConvert_CIELab_CIELCH | ( | const sVec4< T > & | aCIELab | ) |
| sVec4<T> ni::ColorConvert_CIELCH_CIELab | ( | const sVec4< T > & | aCIELCH | ) |
| sVec4<T> ni::ColorConvert_XYZ_CIELuv | ( | const sVec4< T > & | aXYZ, |
| const sVec4< T > & | aXYZRef | ||
| ) |
| sVec4<T> ni::ColorConvert_CIELuv_XYZ | ( | const sVec4< T > & | aCIELuv, |
| const sVec4< T > & | aXYZRef | ||
| ) |
| sVec4<T> ni::ColorConvert_RGB_HSL | ( | const sVec4< T > & | aRGB | ) |
| T ni::Hue_2_RGB | ( | T | v1, |
| T | v2, | ||
| T | vH | ||
| ) |
| sVec4<T> ni::ColorConvert_HSL_RGB | ( | const sVec4< T > & | aHSL | ) |
| sVec4<T> ni::ColorConvert_RGB_HSV | ( | const sVec4< T > & | aRGB | ) |
| sVec4<T> ni::ColorConvert_HSV_RGB | ( | const sVec4< T > & | aHSV | ) |
| sVec4<T> ni::ColorConvert_RGB_CMY | ( | const sVec4< T > & | aRGB | ) |
| sVec4<T> ni::ColorConvert_CMY_RGB | ( | const sVec4< T > & | aCMY | ) |
| sVec4<T> ni::ColorConvert_CMY_CMYK | ( | const sVec4< T > & | aCMY | ) |
| sVec4<T> ni::ColorConvert_CMYK_CMY | ( | const sVec4< T > & | aCMYK | ) |
| sVec4<T> ni::ColorConvert_RGB_YIQ | ( | const sVec4< T > & | aRGB | ) |
| sVec4<T> ni::ColorConvert_YIQ_RGB | ( | const sVec4< T > & | aYIQ | ) |
| sVec4<T> ni::ColorConvert_RGB_YUV | ( | const sVec4< T > & | aRGB | ) |
| sVec4<T> ni::ColorConvert_YUV_RGB | ( | const sVec4< T > & | aYUV | ) |
| sVec4<T> ni::ColorConvert_YIQ_YUV | ( | const sVec4< T > & | aYIQ | ) |
| sVec4<T> ni::ColorConvert_YUV_YIQ | ( | const sVec4< T > & | aYUV | ) |
| sVec4<T> ni::ColorConvert_RGB_YCbCr | ( | const sVec4< T > & | aRGB | ) |
| sVec4<T> ni::ColorConvert_YCbCr_RGB | ( | const sVec4< T > & | aYCbCr | ) |
| sVec4<T> ni::ColorConvert_RGB_YPbPr | ( | const sVec4< T > & | aRGB | ) |
| sVec4<T> ni::ColorConvert_YPbPr_RGB | ( | const sVec4< T > & | aYPbPr | ) |
| sVec4<T> ni::ColorConvert_RGB_YCoCg | ( | const sVec4< T > & | aRGB | ) |
| sVec4<T> ni::ColorConvert_YCoCg_RGB | ( | const sVec4< T > & | aYCoCg | ) |
| sVec4<T> ni::ColorConvert | ( | eColorSpace | aSource, |
| eColorSpace | aDest, | ||
| const sVec4< T > & | aColor, | ||
| const sVec4< T > & | aXYZRef | ||
| ) |
XYZ to other color formats
| T ni::DampedSpringAcceleration | ( | const T & | D, |
| const T & | V, | ||
| const TF | Ks, | ||
| const TF | Kd | ||
| ) |
Computes the acceleration of a damped spring system.
The spring acceleration is applied in the direction opposite from its displacement from a rest position, and a damping acceleration is applied in the direction opposite from its velocity. The damping ratio is : E = Kd/(2*sqrt(Ks)).
| D | is the displacement of the spring/object |
| V | is the current velocity |
| Ks | is the spring acceleration constant, control the spring component of the acceleration - the stiffness of the spring (the higher the value the faster the spring will reach its target). |
| Kd | is the damping acceleration constant, control the damping component of the acceleration. |
| T ni::DampedSpringGetDampingRatio | ( | const T | Ks, |
| const T | Kd | ||
| ) |
Get the damping ratio of a spring set with the specified Ks/Kd constants.
| T ni::DampedSpringComputeKdFromDampingRatio | ( | const T | Ks, |
| const T | E | ||
| ) |
Compute the value of Kd for the specified Ks that will result in a spring with the specified damping ratio.
| void ni::DampedSpringIntegrateFrameEuler | ( | T & | aP, |
| T & | aV, | ||
| const T & | I, | ||
| const TF | Ks, | ||
| const TF | Kd, | ||
| const TF | dT | ||
| ) |
Integrate one frame of the spring simulation using a simple euler method.
| tF32 ni::_DampedSpringDistance | ( | const T & | a, |
| const T & | b | ||
| ) |
| tF32 ni::_DampedSpringDistance< tF32 > | ( | const tF32 & | a, |
| const tF32 & | b | ||
| ) |
| tF32 ni::_DampedSpringDistance< sVec2f > | ( | const sVec2f & | a, |
| const sVec2f & | b | ||
| ) |
| tF32 ni::_DampedSpringDistance< sVec3f > | ( | const sVec3f & | a, |
| const sVec3f & | b | ||
| ) |
| tF32 ni::_DampedSpringDistance< sVec4f > | ( | const sVec4f & | a, |
| const sVec4f & | b | ||
| ) |
| tFVF ni::GetGeometryPackerStandardMaterialFVF | ( | const iMaterial * | apMat, |
| tFVF | aBase | ||
| ) |
Get standard FVF used by the geometry packer.
| tU32 ni::PackGeometry | ( | iGraphics * | apGraphics, |
| iGeometry * | apGeom, | ||
| tPtr | apMeshes, | ||
| tU32 | anMeshStride, | ||
| tU32 | anNumMeshes, | ||
| tU32 | anGeomIndexBase, | ||
| iMaterialLibrary * | apMatLib, | ||
| tIUnknownCVec & | aOutput, | ||
| eArrayUsage | aUsage, | ||
| tFVF | aBaseFVF, | ||
| tFVF | aDefaultFVF, | ||
| tBool | abOneFVF | ||
| ) |
Pack a geometry into several geometries.
| iGeometry* ni::PackSingleGeometry | ( | iGraphics * | apGraphics, |
| iGeometry * | apGeom, | ||
| tPtr | apMeshes, | ||
| tU32 | anMeshStride, | ||
| tU32 | anNumMeshes, | ||
| tU32 | anGeomIndexBase, | ||
| iMaterialLibrary * | apMatLib, | ||
| eArrayUsage | aUsage, | ||
| tFVF | aBaseFVF, | ||
| tFVF | aDefaultFVF | ||
| ) |
Pack meshes into a single geometry.
| void ni::UDPointsSphereRandom | ( | sVec3< T > * | result, |
| tU32 | n | ||
| ) |
Generates random points on a unit sphere.
| void ni::UDPointsSphereHammersley | ( | sVec3< T > * | result, |
| tU32 | n | ||
| ) |
Generates hammersley base2 points on a unit sphere.
| void ni::UDPointsSphereHammersleyEx | ( | sVec3< T > * | result, |
| tU32 | n, | ||
| tI32 | p1 | ||
| ) |
Generates hammersley base p1 points on a unit sphere.
| void ni::UDPointsSphereHalton | ( | sVec3< T > * | result, |
| tU32 | n, | ||
| tI32 | p2 = 3 |
||
| ) |
Generates halton p1=2,p2 points on a unit sphere.
| void ni::UDPointsSphereHaltonEx | ( | sVec3< T > * | result, |
| tU32 | n, | ||
| tI32 | p1, | ||
| tI32 | p2 | ||
| ) |
Generates halton p1,p2 points on a unit sphere.
| void ni::UDPointsHemisphereRandom | ( | sVec3< T > * | result, |
| tU32 | n | ||
| ) |
Generates random points on a unit hemisphere.
| void ni::UDPointsHemisphereHammersley | ( | sVec3< T > * | result, |
| tU32 | n | ||
| ) |
Generates hammersley base2 points on a unit hemisphere.
| void ni::UDPointsHemisphereHammersleyEx | ( | sVec3< T > * | result, |
| tU32 | n, | ||
| tI32 | p1 | ||
| ) |
Generates hammersley base p1 points on a unit hemisphere.
| void ni::UDPointsHemisphereHalton | ( | sVec3< T > * | result, |
| tU32 | n, | ||
| tI32 | p2 = 3 |
||
| ) |
Generates halton p1=2,p2 points on a unit hemisphere.
| void ni::UDPointsHemisphereHaltonEx | ( | sVec3< T > * | result, |
| tU32 | n, | ||
| tI32 | p1, | ||
| tI32 | p2 | ||
| ) |
Generates halton p1,p2 points on a unit hemisphere.
| void ni::UDPointsPlaneRandom | ( | sVec2< T > * | result, |
| tU32 | n | ||
| ) |
Generate random points on a unit plane.
| void ni::UDPointsPlaneHammersley | ( | sVec2< T > * | result, |
| tU32 | n | ||
| ) |
Generate hammersley base2 points on a unit plane.
| void ni::UDPointsPlaneHammersleyEx | ( | sVec2< T > * | result, |
| tU32 | n, | ||
| tI32 | p1 | ||
| ) |
Generate hammersley base p1 points on a unit plane.
| void ni::UDPointsPlaneHalton | ( | sVec2< T > * | result, |
| tU32 | n, | ||
| tI32 | p2 = 3 |
||
| ) |
Generate halton p1=2,p2 points on a unit plane.
| void ni::UDPointsPlaneHaltonEx | ( | sVec2< T > * | result, |
| tU32 | n, | ||
| tI32 | p1, | ||
| tI32 | p2 | ||
| ) |
Generate halton p1,p2 points on a unit plane.
| tU32 ni::ULColorBlend15 | ( | tU32 | x, |
| tU32 | y, | ||
| tU32 | n | ||
| ) |
Blend two 15 bits colors (RGB/BGR 555 colors) using a 0-255 blend factor.
| tU32 ni::ULColorBlend16 | ( | tU32 | x, |
| tU32 | y, | ||
| tU32 | n | ||
| ) |
Blend two 16 bits colors (RGB/BGR 565 colors) using a 0-255 blend factor.
| tU32 ni::ULColorBlend24 | ( | tU32 | x, |
| tU32 | y, | ||
| tU32 | n | ||
| ) |
Blend two 24/32 bits colors (RGB/BGR 888 colors) using a 0-255 blend factor.
| cPolygon | ( | tFVF | aFVF = eFVF_Position | ) |
Constructor.
| cPolygon | ( | const cPolygon & | aRight | ) |
Copy constructor.
| ~cPolygon | ( | ) |
Destructor.
| void ZeroMembers | ( | ) |
Zero class members.
| tBool IsOK | ( | ) | const |
Return eTrue if the polygon is ok.
| tFVF GetFVF | ( | ) | const |
Get the FVF.
| tBool IsSameFVF | ( | const cPolygon * | aPoly | ) | const |
Check if the passed polygon's FVF is the same as this polygon's FVF.
| tU16 GetVertexSize | ( | ) | const |
Get the vertex size.
| void ClearVertices | ( | ) |
Remove all vertices of the polygon.
| void AddVertices | ( | const cFVFDescription & | aFVF, |
| const tPtr | apVerts, | ||
| tU16 | aunNumVert = 1 |
||
| ) |
Add vertices to the polygon.
| void RemoveVertex | ( | tU32 | anVert = eInvalidHandle | ) |
Remove a vertex of the polygon.
| anVert | is the index of the vertex to remove, if eInvalidHandle remove the last vertex. |
| tU16 GetNumVertices | ( | ) | const |
Get the number of vertices in the polygon.
| tPtr GetVertex | ( | tU32 | nVert | ) | const |
Get the vertex at the given index.
| iFile * CreateVerticesFile | ( | ) | const |
Create a vertices file.
| tPtr GetFirstVertex | ( | ) | const |
Get the first vertex.
| tPtr GetNextVertex | ( | tPtr | apVert | ) | const |
Get the next vertex.
| tBool IsEndVertex | ( | tPtr | apVert | ) | const |
Check if this is the end vertex.
| sVec3f * GetPosition | ( | tU32 | nVert | ) | const |
Get the position at the given index.
| sVec3f * GetFirstPosition | ( | ) | const |
Get the first position.
Get the first vertex.
| sVec3f * GetNextPosition | ( | sVec3f * | apVert | ) | const |
Get the next position.
Get the next vertex.
| tBool IsEndPosition | ( | sVec3f * | apVert | ) | const |
Check if this is the end position.
Check if this is the end vertex.
| tBool IsEmpty | ( | ) | const |
Return eTrue if their's no vertex in the polygon.
| tBool IsValidPolygon | ( | ) | const |
Return eTrue if the polygon is valid, aka has at least 3 vertex.
return eTrue if a vertex with the given position is already in the list
| sVec3f GetCOM | ( | ) | const |
Get the polygon center of mass.
| tF32 GetArea | ( | ) | const |
Get the polygon area.
| tBool ComputePlane | ( | ) |
Compute the plane.
| tBool ComputePlaneNormal | ( | const sVec3f & | vNormal | ) |
Compute the plane using a given normal from a polygon which is coplanar.
| sPlanef GetPlane | ( | ) | const |
Get the polygon's plane.
| tBool IsEqual | ( | const cPolygon * | b | ) | const |
Return eTrue if the specified polygon is the same as this polygon.
| tBool Intersect | ( | const sVec3f & | pt, |
| const tF32 | fEpsilon = niEpsilon5 |
||
| ) | const |
Return eTrue if the specified point is inside the polygon.
| tBool Intersect | ( | const cAABBf & | aAABB, |
| const tF32 | fEpsilon = niEpsilon5 |
||
| ) | const |
Return eTrue if the specified AABB intersect the polygon.
| void Split | ( | const sPlanef & | Plane, |
| cPolygon * | pFront, | ||
| cPolygon * | pBack, | ||
| tBool | abKeepCoplanar, | ||
| tF32 | epsilon | ||
| ) | const |
Split along a plane.
| tBool Clip | ( | const sPlanef * | apPlanes, |
| tU32 | aulNumPlanes, | ||
| cPolygon & | aResult, | ||
| tBool | abKeepBack, | ||
| tBool | abKeepCoplanar, | ||
| tF32 | epsilon | ||
| ) | const |
Clip the polygon against the given set of planes. The planes are supposted to form a convex hull.
| tBool GenerateBaseForPlane | ( | const sPlanef & | Plane, |
| const tF32 | fWidth = 1024.0f, |
||
| tBool | bCCW = eFalse |
||
| ) |
Generate vertices for the given plane the size is fWidth.
| tBool GenerateBaseForPlaneAABB | ( | const sPlanef & | Plane, |
| const sVec3f & | avMin, | ||
| const sVec3f & | avMax, | ||
| tBool | bCCW = eFalse |
||
| ) |
Generate vertices for the given plane the size is defined by the specified AABB.
| void SortVerts | ( | ) |
Sort the vertices in clockwise order.
| void Reverse | ( | ) |
Reverse the polygon facing.
| sVec3f & ClosestPointOnPerimeter | ( | sVec3f & | Out, |
| const sVec3f & | pt, | ||
| sVec3f * | pEA = NULL, |
||
| sVec3f * | pEB = NULL, |
||
| tBool * | pbEdgeFlag = NULL |
||
| ) | const |
Return the closest point to the specified point that lay on an edge of this polygon.
| tBool IsDegenerate | ( | ) | const |
Check if the polygon is degenerate.
| tU32 GetFlags | ( | ) | const |
Get the polygon's flags.
| tU32 GetMaterial | ( | ) | const |
Get the polygon's material.
Copy only the vertices of the specified polygon.
| cPolygon * Create | ( | ) | const |
Create a polygon with the same FVF as this polygon.
| cPolygon * Clone | ( | ) | const |
Create a copy of this polygon.
| cSphere | ( | const sVec3< T > & | aPos, |
| T | aRadius | ||
| ) |
| cSphere | ( | const sVec3< T > & | aPos | ) |
| cSphere | ( | T | aRadius = 1.0f | ) |
| void SetRadius | ( | T | aRadius | ) |
Set the sphere radius.
| T GetRadius | ( | ) | const |
Get the sphere radius.
| const sVec3< T > & GetPosition | ( | ) | const |
Get the sphere position.
| tBool Intersect | ( | const sVec3< T > & | vPos | ) | const |
Intersection with a point.
Intersection with a ray.
| tBool Exists | ( | const sVec3f & | pos | ) |
| eClassify Classify | ( | const sPlanef & | Plane | ) | const |
Classify along a plane.
| tBool IntersectPoint | ( | const sVec3f & | pt | ) | const |
| void Split | ( | const sPlanef & | Plane, |
| cPolygon * | pFront, | ||
| cPolygon * | pBack, | ||
| tBool | abKeepCoplanar | ||
| ) | const |
| tBool Clip | ( | const tVec4fCVec * | avPlanes, |
| cPolygon * | apResult, | ||
| tBool | abKeepBack, | ||
| tBool | abKeepCoplanar | ||
| ) | const |
| const sVec3<T>& GetCenter | ( | ) | const |
Get the sphere center (same as position).
1.8.7