Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpWorldSector
[PS2All]


Functions

void  RpWorldSectorPS2AllGetMeshHeaderMeshCache (RpWorldSector *sector, RxPS2AllPipeData *ps2AllPipeData)
void  RpWorldSectorPS2AllGatherObjMetrics (RpWorldSector *sector)
void  RpWorldSectorPS2AllObjInstanceTest (RxPS2AllPipeData *ps2AllPipeData)
void  RpWorldSectorPS2AllTransformSetup (RwMatrix **transform)
void  RpWorldSectorPS2AllFrustumTest (RpWorldSector *sector, RwFrustumTestResult *inFrustum)
void  RpWorldSectorPS2AllMatModulateSetup (RxPS2AllPipeData *ps2AllPipeData)
void  RpWorldSectorPS2AllLightingSetup (RxPS2AllPipeData *ps2AllPipeData)
void  RpWorldSectorPS2AllResEntryAlloc (RxPS2AllPipeData *ps2AllPipeData, RwResEntry **repEntry, RwUInt32 size, RwResEntryDestroyNotify destroyCallBack)
RwBool  RpWorldSectorPS2AllObjectSetupCallBack (RxPS2AllPipeData *ps2AllPipeData, RwMatrix **transform)
RwBool  RpWorldSectorPS2AllInstance (RxPS2AllPipeData *ps2AllPipeData)
RxPipeline RpWorldSectorSkyGetPS2AllPipeline (void)

Detailed Description

Platform-specific

Function Documentation

void RpWorldSectorPS2AllFrustumTest RpWorldSector   sector,
RwFrustumTestResult   inFrustum
 

RpWorldSectorPS2AllFrustumTest is a macro to test an RpWorldSector against the current camera's view frustum to determine if clipping is necessary.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpWorldSectors, RpWorldSectorPS2AllObjectSetupCallBack. It tests the tight bounding box of the current RpWorldSector (see RpWorldSectorGetTightBBox) against the frustum of the current RwCamera. It may be used in constructing user callbacks.

This macro will be a function in a debug build, but it may be used explicitly in macro form through the name RpWorldSectorPS2AllFrustumTestMacro and in function form through RpWorldSectorPS2AllFrustumTestFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
sector  A pointer to the current RpWorldSector
inFrustum  A pointer to a RwFrustumTestResult to receive the result of a frustum test on the sector
See also:
RpWorldSectorPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpWorldSectorPS2AllGatherObjMetrics RpWorldSector   sector
 

RpWorldSectorPS2AllGatherObjMetrics is a macro to gather metrics information from an RpWorldSector.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpWorldSectors, RpWorldSectorPS2AllObjectSetupCallBack. It gathers metrics information from the current sector (though in non-RWMETRICS builds, the macro will boil away to nothing during compilation). It may be used in constructing user callbacks.

This macro will be a function in a debug build, but it may be used explicitly in macro form through the name RpWorldSectorPS2AllGatherObjMetricsMacro and in function form through RpWorldSectorPS2AllGatherObjMetricsFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
sector  A pointer to the current RpWorldSector
See also:
RpWorldSectorPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpWorldSectorPS2AllGetMeshHeaderMeshCache RpWorldSector   sector,
RxPS2AllPipeData   ps2AllPipeData
 

RpWorldSectorPS2AllGetMeshHeaderMeshCache is a macro to extract the RpMeshHeader and RwMeshCache from an RpWorldSector.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpWorldSectors, RpWorldSectorPS2AllObjectSetupCallBack. It fills in the meshHeader and meshCache fields of the RxPS2AllPipeData struct. It may be used in constructing user callbacks.

This macro will be a function in a debug build, but it may be used explicitly in macro form through the name RpWorldSectorPS2AllGetMeshHeaderMeshCacheMacro and in function form through RpWorldSectorPS2AllGetMeshHeaderMeshCacheFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
sector  A pointer to the current RpWorldSector
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
See also:
RpWorldSectorPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
RwBool RpWorldSectorPS2AllInstance RxPS2AllPipeData   ps2AllPipeData
 

RpWorldSectorPS2AllInstance instances an RpWorldSector.

Parameters:
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
Returns:
TRUE on success, FALSE otherwise
void RpWorldSectorPS2AllLightingSetup RxPS2AllPipeData   ps2AllPipeData
 

