Functions |
|
void | RpLODAtomicCacheSetFreeListCreateParams (RwInt32 blockSize, RwInt32 numBlocksToPrealloc) |
RwBool | RpLODAtomicPluginAttach (void) |
RpAtomic * | RpLODAtomicSetGeometry (RpAtomic *atomic, RwInt32 lodIdx, RpGeometry *geometry) |
RpGeometry * | RpLODAtomicGetGeometry (RpAtomic *atomic, RwInt32 lodIdx) |
RpAtomic * | RpLODAtomicSetCurrentLOD (RpAtomic *atomic, RwInt32 lodIdx) |
RwInt32 | RpLODAtomicGetCurrentLOD (RpAtomic *atomic) |
RpAtomic * | RpLODAtomicSetRange (RpAtomic *atomic, RwReal farRange) |
RwReal | RpLODAtomicGetRange (RpAtomic *atomic) |
void | RpLODAtomicSetCamera (RwCamera *camera) |
RpAtomic * | RpLODAtomicSetLODCallBack (RpAtomic *atomic, RpLODAtomicLODCallBack callback) |
RpAtomic * | RpLODAtomicSelectLOD (RpAtomic *atomic) |
RpAtomic * | RpLODAtomicForAllLODGeometries (RpAtomic *atomic, RpGeometryCallBack callback, void *pData) |
RpAtomic * | RpLODAtomicHookRender (RpAtomic *atomic) |
RpAtomic * | RpLODAtomicUnHookRender (RpAtomic *atomic) |
LOD management is linked to individual RpAtomic datatypes. The process is usually as follows:
|
RpLODAtomicCacheSetFreeListCreateParams allows the developer to specify how many RpLODAtomicCache s to preallocate space for. Call before RwEngineInit.
|
|
RpLODAtomicForAllLODGeometries applies the callback to all LOD in the atomic.
|
|
RpLODAtomicGetCurrentLOD gets the current LOD.
|
|
RpLODAtomicGetGeometry is used to retrieve the LOD geometry in the specified atomic that is indexed with the given value. The index of the highest LOD geometry is zero (this is the base geometry). The maximum number of possible levels is 10 (indices 0 to 9) The LOD plugin must be attached before using this function.
|
|
RpLODAtomicGetRange gets the far range
|
|
RpLODAtomicHookRender hooks into the atomic's callback. This effectively enables the LOD.
|
|
RpLODAtomicPluginAttach is used to attach the LOD plugin to the RenderWare system to enable the use of level-of-detail modelling for atomics. The LOD plugin must be attached between initializing the system with RwEngineInit and opening it with RwEngineOpen. Note that the include file rplodatm.h is required and must be included by an application wishing to use this plugin. The LOD plugin library is contained in the file rplodatm.lib.
|
|
RpLODAtomicSelectLOD applies the select LOD callback to set the current geometry without rendering.
|
|
RpLODAtomicSetCamera is used to register the specified camera as the one for determining the range of an atomic and, therefore, the LOD geometry that is used for rendering. Usually, this camera is the same one that is used for rendering LOD atomics. This camera is used for selecting LOD based on the distance of object from the viewer. The LOD plugin must be attached before using this function.
|
|
RpLODAtomicSetCurrentLOD sets the LOD for the atomic.
|
|
RpLODAtomicSetGeometry is used to define the LOD geometry for the specified atomic. The index of the highest LOD geometry is zero (this is the base geometry). The maximum number of possible levels is 10 (indices 0 to 9). If the LOD geometry for the given index already exists, it is first destroyed before the new one is registered. For each LOD level, the default geometry is NULL, which is an allowed value; for any levels with NULL geometry the atomic is not rendered. The LOD plugin must be attached before using this function.
|
|
RpLODAtomicSetLODCallBack is used to define a callback function that determines which LOD geometry should be used to render the specified atomic. A default callback is defined for all atomics that calculates the LOD level using linear interpolation between zero and the LOD far range. For distances beyond the far range the lowest LOD geometry is used for rendering the atomic. The format of the callback function is: RwInt32 (*RpLODAtomicLODCallBack) (RpAtoimc *atomic); where the return value is the index of the LOD geometry. The LOD plugin must be attached before using this function.
|
|
RpLODAtomicSetRange RpLODAtomicSetRange is used to define the range from the camera over which LOD switching for the specified atomic takes place. The range is used by the atomic's default LOD callback to determine which LOD geometry should be used to render the atomic, given the distance of the atomic from the camera. The default LOD callback calculates the LOD level using linear interpolation between zero and the far range. For distances beyond the far range only the lowest LOD geometry is used for rendering the atomic. The LOD plugin must be attached before using this function.
|
|
RpLODAtomicUnHookRender unhooks into the atomic's callback. This effectively disable the LOD.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |