Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RtLtMapCnv
[Lighting]


Data Structures

struct  RtLtMapCnvAtomicSession
struct  rtLtMapCnvImageList
struct  RtLtMapCnvWorldSectorData
struct  RtLtMapCnvWorldSession

Enumerations

enum  RtLtMapCnvErrorFlags {
  rtLTMAPERROR_NONE = ((int)0x00000000), rtLTMAPERROR_IMPORTEDUVSOVERONEDOTZERO = ((int)0x00000001), rtLTMAPERROR_GENERATEDLIGHTMAPNOTFOUND = ((int)0x00000002), rtLTMAPERROR_NOGENERATEDLIGHTMAPS = ((int)0x00000004),
  rtLTMAPERROR_IMPORTEDLIGHTMAPNOTFOUND = ((int)0x00000008), rtLTMAPERROR_NOIMPORTEDLIGHTMAPS = ((int)0x00000010), RTLTMAPERROR_FORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}

Functions

RpUserDataArrayRtLtMapCnvAtomicGetTexNameArray (RpAtomic *atm)
RpUserDataArrayRtLtMapCnvAtomicGetUArray (RpAtomic *atm)
RpUserDataArrayRtLtMapCnvAtomicGetVArray (RpAtomic *atm)
RpAtomicRtLtMapCnvAtomicCnvDataCreate (RpAtomic *atm)
RpAtomicRtLtMapCnvAtomicCnvDataDestroy (RpAtomic *atm)
RtLtMapCnvAtomicSessionRtLtMapCnvAtomicSessionCreate (RpAtomic *atomic)
void RtLtMapCnvAtomicSessionDestroy (RtLtMapCnvAtomicSession *session)
RwBool RtLtMapCnvAtomicConvert (RtLtMapCnvAtomicSession *session, RwUInt32 factor)
RwBool RtLtMapCnvAtomicIsConvertible (RpAtomic *atomic)
void RtLtMapCnvAtomicSetVtxUV (RtLtMapCnvAtomicSession *session, RwInt32 idx, RwTexCoords *tex)
void RtLtMapCnvAtomicGetVtxUV (RtLtMapCnvAtomicSession *session, RwInt32 idx, RwTexCoords *tex)
void RtLtMapCnvAtomicSetLightMapName (RtLtMapCnvAtomicSession *session, RwInt32 idx, RwChar *name)
RwCharRtLtMapCnvAtomicGetLightMapName (RtLtMapCnvAtomicSession *session, RwInt32 idx)
void RtLtMapCnvAtomicSessionSetImportedLtMapResample (RtLtMapCnvAtomicSession *session, RwBool resample)
void RtLtMapCnvAtomicSessionSetGreedyRasterization (RtLtMapCnvAtomicSession *session, RwBool greedy)
void RtLtMapCnvAtomicSessionSetRejectionFactor (RtLtMapCnvAtomicSession *session, RwReal factor)
RwBool RtLtMapCnvAtomicSessionGetImportedLtMapResample (RtLtMapCnvAtomicSession *session)
RwBool RtLtMapCnvAtomicSessionGetGreedyRasterization (RtLtMapCnvAtomicSession *session)
RwReal RtLtMapCnvAtomicSessionGetRejectionFactor (RtLtMapCnvAtomicSession *session)
RpUserDataArrayRtLtMapCnvWorldSectorGetTexNameArray (RpWorldSector *ws)
RpUserDataArrayRtLtMapCnvWorldSectorGetUArray (RpWorldSector *ws)
RpUserDataArrayRtLtMapCnvWorldSectorGetVArray (RpWorldSector *ws)
RpWorldSectorRtLtMapCnvWorldSectorCnvDataCreate (RpWorldSector *ws)
RpWorldSectorRtLtMapCnvWorldSectorCnvDataDestroy (RpWorldSector *ws)
RtLtMapCnvWorldSessionRtLtMapCnvWorldSessionCreate (RpWorld *world)
void RtLtMapCnvWorldSessionDestroy (RtLtMapCnvWorldSession *session)
RwBool RtLtMapCnvWorldConvert (RtLtMapCnvWorldSession *session, RwUInt32 factor)
RwBool RtLtMapCnvWorldIsConvertible (RpWorld *world)
void RtLtMapCnvWorldSectorSetVtxUV (RtLtMapCnvWorldSectorData *data, RwInt32 idx, RwTexCoords *tex)
void RtLtMapCnvWorldSectorGetVtxUV (RtLtMapCnvWorldSectorData *data, RwInt32 idx, RwTexCoords *tex)
void RtLtMapCnvWorldSectorSetLightMapName (RtLtMapCnvWorldSectorData *data, RwInt32 idx, RwChar *name)
RwCharRtLtMapCnvWorldSectorGetLightMapName (RtLtMapCnvWorldSectorData *data, RwInt32 idx)
void RtLtMapCnvWorldSessionSetImportedLtMapResample (RtLtMapCnvWorldSession *session, RwBool resample)
void RtLtMapCnvWorldSessionSetGreedyRasterization (RtLtMapCnvWorldSession *session, RwBool greedy)
void RtLtMapCnvWorldSessionSetRejectionFactor (RtLtMapCnvWorldSession *session, RwReal factor)
RwBool RtLtMapCnvWorldSessionGetImportedLtMapResample (RtLtMapCnvWorldSession *session)
RwBool RtLtMapCnvWorldSessionGetGreedyRasterization (RtLtMapCnvWorldSession *session)
RwReal RtLtMapCnvWorldSessionGetRejectionFactor (RtLtMapCnvWorldSession *session)

Detailed Description

Lightmap Conversion toolkit for RenderWare.

RtLtMap Conversion Toolkit Overview

Requirements

Overview

The RtLtMapCnv toolkit contains a set of functions for converting lightmaps. This toolkit suppliments RtLtMap, a lightmap generation toolkit.

Many major modelling packages provide the functionality to generate lightmaps. RtLtMapCnv provides a set of functionality to postprocess these lightmaps into a form that RenderWare can use.

The conversion is a two stage process and is similar to generating lightmaps using RtLtMap. Firstly, lightmaps need to be allocated and associated with objects, and the UV coordinates for the lightmap pass need to be calculated (see RtLtMapLightMapsCreate).

Secondly, the imported lightmaps are converted. (see RtLtMapCnvWorldConvert and RtLtMapCnvAtomicConvert). This involves re-mapping each triangle lightmap in the imported lightmaps to RenderWare's lightmaps. The triangle lightmaps can be rescaled and re-oriented during the conversion. As a results, the final result may differ from the original.

Lightmaps generated by this toolkit support tristripped geometry (unusual for lightmap implementations) and so will render very quickly, especially on such platforms as PlayStation 2. A few visual artifacts remain due to this tristrip support and the conversion although, in the vast majority of cases, they will go unnoticed or easily be worked around.


Enumeration Type Documentation

enum RtLtMapCnvErrorFlags
 

RtLtMapCnvErrorFlags is an enumerated type specifying the different errors which may occur during lightmap conversion. The flags are bitfields to represent more than one type of error.

Enumeration values:
rtLTMAPERROR_IMPORTEDUVSOVERONEDOTZERO  A flag to indicate a UV out of range error.
rtLTMAPERROR_GENERATEDLIGHTMAPNOTFOUND  A flag to indicate a RenderWare lightmap was not found.
rtLTMAPERROR_NOGENERATEDLIGHTMAPS  A flag to indicate no RenderWare lightmaps were found.
rtLTMAPERROR_IMPORTEDLIGHTMAPNOTFOUND  A flag to indicate an imported lightmap was not found.
rtLTMAPERROR_NOIMPORTEDLIGHTMAPS  A flag to indicate no imported lightmaps were found.


Function Documentation

RpAtomic* RtLtMapCnvAtomicCnvDataCreate RpAtomic   atm
 

RtLtMapCnvAtomicCnvDataCreate is used to create the conversion data for an RpAtomic. This creates a set of arrays for the RpAtomic to store the UV lightmap co-ordinates and the lightmap texture name.