RpWorldSectorPS2AllLightingSetup is a macro to set up lights to be used during an RpWorldSector's transform on VU1.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpWorldSectors, RpWorldSectorPS2AllObjectSetupCallBack. It iterates over all lights which affect the given sector and applies each using RxPipelineNodePS2AllApplyLight (this sets up an array of data which will be uploaded to VU1 prior to the rendering of the sector's meshes). It may be used in constructing user callbacks.

This macro will be a function in a debug build, but it may be used explicitly in macro form through the name RpWorldSectorPS2AllLightingSetupMacro and in function form through RpWorldSectorPS2AllLightingSetupFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
See also:
RpWorldSectorPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpWorldSectorPS2AllMatModulateSetup RxPS2AllPipeData   ps2AllPipeData
 

RpWorldSectorPS2AllMatModulateSetup is a macro to determine whether material color is to be modulated for an RpWorldSector.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpWorldSectors, RpWorldSectorPS2AllObjectSetupCallBack. It sets up the matModulate member of the RxPS2AllPipeData struct depending on the flags of the current world (so be careful where you call this from if you have multiple worlds). It may be used in constructing user callbacks.

This macro will be a function in a debug build, but it may be used explicitly in macro form through the name RpWorldSectorPS2AllMatModulateSetupMacro and in function form through RpWorldSectorPS2AllMatModulateSetupFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
See also:
RpWorldSectorPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
RwBool RpWorldSectorPS2AllObjectSetupCallBack RxPS2AllPipeData   ps2AllPipeData,
RwMatrix **    transform
 

RpWorldSectorPS2AllObjectSetupCallBack is the RxPipelineNodePS2AllObjectSetupCallBack used in the default RenderWare RpWorldSector pipeline.

See RxPipelineNodePS2AllObjectSetupCallBack for an overview of this callback type. For RpWorldSectors, this default callback is composed of the following helper macros (of which you may use some or all to construct your own replacement callback), in the order shown here (try and keep this order, some macros rely on the results of prior ones):

Parameters:
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
transform  A pointer to a pointer to a transform matrix
Returns:
TRUE on success, FALSE to prematurely terminate the pipeline
See also:
RxPipelineNodePS2AllObjectSetupCallBack , RpWorldSectorPS2AllGetMeshHeaderMeshCache , RpWorldSectorPS2AllGatherObjMetrics , RpWorldSectorPS2AllObjInstanceTest , RpWorldSectorPS2AllTransformSetup , RpWorldSectorPS2AllFrustumTest , RpAtomicPS2AllPrimTypeTransTypeSetup , RpWorldSectorPS2AllMatModulateSetup , RpWorldSectorPS2AllLightingSetup
void RpWorldSectorPS2AllObjInstanceTest RxPS2AllPipeData   ps2AllPipeData
 

RpWorldSectorPS2AllObjInstanceTest is a macro to test an RpWorldSector to determine if it needs reinstancing.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpWorldSectors, RpWorldSectorPS2AllObjectSetupCallBack. It generates a new object identifier for the current RpWorldSector and stores this in the objIdentifier field of the RxPS2AllPipeData struct. It also tests this identifier against the existing identifier stored in the sector's instance data (it uses rwMeshCacheGetEntryRef, RWPS2ALLRESENTRYHEADERFROMRESENTRY and RWPS2ALLRESENTRYHEADERGETOBJIDENTIFIER to extract this from the header of the sector's first mesh's instance data - all meshes within an object will have the same objIdentifier in their instance data header) and updates the objInstance member if it finds any differences.

The macro RPWORLDSECTORMAKEOBJID can be used to construct the identifier for an RpWorldSector from its RpMeshHeader. RPWORLDSECTOROBJIDGETSERIALNUM can be used to extract the serial number from this indentifier and RPWORLDSECTOROBJIDGETFLAGS can be used to extract the flags (which are obtained from the CURRENT world - so be careful where you use this macro if you have multiple worlds). All these macros may be used in constructing user callbacks.

If the flags of the sector have changed, it will be fully reinstanced (see RxInstanceFlags). All other changes will result in a congruent reinstance (it is not anticipated that sectors will be edited at run-time in most applications, so an optimisation which is likely to be feasible in most cases is simply to omit this callback from the pipeline).

