Meshes are a caching system designed to speed up rendering.
To make efficient use of hardware acceleration, RenderWare Graphics groups your model geometry into Meshes when the Geometry object is loaded and/or unlocked. Meshes are generated by sorting the model geometry by Material to reduce repeated uploads of the same texture data and Tristripping is also performed at the this level.
The RpMesh API concerns itself primarily with the tristripping process. It is possible to attach your own callback function to use your own tristripping algorithms if required.
|
|
RpMeshCallBack is the callback function supplied to RpGeometryForAllMeshes and RpWorldSectorForAllMeshes for all meshes in a given geometry. This function should return a pointer to the current mesh to indicate success. The callback may return NULL to terminate further callbacks on the meshes.
|
|
|
RpTriStripCostCallBack represents the callback function used by the tunnelling tri-stripper to determine the cost of a tri-strip.
|
|
|
RpTriStripMeshCallBack is the callback to generate triangle strips when the triangle stripped geometries or world sectors are unlocked.
|
|
|
RpTriStripMeshStripCallBack represents the callback function to tri-strip a mesh.
|
|
|
RpMeshHeaderFlags represents the different types of mesh.
|
|
||||||||||||
|
RpBuildMeshGenerateDefaultIgnoreWindingTriStrip generates a triangle strip by selecting a starting triangle with the lowest adjacency and builds the strip off it. This is repeated until the mesh is stripped.
|
|
||||||||||||
|
RpBuildMeshGenerateDefaultTriStrip generates a triangle strip by selecting a starting triangle with the lowest adjacency and builds the strip off it. This is repeated until the mesh is stripped.
|
|
||||||||||||
|
RpBuildMeshGenerateExhaustiveIgnoreWindingTriStrip generates a triangle strip similarly to RpBuildMeshGeneratePreprocessTriStrip but repeats the process starting on every triangle and chooses the longest (not counting degenerates). It should be noted that presently this algorithm is not fully exhaustive.
|
|
||||||||||||
|
RpBuildMeshGenerateExhaustiveTriStrip generates a triangle strip similarly to RpBuildMeshGeneratePreprocessTriStrip but repeats the process starting on every triangle and chooses the longest (not counting degenerates). It should be noted that presently this algorithm is not fully exhaustive.
|
|
||||||||||||
|
RpBuildMeshGeneratePreprocessIgnoreWindingTriStrip generates a triangle strip by selecting a starting triangle with the lowest adjacency. It then builds a strip off each side of triangle and chooses the longest (not counting degenerates). This is repeated until the mesh is stripped.
|
|
||||||||||||
|
RpBuildMeshGeneratePreprocessTriStrip generates a triangle strip by selecting a starting triangle with the lowest adjacency. It then builds a strip off each side of triangle and chooses the longest (not counting degenerates). This is repeated until the mesh is stripped.
|
|
||||||||||||
|
RpBuildMeshGenerateTriStrip generates a triangle strip using the tristripping callback supplied in the RpTriStripData structure passed into RpMeshSetTriStripMethod as user supplied data.
|
|
||||||||||||
|
RpBuildMeshGenerateTrivialTriStrip generates singleton triangle strips.
|
|
||||||||||||
|
RpMeshGetTriStripMethod is used to query the specified triangle strip generation function and user-supplied data. The format of the callback is
RpMeshHeader *
(*RpTriStripMeshCallBack)(RpBuildMesh *buildMesh,
void *data);
|
|
|
RpMeshHeaderGetPrimType is used to extract the primitive type from a mesh header's flags. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application. The world plugin must be attached before using this function.
|
|
||||||||||||
|
RpMeshHeaderSetPrimType is used to change the flags of a mesh header to determine its primitive type. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application. The world plugin must be attached before using this function.
|
|
||||||||||||
|
RpMeshSetTriStripMethod is used to register the specified triangle strip generation function. The specified callback function is executed when the the geometry or world sectors are unlocked. If NULL is specified for the callback, then RpBuildMeshGenerateDefaultTriStrip is registered as the default function and the user-supplied data is set to NULL. The format of the callback is RpMeshHeader * (*RpTriStripMeshCallBack)(RpBuildMesh *buildMesh, void *data);
|
|
||||||||||||||||
|
RpTriStripDefaultCost calculates the cost of a tristrip as the number of fans contained in the strip.
|
|
||||||||||||
|
RpTriStripMeshQuick generates a triangle strip by selecting a starting triangle with the lowest adjacency. It then builds a strip off each side of triangle and chooses the longest (not counting degenerates). This is repeated until the mesh is stripped.
|
|
||||||||||||
|
RpTriStripMeshTunnel uses a tunneling algorithm to tristrip the supplied mesh.
|
|
||||||||||||
|
RpTriStripPolygonFollowStrip returns the next polygon of the tristrip.
|
© 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:46:54 2004.
Send Feedback