Parameters:
atm  A pointer to the RpAtomic.
Returns:
A pointer to an RpAtomic on success. NULL otherwise.
See also:
RtLtMapCnvAtomicCnvDataDestroy , RtLtMapCnvAtomicGetUArray , RtLtMapCnvAtomicGetVArray , RtLtMapCnvAtomicGetTexNameArray

RpAtomic* RtLtMapCnvAtomicCnvDataDestroy RpAtomic   atm
 

RtLtMapCnvAtomicCnvDataDestroy is used to destroy the conversion data attached to an RpAtomic. This destroys the set of arrays for storing the UV lightmap co-ordinates and the lightmap texture name.

Parameters:
atm  A pointer to the RpAtomic.
Returns:
A pointer to an RpAtomic on success. NULL otherwise.
See also:
RtLtMapCnvAtomicCnvDataCreate , RtLtMapCnvAtomicGetUArray , RtLtMapCnvAtomicGetVArray , RtLtMapCnvAtomicGetTexNameArray

RwBool RtLtMapCnvAtomicConvert RtLtMapCnvAtomicSession   session,
RwUInt32    factor
 

RtLtMapCnvAtomicConvert is used to convert imported lightmaps for use within RenderWare.

This function takes the imported lightmaps and converts it into a form useable by RenderWare's LightMap plugin, RpLtMap.

RenderWare lightmap textures are generated from a source sample image. For better results, this source sample image can be larger than the final lightmap texture and sampled down to a smaller size.

The sample factor specifies the scale of this source sample image relative to the destination lightmap texture.

The imported UV lightmap co-ordinates are re-mapped to new values in the destination lightmaps.

Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
factor  An RwUInt32 representing the sample factor
Returns:
TRUE on sucess, FALSE otherwise.
See also:
RtLtMapCnvAtomicSessionCreate , RtLtMapCnvAtomicSessionDestroy , RtLtMapCnvAtomicIsConvertible

RwChar* RtLtMapCnvAtomicGetLightMapName RtLtMapCnvAtomicSession   session,
RwInt32    idx
 

RtLtMapCnvAtomicGetLightMapName is used to retrieve the lightmap texture used by the triangle in an RpAtomic.

Imported lightmap data may consist of more than one lightmap per RpAtomic. Each triangle references its lightmap texture by name.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
idx  An RwInt32 representing the triangle index
Returns:
A pointer to an RwChar that is the name of the lightmap, NULL otherwise
See also:
RtLtMapCnvAtomicSetLightMapName

RpUserDataArray* RtLtMapCnvAtomicGetTexNameArray RpAtomic   atm
 

RtLtMapCnvAtomicGetTexNameArray is used to retrieve the array of lightmap name references attached to an RpAtomic.

The size of the array is equal to the number of triangles in the RpAtomic.

The array contains the lightmap texture reference for each triangle in the RpAtomic.

Parameters:
atm  A pointer to the RpAtomic.
Returns:
A pointer to an RpUserDataArray on success. NULL otherwise.
See also:
RtLtMapCnvAtomicGetUArray , RtLtMapCnvAtomicGetVArray

RpUserDataArray* RtLtMapCnvAtomicGetUArray RpAtomic   atm
 

RtLtMapCnvAtomicGetUArray is used to retrieve the array of U lightmap co-ordinates attached to an RpAtomic.

The size of the array is equal to the number of vertices in the RpAtomic.

The array contains the imported U lightmap co-ordinate for each vertex in the RpAtomic.

Parameters:
atm  A pointer to the RpAtomic.
Returns:
A pointer to an RpUserDataArray on success. NULL otherwise.
See also:
RtLtMapCnvAtomicGetVArray , RtLtMapCnvAtomicGetTexNameArray

RpUserDataArray* RtLtMapCnvAtomicGetVArray RpAtomic   atm
 

RtLtMapCnvAtomicGetVArray is used to retrieve the array of V lightmap co-ordinates attached to an RpAtomic.

The size of the array is equal to the number of vertices in the RpAtomic.

The array contains the imported V lightmap co-ordinate for each vertex in the RpAtomic.