RpWorldSectorPS2AllObjInstanceTest will be a function in a debug build, but it may be used explicitly in macro form through the name RpWorldSectorPS2AllObjInstanceTestMacro and in function form through RpWorldSectorPS2AllObjInstanceTestFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
See also:
RpWorldSectorPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpWorldSectorPS2AllResEntryAlloc RxPS2AllPipeData   ps2AllPipeData,
RwResEntry **    repEntry,
RwUInt32    size,
RwResEntryDestroyNotify    destroyCallBack
 

RpWorldSectorPS2AllResEntryAlloc is a macro to allocate space for the instance data of an RpMesh in an RpWorldSector.

This is a helper macro which is called from the default RxPipelineNodePS2AllMatResEntryAllocCallBack for RpWorldSectors, RpMeshPS2AllResEntryAllocCallBack. It allocates space in the Resource Arena (see RwResources Overview for details) for the instance data of the current mesh and stores a pointer to this space in the appropriate location. It may be used in constructing user callbacks.

This macro will be a function in a debug build, but it may be used explicitly in macro form through the name RpWorldSectorPS2AllResEntryAllocMacro and in function form through RpWorldSectorPS2AllResEntryAllocFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
repEntry  A pointer to a pointer to a RwResEntry
size  A RwUInt32 value specifying the size in bytes of the memory block to allocate (excluding the RwResEntry header).
destroyCallBack  A RwResEntryDestroyNotify callback (see RwResourcesFreeResEntry)
See also:
RpMeshPS2AllResEntryAllocCallBack , RxPipelineNodePS2AllMatResEntryAllocCallBack
void RpWorldSectorPS2AllTransformSetup RwMatrix **    transform
 

RpWorldSectorPS2AllTransformSetup is a macro to set up the transformation matrix for an RpWorldSector.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpWorldSectors, RpWorldSectorPS2AllObjectSetupCallBack. It simply sets the transform pointer to point to the current camera's view matrix (see RwCameraGetViewMatrix), since the coordinates of RpWorldSectors are specified with respect to the global origin. It may be used in constructing user callbacks.

This macro will be a function in a debug build, but it may be used explicitly in macro form through the name RpWorldSectorPS2AllTransformSetupMacro and in function form through RpWorldSectorPS2AllTransformSetupFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
transform  A pointer to a pointer to the RwMatrix holding the object-space to camera-space transform for the current RpWorldSector
See also:
RpWorldSectorPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
RxPipeline* RpWorldSectorSkyGetPS2AllPipeline void   
 

RpWorldSectorSkyGetPS2AllPipeline returns a pointer to the default world-sector PS2All pipeline.

The world-sector pipeline based on the PS2All.csl node renders world-sectors using just this node and a material pipelines constructed from the PS2AllMat.csl node; see RxNodeDefinitionGetPS2All and RxNodeDefinitionGetPS2AllMat for details). The aim here is not so much to optimize the default RW RpAtomic and RpWorldSector pipelines but rather to allow developers to optimize pipelines based on the specifics of objects and vector code used in their game.

By default, sectors are rendered using this PS2All-based pipeline.

If you wish to submit 2D triangles through Submit.csl (i.e you want to do transformation and lighting and whatever else CPU-side - which will of course be very slow) then rather than use this world sector object pipeline, you should use a generic (non-PlayStation 2-specific) one.

The world plugin must be attached before using this function.

The PS2All world-sector object pipeline:

  • PS2All.csl
Returns:
Returns pointer to the pipeline if successful or NULL if there is an error.
See also:
RxNodeDefinitionGetPS2All , RxNodeDefinitionGetPS2AllMat , RpWorldSectorSkyGetPS2AllPipeline , RpWorldGetDefaultSectorPipeline , RpWorldGetDefaultSectorPipeline (platform-specific) , RpWorldSetDefaultSectorPipeline , RpWorldGetSectorPipeline , RpWorldSetSectorPipeline , RpWorldSectorGetPipeline , RpWorldSectorSetPipeline , RpAtomicGetDefaultPipeline , RpAtomicGetDefaultPipeline (platform-specific) , RpAtomicSetDefaultPipeline , RpAtomicSkyGetPS2AllPipeline , RpAtomicGetPipeline , RpAtomicSetPipeline , RpMaterialGetDefaultPipeline , RpMaterialGetDefaultPipeline (platform-specific) , RpMaterialSetDefaultPipeline , RpMaterialSkyGetPS2AllMatPipeline , RpMaterialGetPipeline , RpMaterialSetPipeline

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