Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RtWorldImport
[Basic Geometry]


Modules

RtWorldImportPartitionSelectors
RtWorldImportPartitionIterators
RtWorldImportPartitionEvaluators
RtWorldImportPartitionTerminators
RtWorldImportGuideKD
RtWorldImportHints

Data Structures

struct   RtWorldImport
struct   RtWorldImportBBoxHintDesc
struct   RtWorldImportBuildCallBacks
struct   RtWorldImportBuildClipStatistics
struct   RtWorldImportBuildPolyInfo
struct   RtWorldImportBuildSector
struct   RtWorldImportBuildStatus
struct   RtWorldImportBuildVertex
union   RtWorldImportBuildVertexMode
struct   RtWorldImportGuideKDTree
struct   RtWorldImportHints
struct   RtWorldImportParameters
struct   RtWorldImportPartition
struct   RtWorldImportTriangle
struct   RtWorldImportUserdataCallBacks
struct   RtWorldImportVertex

Defines

#define  rtWORLDIMPORTINVALIDPARTITION   RwRealMAXVAL

Typedefs

typedef RwBool(*  RtWorldImportProgressCallBack )(RwInt32 msg, RwReal value)
typedef RwBool(*  RtWorldImportDestroyVertexUserdataCallBack )(void **pUserdata)
typedef RwBool(*  RtWorldImportCloneVertexUserdataCallBack )(void **pUserdataDst, void **pUserdataSrc)
typedef RwBool(*  RtWorldImportInterpVertexUserdataCallBack )(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta)
typedef RwBool(*  RtWorldImportDestroyPolygonUserdataCallBack )(void **pUserdata)
typedef RwBool(*  RtWorldImportSplitPolygonUserdataCallBack )(void **pUserdataDst, void **pUserdataSrc)
typedef RwBool(*  RtWorldImportSectorSetVertexUserdataCallBack )(void **pUserdata, RpWorldSector *sector, RwInt32 index)
typedef RwBool(*  RtWorldImportSectorSetPolygonUserdataCallBack )(void **pUserdata, RpWorldSector *sector, RwInt32 index)
typedef RwBool(*  RtWorldImportTerminationBuildCallBack )(RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *pData)
typedef RwReal(*  RtWorldImportPartitionBuildCallBack )(RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, RtWorldImportPartition *partition, void *pData)

Enumerations