Parameters:
atm  A pointer to the RpAtomic.
Returns:
A pointer to an RpUserDataArray on success. NULL otherwise.
See also:
RtLtMapCnvAtomicGetUArray , RtLtMapCnvAtomicGetTexNameArray

void RtLtMapCnvAtomicGetVtxUV RtLtMapCnvAtomicSession   session,
RwInt32    idx,
RwTexCoords   tex
 

RtLtMapCnvAtomicGetVtxUV is used to retrieve the UV lightmap co-ordinate of a vertex in an RpAtomic.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
idx  An RwInt32 representing the vertex index
tex  A pointer to the RwTexCoords for returning the UV co-ordinate
See also:
RtLtMapCnvAtomicSetVtxUV

RwBool RtLtMapCnvAtomicIsConvertible RpAtomic   atomic
 

RtLtMapCnvAtomicIsConvertible is used to determine if an RpAtomic can be converted for use by RenderWare's LightMap plugin, RpLtMap.

The function checks if imported lightmap data are attached to an RpAtomic. If so, then the RpAtomic is determined to be convertible.

Parameters:
atomic  A pointer to the RpAtomic
Returns:
TRUE if the RpAtomic is convertible, FALSE otherwise.
See also:
RtLtMapCnvAtomicSessionCreate , RtLtMapCnvAtomicSessionDestroy , RtLtMapCnvAtomicConvert

RtLtMapCnvAtomicSession* RtLtMapCnvAtomicSessionCreate RpAtomic   atomic
 

RtLtMapCnvAtomicSessionCreate is used to create a RtLtMapCnvAtomicSession.

The RtLtMapCnvAtomicSession will be initialized with default values. The pointer to an RpAtomic is cached inside the session, since a session is not usable with a NULL Atomic pointer.

Parameters:
atomic  A pointer to the RpAtomic
Returns:
A pointer to an RtLtMapCnvAtomicSession on success. NULL otherwise.
See also:
RtLtMapCnvAtomicSessionDestroy , RtLtMapCnvAtomicConvert , RtLtMapCnvAtomicIsConvertible

void RtLtMapCnvAtomicSessionDestroy RtLtMapCnvAtomicSession   session
 

RtLtMapCnvAtomicSessionDestroy is used to destroy a RtLtMapCnvAtomicSession. Any temporary memory is also destroyed.

Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
See also:
RtLtMapCnvAtomicSessionCreate , RtLtMapCnvAtomicConvert , RtLtMapCnvAtomicIsConvertible

RwBool RtLtMapCnvAtomicSessionGetGreedyRasterization RtLtMapCnvAtomicSession   session
 

RtLtMapCnvAtomicSessionGetGreedyRasterization is used to retrieve the rasterization method. Triangles are rasterized during conversion to remap their lightmaps from the imported form to RenderWare's form.

During standard rasterization, a pixel is only considered to form part of a triangle's lightmap if the triangle covers the centre of the pixel.

During greedy rasterization, a pixel is considered to form part of a triangle's lightmap if the triangle covers any part of the pixel.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
Returns:
TRUE if greedy rasterization is enabled. FALSE otherwise.
See also:
RtLtMapCnvAtomicSessionSetGreedyRasterization , RtLtMapCnvAtomicConvert

RwBool RtLtMapCnvAtomicSessionGetImportedLtMapResample RtLtMapCnvAtomicSession   session
 

RtLtMapCnvAtomicSessionGetImportedLtMapResample is used to query if resampling of the imported lightmaps is set.

RenderWare lightmap textures are generated from a source sample image. This source sample image is generated from the imported lightmaps by re-rasterizing the triangles into the source sample image.

The source sample image size is based on the size of the destination lightmap texture, which can be different to the imported lightmaps. This difference can potentially cause samples in the imported lightmaps to be missed. To eliminate this error, the imported lightmaps can be re-sampled to the same size as the source sample image.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession.
Returns:
TRUE if resampling is enabled, FALSE otherwise.
See also:
RtLtMapCnvAtomicSessionSetImportedLtMapResample , RtLtMapCnvAtomicConvert

