Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RtWorldImportPartitionTerminators
[RtWorldImport]


Functions

RwBool  RtWorldImportNeverPartitionTerminator (RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *userData)
RwBool  RtWorldImportMaximumLegalPartitionTerminator (RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *userData)
RwBool  RtWorldImportDefaultPartitionTerminator (RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *pData)
RwBool  RtWorldImportDepthPartitionTerminator (RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *userData)
RwBool  RtWorldImportSizePartitionTerminator (RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *userData)
RwBool  RtWorldImportSectorAspectSizePartitionTerminator (RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *userData)
RwBool  RtWorldImportSectorHeightPartitionTerminator (RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *userData)

Detailed Description

The set of provided RtWorldImportPartitionTerminators: Checks given criteria about the statistics, build sector, build status, and possibly other criteria to see whether the building process should be allowed to terminate, or whether more parititoning is necessary.

Function Documentation

RwBool RtWorldImportDefaultPartitionTerminator RtWorldImportBuildSector   buildSector,
RtWorldImportBuildStatus   buildStatus,
void *    userData
 

RtWorldImportDefaultPartitionTerminator is guaranteed to return FALSE until all criteria are met. The criteria are maximums, such as number of vertices, triangles and the size of the sector. This terminator is ALWAYS called, even if a separate terminator is used as well; this terminator overrides any TRUE result if the criteria have not been met.

Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
userData  NULL.
Returns:
TRUE if all criteria have been met, FALSE otherwise.
RwBool RtWorldImportDepthPartitionTerminator RtWorldImportBuildSector   buildSector,
RtWorldImportBuildStatus   buildStatus,
void *    userData
 

RtWorldImportDepthPartitionTerminator returns TRUE when the tree has reached a certain depth.

Note:
This terminator will be overidden if the default terminator does not permit termination.
Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
userData  A pointer to an RwInt32 that is the maximum depth.
Returns:
TRUE if the depth of the buildSector is greater than or equal to the depth in userData.
See also:
RtWorldImportDefaultPartitionTerminator
RwBool RtWorldImportMaximumLegalPartitionTerminator RtWorldImportBuildSector   buildSector,
RtWorldImportBuildStatus   buildStatus,
void *    userData
 

RtWorldImportMaximumLegalPartitionTerminator returns TRUE as soon as a sector is legal, i.e. when the number of vertices imposed by the RwUInt16 index in polygons is met

Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
userData  NULL.
Returns:
Returns TRUE if successful, FALSE otherwise
RwBool RtWorldImportNeverPartitionTerminator RtWorldImportBuildSector   buildSector,
RtWorldImportBuildStatus   buildStatus,
void *    userData
 

RtWorldImportNeverPartitionTerminator never returns TRUE. This is useful if the Partition Selector should decide when to terminate. It is therefore essential that the Partition Selector returns with an invalid partition at some point - to avoid the tree reaching its maximum size and capacity.

Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
userData  NULL.
Returns:
Returns TRUE if successful, FALSE otherwise.
RwBool RtWorldImportSectorAspectSizePartitionTerminator RtWorldImportBuildSector   buildSector,
RtWorldImportBuildStatus   buildStatus,
void *    userData
 

RtWorldImportSectorAspectSizePartitionTerminator is the terminator that returns TRUE when the size of the sector is less than or equal to the values provided. Each dimension is treated separately.

Note:
The default terminator may override this if it returns TRUE and the sector is still too large by the default parameters.
Note:
This terminator will be overidden if the default terminator does not permit termination.
Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
userData  A pointer to an RwV3d pointer that is the maximum size of the x, y and z axes of the sector respectively.
Returns:
TRUE if the size of each axis is less than or equal to the values in userData.
See also:
RtWorldImportDefaultPartitionTerminator
RwBool RtWorldImportSectorHeightPartitionTerminator RtWorldImportBuildSector   buildSector,
RtWorldImportBuildStatus   buildStatus,
void *    userData
 

RtWorldImportSectorHeightPartitionTerminator is a hybrid terminator; its base criterion is minimum sector size, but this is a function of the height of the sector - sectors nearer the top of the world are terminated earlier than those near the bottom. The sectors also have a minimum aspect ratio of 2:1:2. This terminator is useful in outdoor scenes.

Note:
This terminator will be overidden if the default terminator does not permit termination.
Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
userData  A pointer to an array of five values that are: the floor height, ceiling height, world size, minimum sector size, and the power - affecting the change of size of sectors towards the bottom of the scene.
Returns:
TRUE if the size of the sector is less than or equal to that dictated by the values in userData.
See also:
RtWorldImportDefaultPartitionTerminator
RwBool RtWorldImportSizePartitionTerminator RtWorldImportBuildSector   buildSector,
RtWorldImportBuildStatus   buildStatus,
void *    userData
 

RtWorldImportSizePartitionTerminator returns TRUE when the dimensions of the sector fall within the value specified in the user data.

Note:
This terminator will be overidden if the default terminator does not permit termination.
Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
userData  A pointer to an RwReal that is the size.
Returns:
TRUE if the size of the buildSector is less than or equal to the size in userData.
See also:
RtWorldImportDefaultPartitionTerminator

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:57 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)