enum   RtWorldImportHintGroup { rtWORLDIMPORTSHIELDHINT = 0, rtWORLDIMPORTPARTITIONHINT, rtWORLDIMPORTFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum   RtWorldImportBuildPartitionSelector { rwBUILDPARTITIONSELECTOR_DEFAULT, rwBUILDPARTITIONSELECTOR_GUIDED }

Functions

void  RtWorldImportSetPartitionStatistics (RtWorldImportBuildSector *buildSector, RtWorldImportPartition *partition)
void  RtWorldImportSetUserdataCallBacks (RtWorldImportDestroyVertexUserdataCallBack destroyVertexUserdataCB, RtWorldImportCloneVertexUserdataCallBack cloneVertexUserdataCB, RtWorldImportInterpVertexUserdataCallBack interpVertexUserdataCB, RtWorldImportSectorSetVertexUserdataCallBack sectorSetVertexUserdata, RtWorldImportDestroyPolygonUserdataCallBack destroyPolygonUserdataCB, RtWorldImportSplitPolygonUserdataCallBack splitPolygonUserdataCB, RtWorldImportSectorSetPolygonUserdataCallBack sectorSetPolygonUserdata)
void  RtWorldImportSetProgressCallBack (RtWorldImportProgressCallBack CB)
void  RtWorldImportSetBuildCallBacks (RtWorldImportPartitionBuildCallBack partitionBuildCB, RtWorldImportTerminationBuildCallBack terminationBuildCB)
void  RtWorldImportSetBuildCallBacksUserData (void *partitionUserData, void *terminateUserData)
RtWorldImport RtWorldImportWrite (RtWorldImport *world, RwChar *filename)
RtWorldImport RtWorldImportRead (RwChar *filename)
void  RtWorldImportParametersInit (RtWorldImportParameters *params)
void  RtWorldImportParametersSet (RtWorldImportParameters *params)
RtWorldImportParameters RtWorldImportParametersGet (void)
RtWorldImport RtWorldImportAddNumVertices (RtWorldImport *nohsworld, RwInt32 numNewVertices)
RtWorldImport RtWorldImportAddNumTriangles (RtWorldImport *nohsworld, RwInt32 numNewTriangles)
RpMaterial RtWorldImportGetMaterial (RtWorldImport *nohsworld, RwInt32 matInd)
RwInt32  RtWorldImportGetNumVertices (RtWorldImport *nohsworld)
RtWorldImportVertex RtWorldImportGetVertices (RtWorldImport *nohsworld)
RwInt32  RtWorldImportGetNumTriangles (RtWorldImport *nohsworld)
RtWorldImportTriangle RtWorldImportGetTriangles (RtWorldImport *nohsworld)
RwInt32  RtWorldImportAddMaterial (RtWorldImport *nohsworld, RpMaterial *material)
RwInt32  RtWorldImportGetMaterialIndex (RtWorldImport *nohsworld, RpMaterial *material)
RtWorldImport RtWorldImportForAllMaterials (RtWorldImport *nohsworld, RpMaterialCallBack fpCallBack, void *pData)
RpWorld RtWorldImportCreateWorld (RtWorldImport *nohsworld, RtWorldImportParameters *conversionParams)
RpGeometry RtWorldImportCreateGeometry (RtWorldImport *nohsworld, RtWorldImportParameters *conversionParams)
RtWorldImport RtWorldImportCreate (void)
RwBool  RtWorldImportDestroy (RtWorldImport *nohsworld)

Detailed Description

World Import Toolkit for RenderWare.

RtWorldImport Toolkit Overview

Requirements

Overview

The functions in this toolkit are used to create a static world within an RpWorld object and generate the associated compressed BSP data.

The developer would normally create an RtWorldImport object, initialize it with all the static data needed for the final RpWorld object, fill the RtWorldImportParameters structure with the required settings and then call RtWorldImportCreateWorld to generate the BSP tree.

Callbacks are provided to increase flexibility.


Define Documentation

#define rtWORLDIMPORTINVALIDPARTITION   RwRealMAXVAL
 

This value means that no partition was found, or that the partition was invalid or impractical. The value represents infinity.


Typedef Documentation

typedef RwBool(* RtWorldImportCloneVertexUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc)
 

RtWorldImportCloneVertexUserdataCallBack

A pointer to the CallBack function that will be called during vertex cloning.

Parameters:
pUserdataDst  A handle to the userdata for the destination
pUserdataSrc  A handle to the userdata for the source
Returns:
TRUE on success, FALSE otherwise
typedef RwBool(* RtWorldImportDestroyPolygonUserdataCallBack)(void **pUserdata)
 

RtWorldImportDestroyPolygonUserdataCallBack

A pointer to the CallBack function that will be called during polygon destruction.

Parameters:
pUserdata  A handle to the userdata
Returns:
TRUE on success, FALSE otherwise
typedef RwBool(* RtWorldImportDestroyVertexUserdataCallBack)(void **pUserdata)
 

RtWorldImportDestroyVertexUserdataCallBack

A pointer to the CallBack function that will be called during vertex destruction.

Parameters:
pUserdata  A handle to the userdata
Returns:
TRUE on success, FALSE otherwise
typedef RwBool(* RtWorldImportInterpVertexUserdataCallBack)(void **pUserdataDst, void **pUserdata1, void **pUserdata2, RwReal delta)
 

RtWorldImportInterpVertexUserdataCallBack

A pointer to the CallBack function that will be called during vertex interpolation.

Parameters:
pUserdataDst  A handle to the userdata for the destination
pUserdata1  A handle to the first source
pUserdata2  A handle to the second source
delta  The delta between the two sources
Returns:
TRUE on success, FALSE otherwise
typedef RwReal(* RtWorldImportPartitionBuildCallBack)(RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, RtWorldImportPartition *partition, void *pData)
 

RtWorldImportPartitionBuildCallBack

A pointer to the function that will be called during the build process to select a suitable sector partition.

Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
partition  A pointer to the partition that is found.
Returns:
The cost value of the partitioner.
typedef RwBool(* RtWorldImportProgressCallBack)(RwInt32 msg, RwReal value)
 

RtWorldImportProgressCallBack is the type for the callback function supplied to RtWorldImportSetProgressCallBack.

Parameters:
msg  Message type corresponding to one of the following:
  • rtWORLDIMPORTPROGRESSBSPBUILDSTART - The BSP creation process is about to start. The argument value is equal to 0.0.
  • rtWORLDIMPORTPROGRESSBSPBUILDUPDATE - The BSP creation process has finished processing a subsection of the world. The argument value is equal to the percentage of the world processed up to this point.
  • rtWORLDIMPORTPROGRESSBSPBUILDEND - The BSP creation process has ended. The argument value is equal to 100.0.
  • rtWORLDIMPORTPROGRESSBSPCOMPRESSSTART - The BSP compression process is about to start. The argument value is equal to 0.0.
  • rtWORLDIMPORTPROGRESSBSPCOMPRESSUPDATE - The BSP compression has finished processing a subsection of the world. The argument value is equal to the percentage of the world processed up to this point.
  • rtWORLDIMPORTPROGRESSBSPCOMPRESSEND - The BSP compression process has ended. The argument value is equal to 100.0.
value  The percentage of the progress made in either BSP building or BSP compression.
Returns:
TRUE to continue BSP processing, FALSE to abort.
See also:
RtWorldImportSetProgressCallBack
typedef RwBool(* RtWorldImportSectorSetPolygonUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index)
 

RtWorldImportSectorSetPolygonUserdataCallBack

A pointer to the CallBack function that will be called during the setting of the polygon user data.

Parameters:
pUserdata  A handle to the userdata
sector  A pointer to the sector
index  Index to the vertex
Returns:
TRUE on success, FALSE otherwise
typedef RwBool(* RtWorldImportSectorSetVertexUserdataCallBack)(void **pUserdata, RpWorldSector *sector, RwInt32 index)
 

RtWorldImportSectorSetVertexUserdataCallBack

A pointer to the CallBack function that will be called during the setting of the vertex user data.

Parameters:
pUserdata  A handle to the userdata
sector  A pointer to the sector
index  Index to the vertex
Returns:
TRUE on success, FALSE otherwise
typedef RwBool(* RtWorldImportSplitPolygonUserdataCallBack)(void **pUserdataDst, void **pUserdataSrc)
 

RtWorldImportSplitPolygonUserdataCallBack

A pointer to the CallBack function that will be called during polygon division.

Parameters:
pUserdataDst  A handle to the userdata for the destination
pUserdataSrc  A handle to the userdata for the source
Returns:
TRUE on success, FALSE otherwise
typedef RwBool(* RtWorldImportTerminationBuildCallBack)(RtWorldImportBuildSector *buildSector, RtWorldImportBuildStatus *buildStatus, void *pData)
 

RtWorldImportTerminationBuildCallBack

A pointer to the function that will be called during the build process to determine whether the current sector should be subdivided further, or terminated.

Parameters:
buildSector  A pointer to the Build Sector.
buildStatus  A pointer to the Build Status.
pData  A point to the unknown additional data
Returns:
TRUE if termination is valid (all criteria have been met, FALSE otherwise

Enumeration Type Documentation

enum RtWorldImportBuildPartitionSelector
 

RtWorldImportBuildPartitionSelector

An enumeration that can be passed to RtWorldImportSetStandardBuildPartitionSelector to determine whether partitioning will be achieved automatically, using the default partition selected, or manually using the RtWorldImportGuideKDTree

Enumeration values:
rwBUILDPARTITIONSELECTOR_DEFAULT  Sets the default automated process
rwBUILDPARTITIONSELECTOR_GUIDED  Sets the guided manual process
enum RtWorldImportHintGroup
 

RtWorldImportHintGroup

An enumeration that can be passed to RtWorldImportHintsSetGroup and RtWorldImportHintsGetGroup to determine whether hints will contribute towards the shield hint group or partition hint group

Enumeration values:
rtWORLDIMPORTSHIELDHINT  Hint type shield
rtWORLDIMPORTPARTITIONHINT  Hint type partition

Function Documentation

RwInt32 RtWorldImportAddMaterial RtWorldImport   nohsworld,
RpMaterial   material
 

RtWorldImportAddMaterial is used to register the given material with the specified import world. Once registered, this material can be associated with any triangle constituting the import world via the returned material index. All triangles must have a material before the import world is converted to a BSP world.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
nohsworld  A pointer to the import world.
material  A pointer to the material.
Returns:
Returns the material’s index if successful or -1 if there is an error.
See also:
RtWorldImportAddNumTriangles , RtWorldImportAddNumVertices , RtWorldImportGetTriangles , RtWorldImportGetVertices , RtWorldImportCreate , RtWorldImportCreateWorld , RpWorldPluginAttach
RtWorldImport* RtWorldImportAddNumTriangles RtWorldImport   nohsworld,
RwInt32    numNewTriangles
 

RtWorldImportAddNumTriangles is used to allocate memory in the specified import world for the given number of additional triangles.

Note:
This function initializes the new vertex array elements to zero (of type RtWorldImportTriangle) and the effect of this function is cumulative.
The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.
Parameters:
nohsworld  A pointer to the import world.
numNewTriangles  The number of triangles to add.
Returns:
Returns a pointer to the import world if successful or NULL if there is an error.
See also:
RtWorldImportAddNumVertices , RtWorldImportAddMaterial , RtWorldImportGetTriangles , RtWorldImportGetVertices , RtWorldImportCreate , RtWorldImportCreateWorld , RpWorldPluginAttach
RtWorldImport* RtWorldImportAddNumVertices RtWorldImport   nohsworld,
RwInt32    numNewVertices
 

RtWorldImportAddNumVertices is used to allocate memory in the specified import world for the given number of additional vertices.

Note:
This function initializes the new vertex array elements to zero (of type RtWorldImportVertex) and the effect of this function is cumulative.
The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.
Parameters:
nohsworld  A pointer to the import world.
numNewVertices  The number of vertices to add.
Returns:
Returns a pointer to the import world if successful or NULL if there is an error.
See also:
RtWorldImportAddNumTriangles , RtWorldImportAddMaterial , RtWorldImportGetTriangles , RtWorldImportGetVertices , RtWorldImportCreate , RtWorldImportCreateWorld , RpWorldPluginAttach
RtWorldImport* RtWorldImportCreate void   
 

RtWorldImportCreate is used to create a new import world that has no vertices or triangles.

Vertices and triangles must be allocated and initialized before attempting to create a world using RtWorldImportCreateWorld. Use the function RtWorldImportDestroy to free this memory.

Also, an RtWorldImportParameters structure must be defined, and initialized with RtWorldImportParametersInit, for use in creating a BSP world from the import world.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Returns:
Returns a pointer to a new import world if successful or NULL if there is an error.
See also:
RtWorldImportDestroy , RtWorldImportAddNumVertices , RtWorldImportAddNumTriangles , RtWorldImportAddMaterial , RtWorldImportCreateWorld , RtWorldImportParametersInit , RtWorldImportParametersSet , RtWorldImportParametersGet , RtWorldImportSetBuildCallBacks , RtWorldImportSetBuildCallBacksUserData , RtWorldImportSetStandardBuildPartitionSelector , RtWorldImportRead , RtWorldImportWrite , RpWorldPluginAttach
RpGeometry* RtWorldImportCreateGeometry RtWorldImport   nohsworld,
RtWorldImportParameters   conversionParams
 

RtWorldImportCreateGeometry is used to create a geometry from the specified import world according to the given conversion parameters. The geometry is created with one morph target and with the following flags: rpGEOMETRYLIGHT, rpGEOMETRYNORMALS, rpGEOMETRYTEXTURED and rpGEOMETRYPRELIT.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Note:
All triangles must have an associated material before the import world is converted to a geometry.
Parameters:
nohsworld  A pointer to the import world.
conversionParams  A pointer to the world convert structure RtWorldImportParameters
Returns:
Returns a pointer to the new geometry if successful or NULL if there is an error.
See also:
RtWorldImportCreateWorld , RtWorldImportParametersInit , RtWorldImportParametersSet , RtWorldImportParametersGet , RtWorldImportSetProgressCallBack , RtWorldImportDestroy , RpWorldPluginAttach
RpWorld* RtWorldImportCreateWorld RtWorldImport   nohsworld,
RtWorldImportParameters   params
 

RtWorldImportCreateWorld is used to create a BSP world from the specified import world according to the given conversion parameters.

A world uses a BSP mechanism to make collision detection and rendering faster. An import world has no such mechanism and is a large collection of vertices and polygons that describe the world.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Note:
All triangles must have an associated material before the import world is converted to a BSP world.
Parameters:
nohsworld  A pointer to the import world.
params  A pointer to the world convert structure.
Returns:
Returns a pointer to the new world if successful or NULL if there is an error.
See also:
RtWorldImportParametersInit , RtWorldImportParametersSet , RtWorldImportParametersGet , RtWorldImportSetBuildCallBacks , RtWorldImportSetBuildCallBacksUserData , RtWorldImportSetStandardBuildPartitionSelector , RtWorldImportSetProgressCallBack , RtWorldImportDestroy , RpWorldPluginAttach
RwBool RtWorldImportDestroy RtWorldImport   nohsworld
 

RtWorldImportDestroy is used to destroy the specified import world. This function should be used to free the memory allocated to triangles, vertices and materials created via RtWorldImportCreate or RtWorldImportRead.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
nohsworld  A pointer to the import world.
Returns:
Returns TRUE if successful or FALSE if there is an error
See also:
RtWorldImportCreate , RtWorldImportRead , RpWorldPluginAttach
RtWorldImport* RtWorldImportForAllMaterials RtWorldImport   nohsworld,
RpMaterialCallBack    fpCallBack,
void *    pData
 

RtWorldImportForAllMaterials is used to apply the given callback function to all materials registered with the specified import world. The format of the callback function is:


   RpMaterial *(*RpMaterialCallBack)(RpMaterial *material, void *data);
   
where (void *data) is a user-supplied data pointer to pass to the callback function.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Note:
If any invocation of the callback function returns a failure status the iteration is terminated. However, RtWorldImportForAllMaterials will still return successfully.
Parameters:
nohsworld  A pointer to the import world.
fpCallBack  A pointer to the callback function to apply to each material.
pData  A pointer to user-supplied data to pass to the callback function.
Returns:
Returns a pointer to the import world if successful or NULL if there is an error.
See also:
RtWorldImportGetMaterial , RtWorldImportGetMaterialIndex , RtWorldImportGetVertices , RtWorldImportGetTriangles , RtWorldImportGetNumVertices , RtWorldImportGetNumTriangles , RpWorldPluginAttach
RpMaterial* RtWorldImportGetMaterial RtWorldImport   nohsworld,
RwInt32    matInd
 

RtWorldImportGetMaterial is used to retrieve a material from the specified import world with the given index into the import world’s material list.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
nohsworld  A pointer to the import world.
matInd  Material index.
Returns:
Returns a pointer to the material if successful or NULL if there is an error.
See also:
RtWorldImportGetMaterialIndex , RtWorldImportGetVertices , RtWorldImportGetTriangles , RtWorldImportGetNumVertices , RtWorldImportGetNumTriangles , RpWorldPluginAttach
RwInt32 RtWorldImportGetMaterialIndex RtWorldImport   nohsworld,
RpMaterial   material
 

RtWorldImportGetMaterialIndex is used to retrieve the index of the given material from the specified import world’s material list.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
nohsworld  A pointer to the import world.
material  A pointer to the material.
Returns:
Returns the material’s index if successful or -1 if there is an error.
See also:
RtWorldImportGetMaterial , RtWorldImportGetVertices , RtWorldImportGetTriangles , RtWorldImportGetNumVertices , RtWorldImportGetNumTriangles , RpWorldPluginAttach
RwInt32 RtWorldImportGetNumTriangles RtWorldImport   nohsworld
 

RtWorldImportGetNumTriangles is used to retrieve the number of triangles defining the specified import world.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
nohsworld  A pointer to the import world.
Returns:
Returns an RwInt32 value equal to the number of triangles if successful or -1 if there is an error.
See also:
RtWorldImportAddNumTriangles , RtWorldImportAddNumVertices , RtWorldImportGetVertices , RtWorldImportGetTriangles , RtWorldImportGetNumVertices , RtWorldImportGetMaterial , RpWorldPluginAttach
RwInt32 RtWorldImportGetNumVertices RtWorldImport   nohsworld
 

RtWorldImportGetNumVertices is used to retrieve the number of vertices defining the specified import world.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
nohsworld  A pointer to the import world.
Returns:
Returns an RwInt32 value equal to the number of vertices if successful or -1 if there is an error.
See also:
RtWorldImportAddNumTriangles , RtWorldImportAddNumVertices , RtWorldImportGetVertices , RtWorldImportGetTriangles , RtWorldImportGetMaterial , RtWorldImportGetNumTriangles , RpWorldPluginAttach
RtWorldImportTriangle* RtWorldImportGetTriangles RtWorldImport   nohsworld
 

RtWorldImportGetTriangles is used to retrieve the array of triangles (of type RtWorldImportTriangle) from the specified import world. Use this function for directly defining the properties of each triangle.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
nohsworld  A pointer to the import world.
Returns:
Returns an array of RtWorldImportTriangle values if successful or NULL if there is an error.
See also:
RtWorldImportAddNumTriangles , RtWorldImportAddNumVertices , RtWorldImportGetVertices , RtWorldImportGetMaterial , RtWorldImportGetNumVertices , RtWorldImportGetNumTriangles , RpWorldPluginAttach
RtWorldImportVertex* RtWorldImportGetVertices RtWorldImport   nohsworld
 

RtWorldImportGetVertices is used to retrieve the array of vertices of type RtWorldImportVertex from the specified import world. Use this function for directly defining the properties of each vertex.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
nohsworld  A pointer to the import world.
Returns:
Returns an array of RtWorldImportVertex values if successful or NULL if there is an error.
See also:
RtWorldImportAddNumTriangles , RtWorldImportAddNumVertices , RtWorldImportGetMaterial , RtWorldImportGetTriangles , RtWorldImportGetNumVertices , RtWorldImportGetNumTriangles , RpWorldPluginAttach
RtWorldImportParameters* RtWorldImportParametersGet void   
 

RtWorldImportParametersGet is used to get the specified world convert structure RtWorldImportParameters with its given values.

Returns:
A pointer to the parameters
See also:
RtWorldImportParameters , RtWorldImportParametersInit , RtWorldImportParametersSet
void RtWorldImportParametersInit RtWorldImportParameters   params
 

RtWorldImportParametersInit is used to initialize the specified world convert structure RtWorldImportParameters with default values. The world convert structure is used by RtWorldImportCreateWorld to produce a world containing static geometry in the form of a compressed BSP tree. It controls the way the new world is generated.

The following default values are set:

  • worldSectorMaxSize = RwRealMAXVAL
  • maxWorldSectorPolygons = 1024
  • calcNormals = TRUE
  • weldThreshold = (RwReal)0.001
  • angularThreshold = (RwReal)0.8660254
  • maxOverlapPercent = (RwReal)0.25
  • conditionGeometry = TRUE
  • userSpecifiedBBox = FALSE
  • uvLimit = (RwReal)16.0
  • retainCreases = FALSE
  • fixTJunctions = TRUE
  • weldPolygons = TRUE
  • flags: rpWORLDTEXTURED rpWORLDPRELIT rpWORLDNORMALS rpWORLDLIGHT
  • mode = rwTEXTUREADDRESSWRAP
  • sortPolygons = FALSE
  • cullZeroAreaPolygons = FALSE
  • numTexCoordSets = 0 (ie use flags to determine this)
  • terminatorCheck = TRUE
The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.
Returns:
WorldImportParams pointer to the world convert structure.
See also:
RtWorldImportParameters , RtWorldImportParametersSet , RtWorldImportParametersGet , RtWorldImportCreate , RpWorldPluginAttach
void RtWorldImportParametersSet RtWorldImportParameters   params
 

RtWorldImportParametersSet is used to set the specified world convert structure RtWorldImportParameters with specified values.

Parameters:
params  A pointer to the parameters
See also:
RtWorldImportParameters , RtWorldImportParametersInit , RtWorldImportParametersGet
RtWorldImport* RtWorldImportRead RwChar   filename
 

RtWorldImportRead is used to load a binary representation of the an import world from the given disk file.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
filename  Pointer to a string containing the name of the input file.
Returns:
Returns a pointer to the import world if successful or NULL if there is an error.
See also:
RtWorldImportWrite , RpWorldPluginAttach
void RtWorldImportSetBuildCallBacks RtWorldImportPartitionBuildCallBack    partitionBuildCB,
RtWorldImportTerminationBuildCallBack    terminationBuildCB
 

RtWorldImportSetBuildCallBacks should be called to set the required or custom RtWorldImportPartitionBuildCallBack and RtWorldImportTerminationBuildCallBack

Parameters:
partitionBuildCB  The RtWorldImportPartitionBuildCallBack
terminationBuildCB  The RtWorldImportTerminationBuildCallBack
See also:
RtWorldImportSetBuildCallBacksUserData , RtWorldImportSetStandardBuildPartitionSelector
void RtWorldImportSetBuildCallBacksUserData void *    partitionUserData,
void *    terminateUserData
 

RtWorldImportSetBuildCallBacksUserData should be called to set the user data that is required by the RtWorldImportPartitionBuildCallBack and RtWorldImportTerminationBuildCallBack

Parameters:
partitionUserData  The user data required for the RtWorldImportPartitionBuildCallBack
terminateUserData  The user data required for the RtWorldImportTerminationBuildCallBack
See also:
RtWorldImportSetBuildCallBacks , RtWorldImportSetStandardBuildPartitionSelector
void RtWorldImportSetPartitionStatistics RtWorldImportBuildSector   buildSector,
RtWorldImportPartition   partition
 

RtWorldImportSetPartitionStatistics is used to set the stats for the given partition. This must be called before using any of the statistics of a partitioner.

Parameters:
buildSector  The current build sector.
partition  Candidate or chosen partition.
void RtWorldImportSetProgressCallBack RtWorldImportProgressCallBack    CB
 

RtWorldImportSetProgressCallBack is used to define a callback function that is called from RtWorldImportCreateWorld at strategic points to indicate the progress made in constructing a BSP world from an import world.

The format of the callback function is:


  void (*RtWorldImportProgressCallBack) (RwInt32 message, RwReal value);
  
where message is one of the following,
  • rtWORLDIMPORTPROGRESSBSPBUILDSTART The BSP creation process is about to start. The argument value is equal to 0.0.
  • rtWORLDIMPORTPROGRESSBSPBUILDUPDATE The BSP creation process has finished processing a subsection of the world. The argument value is equal to the percentage of the world processed up to this point.
  • rtWORLDIMPORTPROGRESSBSPBUILDEND The BSP creation process has ended. The argument value is equal to 100.0.
  • rtWORLDIMPORTPROGRESSBSPCOMPRESSSTART The BSP compression process is about to start. The argument value is equal to 0.0.
  • rtWORLDIMPORTPROGRESSBSPCOMPRESSUPDATE The BSP compression has finished processing a subsection of the world. The argument value is equal to the percentage of the world processed up to this point.
  • rtWORLDIMPORTPROGRESSBSPCOMPRESSEND The BSP compression process has ended. The argument value is equal to 100.0.
No callback function is defined until this function is called.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
CB  A pointer to the progress callback function of type.
See also:
RtWorldImportProgressCallBack , RtWorldImportCreateWorld , RpWorldPluginAttach
void RtWorldImportSetUserdataCallBacks RtWorldImportDestroyVertexUserdataCallBack    destroyVertexUserdataCB,
RtWorldImportCloneVertexUserdataCallBack    cloneVertexUserdataCB,
RtWorldImportInterpVertexUserdataCallBack    interpVertexUserdataCB,
RtWorldImportSectorSetVertexUserdataCallBack    sectorSetVertexUserdataCB,
RtWorldImportDestroyPolygonUserdataCallBack    destroyPolygonUserdataCB,
RtWorldImportSplitPolygonUserdataCallBack    splitPolygonUserdataCB,
RtWorldImportSectorSetPolygonUserdataCallBack    sectorSetPolygonUserdataCB
 

RtWorldImportSetUserdataCallBacks is used to define a set of callback functions that are called from RtWorldImportCreateWorld in order to allow userdata to be passed from an import world to an RpWorld.

No callback functions are defined until this function is called.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
destroyVertexUserdataCB  Pointers to the user data callback functions.
cloneVertexUserdataCB  Pointer to the callback function for cloning
interpVertexUserdataCB  Pointer to the callback function for interpolating
sectorSetVertexUserdataCB  Pointer to the callback function for vertices on sector creation
destroyPolygonUserdataCB  Pointer to the callback function for polygon destruction
splitPolygonUserdataCB  Pointer to the callback function for polygon splitting
sectorSetPolygonUserdataCB  Pointer to the callback function for polygons on sector creation
See also:
RtWorldImportDestroyVertexUserdataCallBack , RtWorldImportCloneVertexUserdataCallBack , RtWorldImportInterpVertexUserdataCallBack , RtWorldImportDestroyPolygonUserdataCallBack , RtWorldImportSplitPolygonUserdataCallBack , RtWorldImportCreateWorld , RpWorldPluginAttach
RtWorldImport* RtWorldImportWrite RtWorldImport   world,
RwChar   filename
 

RtWorldImportWrite is used to save a binary representation of the specified import world to the given disk file.

The world plugin must be attached before using this function. The include file rtimport.h and the library file rtimport.lib are also required.

Parameters:
world  A pointer to the import world.
filename  Pointer to a string containing the name of the input file.
Returns:
Returns a pointer to the import world if successful or NULL if there is an error.
See also:
RtWorldImportWrite , RpWorldPluginAttach

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