RwReal RtLtMapCnvAtomicSessionGetRejectionFactor RtLtMapCnvAtomicSession   session
 

RtLtMapCnvAtomicSessionGetRejectionFactor is used to retrieve the rejection factor. Triangles with an area smaller than this threshold are rejected and are not lightmapped.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
Returns:
An RwReal representing the rejection factor
See also:
RtLtMapCnvAtomicSessionSetRejectionFactor , RtLtMapCnvAtomicConvert

void RtLtMapCnvAtomicSessionSetGreedyRasterization RtLtMapCnvAtomicSession   session,
RwBool    greedy
 

RtLtMapCnvAtomicSessionSetGreedyRasterization is used to select the rasterization method. Triangles are rasterized during conversion to remap their lightmaps from the imported form to RenderWare's form.

During standard rasterization, a pixel is only considered to form part of a triangle's lightmap if the triangle covers the centre of the pixel.

During greedy rasterization, a pixel is considered to form part of a triangle's lightmap if the triangle covers any part of the pixel.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession.
greedy  An RwBool to enable greedy rasterization.
See also:
RtLtMapCnvAtomicSessionGetGreedyRasterization , RtLtMapCnvAtomicConvert

void RtLtMapCnvAtomicSessionSetImportedLtMapResample RtLtMapCnvAtomicSession   session,
RwBool    resample
 

RtLtMapCnvAtomicSessionSetImportedLtMapResample is used to select resampling of the imported lightmaps.

RenderWare lightmap textures are generated from a source sample image. This source sample image is generated from the imported lightmaps by re-rasterizing the triangles into the source sample image.

The source sample image size is based on the size of the destination lightmap texture, which can be different to the imported lightmaps. This differences can potentially cause samples in the imported lightmaps to be missed. To eliminate this error, imported lightmaps can be re-sampled to the same size as the source sample image.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
resample  An RwBool to select reaample
See also:
RtLtMapCnvAtomicSessionGetImportedLtMapResample , RtLtMapCnvAtomicConvert

void RtLtMapCnvAtomicSessionSetRejectionFactor RtLtMapCnvAtomicSession   session,
RwReal    factor
 

RtLtMapCnvAtomicSessionSetRejectionFactor is used to set the rejection factor. Triangles with an area smaller than this threshold are rejected and are not lightmapped.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
factor  An RwReal to set the rejection factor
See also:
RtLtMapCnvAtomicSessionGetRejectionFactor , RtLtMapCnvAtomicConvert

void RtLtMapCnvAtomicSetLightMapName RtLtMapCnvAtomicSession   session,
RwInt32    idx,
RwChar   name
 

RtLtMapCnvAtomicSetLightMapName is used to set the lighmap texture used by the triangle in an RpAtomic.

Imported lightmap data may consist of more than one lightmap per RpAtomic. Each triangle references its lightmap texture by name.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
idx  An RwInt32 representing the triangle index
name  A pointer to an RwChar for the name of the lightmap to assign
See also:
RtLtMapCnvAtomicGetLightMapName

void RtLtMapCnvAtomicSetVtxUV RtLtMapCnvAtomicSession   session,
RwInt32    idx,
RwTexCoords   tex
 

RtLtMapCnvAtomicSetVtxUV is used to assign a UV lightmap co-ordinate to a vertex in an RpAtomic.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvAtomicSession
idx  An RwInt32 representing the vertex index
tex  A pointer to the RwTexCoords to assign
See also:
RtLtMapCnvAtomicSetVtxUV

RwBool RtLtMapCnvWorldConvert RtLtMapCnvWorldSession   session,
RwUInt32    factor
 

RtLtMapCnvWorldConvert is used to convert imported lightmaps for use within RenderWare.

This function takes the imported lightmaps and converts them into a form useable by RenderWare's LightMap plugin, RpLtMap.

RenderWare lightmap textures are generated from a source sample image. For for better results, this source sample image can be larger than the final lightmap texture and sampled down to a smaller size.

The sample factor specifies the scale of this source sample image relative to the destination lightmap texture.

The imported UV lightmap co-ordinates are re-mapped to new values in the destination lightmaps.

Parameters:
session  A pointer to the RtLtMapCnvWorldSession
factor  An RwUInt32 representing the sample factor
Returns:
TRUE on sucess, FALSE otherwise.
See also:
RtLtMapCnvWorldSessionCreate , RtLtMapCnvWorldSessionDestroy , RtLtMapCnvWorldIsConvertible

RwBool RtLtMapCnvWorldIsConvertible RpWorld   world
 

RtLtMapCnvWorldIsConvertible is used to determine if a RpWorld can be converted for use by RenderWare's LightMap plugin, RpLtMap.

The function checks if imported lightmap data are attached to the RpWorld. If so, the RpWorld is determined to be convertible.

Note that all non empty RpWorldSector in the RpWorld must contain the imported lightmap data for the RpWorld to be convertible.

Parameters:
world  A pointer to the RpWorld
Returns:
TRUE if the RpWorld is convertible, FALSE otherwise.
See also:
RtLtMapCnvWorldSessionCreate , RtLtMapCnvWorldSessionDestroy , RtLtMapCnvWorldConvert

RpWorldSector* RtLtMapCnvWorldSectorCnvDataCreate RpWorldSector   ws
 

RtLtMapCnvWorldSectorCnvDataCreate is used to create the conversion data for the RpWorldSector. This creates a set of arrays for the RpWorldSector to store the UV lightmap co-ordinates and the lightmap texture name.

Parameters:
ws  A pointer to the RpWorldSector.
Returns:
A pointer to an RpWorldSector on success. NULL otherwise.
See also:
RtLtMapCnvWorldSectorCnvDataDestroy , RtLtMapCnvWorldSectorGetUArray , RtLtMapCnvWorldSectorGetVArray , RtLtMapCnvWorldSectorGetTexNameArray

RpWorldSector* RtLtMapCnvWorldSectorCnvDataDestroy RpWorldSector   ws
 

RtLtMapCnvWorldSectorCnvDataDestroy is used to destroy the conversion data attached to the RpWorldSector. This destroys the set of arrays for storing the UV lightmap co-ordinates and the lightmap texture name.

Parameters:
ws  A pointer to the RpWorldSector.
Returns:
A pointer to an RpWorldSector on success. NULL otherwise.
See also:
RtLtMapCnvWorldSectorCnvDataCreate , RtLtMapCnvWorldSectorGetUArray , RtLtMapCnvWorldSectorGetVArray , RtLtMapCnvWorldSectorGetTexNameArray

RwChar* RtLtMapCnvWorldSectorGetLightMapName RtLtMapCnvWorldSectorData   data,
RwInt32    idx
 

RtLtMapCnvWorldSectorGetLightMapName is used to retrieve the lighmap texture used by the triangle in an RpWorldSector.

Imported lightmap data may consist of more than one lightmap per RpWorldSector. Each triangle references its lightmap texture by name.

Note:
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.
Parameters:
data  A pointer to the RtLtMapCnvWorldSectorData
idx  An RwInt32 representing the triangle index
Returns:
A pointer to an RwChar that is the name of the lightmap, NULL otherwise
See also:
RtLtMapCnvWorldSectorSetLightMapName

RpUserDataArray* RtLtMapCnvWorldSectorGetTexNameArray RpWorldSector   ws
 

RtLtMapCnvWorldSectorGetTexNameArray is used to retrieve the array of lightmap name references attached to the RpWorldSector.

The size of the array is equal to the number of triangles in the RpWorldSector.

The array contains the lightmap texture reference for each triangle in the RpWorldSector.

Parameters:
ws  A pointer to the RpWorldSector.
Returns:
A pointer to an RpUserDataArray on success. NULL otherwise.
See also:
RtLtMapCnvWorldSectorGetUArray , RtLtMapCnvWorldSectorGetVArray

RpUserDataArray* RtLtMapCnvWorldSectorGetUArray RpWorldSector   ws
 

RtLtMapCnvWorldSectorGetUArray is used to retrieve the array of U lightmap co-ordinates attached to the RpWorldSector.

The size of the array is equal to the number of vertices in the RpWorldSector.

The array contains the imported U lightmap co-ordinate for each vertex in the RpWorldSector.

Parameters:
ws  A pointer to the RpWorldSector.
Returns:
A pointer to an RpUserDataArray on success. NULL otherwise.
See also:
RtLtMapCnvWorldSectorGetVArray , RtLtMapCnvWorldSectorGetTexNameArray

RpUserDataArray* RtLtMapCnvWorldSectorGetVArray RpWorldSector   ws
 

RtLtMapCnvWorldSectorGetVArray is used to retrieve the array of V lightmap co-ordinates attached to the RpWorldSector.

The size of the array is equal to the number of vertices in the RpWorldSector.

The array contains the imported V lightmap co-ordinate for each vertex in the RpWorldSector.

Parameters:
ws  A pointer to the RpWorldSector.
Returns:
A pointer to an RpUserDataArray on success. NULL otherwise.
See also:
RtLtMapCnvWorldSectorGetUArray , RtLtMapCnvWorldSectorGetTexNameArray

void RtLtMapCnvWorldSectorGetVtxUV RtLtMapCnvWorldSectorData   data,
RwInt32    idx,
RwTexCoords   tex
 

RtLtMapCnvWorldSectorGetVtxUV is used to retrieve the UV lightmap co-ordinate of a vertex in an RpWorldSector.

Note:
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.
Parameters:
data  A pointer to the RtLtMapCnvWorldSectorData
idx  An RwInt32 representing the vertex index
tex  A pointer to the RwTexCoords for returning the UV co-ordinate
See also:
RtLtMapCnvWorldSectorSetVtxUV

void RtLtMapCnvWorldSectorSetLightMapName RtLtMapCnvWorldSectorData   data,
RwInt32    idx,
RwChar   name
 

RtLtMapCnvWorldSectorSetLightMapName is used to set the lighmap texture used by the triangle in an RpWorldSector.

Imported lightmap data may consist of more than one lightmap per RpWorldSector. Each triangle reference its lightmap texture by its name.

Note:
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.
Parameters:
data  A pointer to the RtLtMapCnvWorldSectorData
idx  An RwInt32 representing the triangle index
name  A pointer to an RwChar for the name of the lightmap to assign
See also:
RtLtMapCnvWorldSectorGetLightMapName

void RtLtMapCnvWorldSectorSetVtxUV RtLtMapCnvWorldSectorData   data,
RwInt32    idx,
RwTexCoords   tex
 

RtLtMapCnvWorldSectorSetVtxUV is used to assign a UV lightmap co-ordinate to a vertex in an RpWorldSector.

Note:
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.
Parameters:
data  A pointer to the RtLtMapCnvWorldSectorData
idx  An RwInt32 representing the vertex index
tex  A pointer to the RwTexCoords to assign
See also:
RtLtMapCnvWorldSectorSetVtxUV

RtLtMapCnvWorldSession* RtLtMapCnvWorldSessionCreate RpWorld   world
 

RtLtMapCnvWorldSessionCreate is used to create a RtLtMapCnvWorldSession.

The RtLtMapCnvWorldSession is initialized with default values. The pointer to the RpWorld is cached inside the session, since a session is not usable with a NULL world pointer.

Parameters:
world  A pointer to the RpWorld
Returns:
A pointer to an RtLtMapCnvWorldSession on success. NULL otherwise.
See also:
RtLtMapCnvWorldSessionDestroy , RtLtMapCnvWorldConvert , RtLtMapCnvWorldIsConvertible

void RtLtMapCnvWorldSessionDestroy RtLtMapCnvWorldSession   session
 

RtLtMapCnvWorldSessionDestroy is used to destroy a RtLtMapCnvWorldSession. Any temporary memory is also destroyed.

Parameters:
session  A pointer to the RtLtMapCnvWorldSession
See also:
RtLtMapCnvWorldSessionCreate , RtLtMapCnvWorldConvert , RtLtMapCnvWorldIsConvertible

RwBool RtLtMapCnvWorldSessionGetGreedyRasterization RtLtMapCnvWorldSession   session
 

RtLtMapCnvWorldSessionGetGreedyRasterization is used to retrieve the rasterization method. Triangles are rasterized during conversion to remap their lightmaps from the imported form to RenderWare's form.

During standard rasterization, a pixel is only considered to form part of a triangle's lightmap if the triangle covers the centre of the pixel.

During greedy rasterization, a pixel is considered to form part of a triangle's lightmap if the triangle covers any part of the pixel.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvWorldSession
Returns:
TRUE if greedy rasterization if enabled. FALSE otherwise.
See also:
RtLtMapCnvWorldSessionSetGreedyRasterization , RtLtMapCnvWorldConvert

RwBool RtLtMapCnvWorldSessionGetImportedLtMapResample RtLtMapCnvWorldSession   session
 

RtLtMapCnvWorldSessionGetImportedLtMapResample is used to query if resampling of the imported lightmaps is set.

RenderWare lightmap textures are generated from a source sample image. This source sample image is generated from the imported lightmaps by re-rasterizing the triangles into the source sample image.

The source sample image size is based on the size of the destination lightmap texture, which can be different to the imported lightmaps. This difference can potentially cause samples in the imported lightmaps to be missed. To eliminate this error, the imported lightmaps can be re-sampled to the same size as the source sample image.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvWorldSession.
Returns:
TRUE if resampling is enabled, FALSE otherwise.
See also:
RtLtMapCnvWorldSessionSetImportedLtMapResample , RtLtMapCnvWorldConvert

RwReal RtLtMapCnvWorldSessionGetRejectionFactor RtLtMapCnvWorldSession   session
 

RtLtMapCnvWorldSessionGetRejectionFactor is used to retrieve the rejection factor. Triangles with an area smaller than this threshold are rejected and are not lightmapped.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvWorldSession
Returns:
An RwReal representing the rejection factor
See also:
RtLtMapCnvWorldSessionSetRejectionFactor , RtLtMapCnvWorldConvert

void RtLtMapCnvWorldSessionSetGreedyRasterization RtLtMapCnvWorldSession   session,
RwBool    greedy
 

RtLtMapCnvWorldSessionSetGreedyRasterization is used to select the rasterization method. Triangles are rasterized during conversion to remap their lightmaps from the imported form to RenderWare's form.

During standard rasterization, a pixel is only considered to form part of a triangle's lightmap if the triangle covers the centre of the pixel.

During greedy rasterization, a pixel is considered to form part of a triangle's lightmap if the triangle covers any part of the pixel.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvWorldSession
greedy  An RwBool to enable greedy rasterization.
See also:
RtLtMapCnvWorldSessionGetGreedyRasterization , RtLtMapCnvWorldConvert

void RtLtMapCnvWorldSessionSetImportedLtMapResample RtLtMapCnvWorldSession   session,
RwBool    resample
 

RtLtMapCnvWorldSessionSetImportedLtMapResample is used to select resampling of the imported lightmaps.

RenderWare lightmap textures are generated from a source sample image. This source sample image is generated from the imported lightmaps by re-rasterizing the triangles into the source sample image.

The source sample image size is based on the size of the destination lightmap texture, which can be different to the imported lightmaps. This difference can potentially cause samples in the imported lightmaps to be missed. To eliminate this error, the imported lightmaps can be re-sampled to the same size as the source sample image.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvWorldSession
resample  An RwBool to select reaample
See also:
RtLtMapCnvWorldSessionGetImportedLtMapResample , RtLtMapCnvWorldConvert

void RtLtMapCnvWorldSessionSetRejectionFactor RtLtMapCnvWorldSession   session,
RwReal    factor
 

RtLtMapCnvWorldSessionSetRejectionFactor is used to set the rejection factor. Triangles with an area smaller than this threshold are rejected and are not lightmapped.

Note:
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.
Parameters:
session  A pointer to the RtLtMapCnvWorldSession
factor  An RwReal to set the rejection factor
See also:
RtLtMapCnvWorldSessionGetRejectionFactor , RtLtMapCnvWorldConvert


Criterion Software © 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:47:14 2004. Send Feedback