Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpAtomic
[PS2All]


Functions

void  RpAtomicPS2AllGetMeshHeaderMeshCache (RpAtomic *atomic, RxPS2AllPipeData *ps2AllPipeData)
void  RpAtomicPS2AllGatherObjMetrics (RpAtomic *atomic)
void  RpAtomicPS2AllMorphSetup (RpAtomic *atomic, RxPS2AllPipeData *ps2AllPipeData)
void  RpAtomicPS2AllObjInstanceTest (RpAtomic *atomic, RxPS2AllPipeData *ps2AllPipeData)
void  RpAtomicPS2AllClear (RpAtomic *atomic)
void  RpAtomicPS2AllTransformSetup (RpAtomic *atomic, RwMatrix **transform)
void  RpAtomicPS2AllFrustumTest (RpAtomic *atomic, RwFrustumTestResult *inFrustum)
void  RpAtomicPS2AllPrimTypeTransTypeSetup (RxPS2AllPipeData *ps2AllPipeData, RwFrustumTestResult inFrustum)
void  RpAtomicPS2AllMatModulateSetup (RpAtomic *atomic, RxPS2AllPipeData *ps2AllPipeData)
void  RpAtomicPS2AllLightingSetup (RxPS2AllPipeData *ps2AllPipeData)
void  RpAtomicPS2AllLightingPersist (RwMatrix *inverse, RwReal invScale, RwReal recipInvScale)
void  RpAtomicPS2AllResEntryAlloc (RxPS2AllPipeData *ps2AllPipeData, RwResEntry **repEntry, RwUInt32 size, RwResEntryDestroyNotify destroyCallBack)
RwBool  RpAtomicPS2AllObjectSetupCallBack (RxPS2AllPipeData *ps2AllPipeData, RwMatrix **transform)
RwBool  RpAtomicPS2AllInstance (RxPS2AllPipeData *ps2AllPipeData)
RxPipeline RpAtomicSkyGetPS2AllPipeline (void)

Detailed Description

Platform-specific

Function Documentation

void RpAtomicPS2AllClear RpAtomic   atomic
 

RpAtomicPS2AllClear is a macro to clear flags related to instancing once an RpAtomic has been tested for reinstancing.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpAtomics, RpAtomicPS2AllObjectSetupCallBack. It clears dirty flags on the atomic's RpGeometry and RpInterpolator once they have been tested to determine if the RpAtomic needs reinstancing. The results of these tests are cached in the objInstance member of the RxPS2AllPipeData struct, so they will persist through rendering (and reinstance testing) of all the meshes of the object. This macro 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 RpAtomicPS2AllClearMacro and in function form through RpAtomicPS2AllClearFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
atomic  A pointer to the current RpAtomic
See also:
RxPipelineNodePS2AllObjectSetupCallBack , RpAtomicPS2AllObjectSetupCallBack
void RpAtomicPS2AllFrustumTest RpAtomic   atomic,
RwFrustumTestResult   inFrustum
 

RpAtomicPS2AllFrustumTest is a macro to test an RpAtomic 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 RpAtomics, RpAtomicPS2AllObjectSetupCallBack. It tests the bounding sphere of the current RpAtomic (see RpAtomicGetWorldBoundingSphere) against the frustum of the current RwCamera (see RwCameraFrustumTestSphere). 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 RpAtomicPS2AllFrustumTestMacro and in function form through RpAtomicPS2AllFrustumTestFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
atomic  A pointer to the current RpAtomic
inFrustum  A pointer to a RwFrustumTestResult to receive the result of a frustum test on the atomic
See also:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpAtomicPS2AllGatherObjMetrics RpAtomic   atomic
 

RpAtomicPS2AllGatherObjMetrics is a macro to gather metrics information from an RpAtomic.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpAtomics, RpAtomicPS2AllObjectSetupCallBack. It gathers metrics information from the current atomic (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:
atomic  A pointer to the current RpAtomic
See also:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpAtomicPS2AllGetMeshHeaderMeshCache RpAtomic   atomic,
RxPS2AllPipeData   ps2AllPipeData
 

RpAtomicPS2AllGetMeshHeaderMeshCache is a macro to extract the RpMeshHeader and RwMeshCache from an RpAtomic.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpAtomics, RpAtomicPS2AllObjectSetupCallBack. 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 RpAtomicPS2AllGetMeshHeaderMeshCacheMacro and in function form through RpAtomicPS2AllGetMeshHeaderMeshCacheFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
atomic  A pointer to the current RpAtomic
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
See also:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
RwBool RpAtomicPS2AllInstance RxPS2AllPipeData   ps2AllPipeData
 

RpAtomicPS2AllInstance instances the geometry of an RpAtomic.

Parameters:
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
Returns:
TRUE on success, FALSE otherwise
void RpAtomicPS2AllLightingPersist RwMatrix   inverse,
RwReal    invScale,
RwReal    recipInvScale
 

RpAtomicPS2AllLightingPersist is a macro to allow lighting data to persist in VU1 memory from a prior pipeline execution.

This is a helper macro which may be called from a user RxPipelineNodePS2AllObjectSetupCallBack. It is used instead of RpAtomicPS2AllLightingSetup (note: if one is used, the other must not be!). The purpose is to improve rendering efficiency by allowing PS2All to reuse lighting data already in VU1 memory (uploaded during the rendering of a prior object) for the current RpAtomic's rendering.

Currently, this macro is usable from within RpWorldSector pipelines as well as RpAtomic pipelines.

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

Parameters:
inverse  A pointer to a RwMatrix specifying the inverse of the current RpAtomic's LTM
invScale  A RwReal value specifying the (uniform) scale in the inverse matrix
recipInvScale  The reciprocal of invScale
See also:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack , RpAtomicPS2AllLightingSetup
void RpAtomicPS2AllLightingSetup RxPS2AllPipeData   ps2AllPipeData
 

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

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

A more efficient helper macro which may be used in certain circumstances is RpAtomicPS2AllLightingPersist.

This macro will be a function in a debug build, but it may be used explicitly in macro form through the name RpAtomicPS2AllLightingSetupMacro and in function form through RpAtomicPS2AllLightingSetupFunc, 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:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack , RpAtomicPS2AllLightingPersist
void RpAtomicPS2AllMatModulateSetup RpAtomic   atomic,
RxPS2AllPipeData   ps2AllPipeData
 

RpAtomicPS2AllMatModulateSetup is a macro to determine whether material color is to be modulated for an RpAtomic.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpAtomics, RpAtomicPS2AllObjectSetupCallBack. It sets up the matModulate member of the RxPS2AllPipeData struct depending on the flags of the current atomic's RpGeometry. 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 RpAtomicPS2AllMatModulateSetupMacro and in function form through RpAtomicPS2AllMatModulateSetupFunc, depending on how you wish to balance code size and function call overheads.

Parameters:
atomic  A pointer to the current RpAtomic
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
See also:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpAtomicPS2AllMorphSetup RpAtomic   atomic,
RxPS2AllPipeData   ps2AllPipeData
 

RpAtomicPS2AllMorphSetup is a macro to set up morphing information for a morph animated RpAtomic.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpAtomics, RpAtomicPS2AllObjectSetupCallBack. It will fill in the numMorphTargets and spExtra members of the RxPS2AllPipeData struct for morph animated atomics. The spExtra field in such atomics is used to control interpolation between morph targets, which is performed during the transform on VU1. This macro 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 RpAtomicPS2AllMorphSetupMacro and in function form through RpAtomicPS2AllMorphSetupFunc, depending on how you wish to balance code size and function call overheads.

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

RpAtomicPS2AllObjectSetupCallBack is the RxPipelineNodePS2AllObjectSetupCallBack used in the default RenderWare RpAtomic pipeline.

See RxPipelineNodePS2AllObjectSetupCallBack for an overview of this callback type. For RpAtomics, 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):

RpAtomicPS2AllGetMeshHeaderMeshCache, RpAtomicPS2AllGatherObjMetrics, RpAtomicPS2AllMorphSetup, RpAtomicPS2AllObjInstanceTest, RpAtomicPS2AllTransformSetup, RpAtomicPS2AllFrustumTest, RpAtomicPS2AllPrimTypeTransTypeSetup, RpAtomicPS2AllMatModulateSetup, RpAtomicPS2AllLightingSetup

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 , RpAtomicPS2AllGetMeshHeaderMeshCache , RpAtomicPS2AllGatherObjMetrics , RpAtomicPS2AllMorphSetup , RpAtomicPS2AllObjInstanceTest , RpAtomicPS2AllTransformSetup , RpAtomicPS2AllFrustumTest , RpAtomicPS2AllPrimTypeTransTypeSetup , RpAtomicPS2AllMatModulateSetup , RpAtomicPS2AllLightingSetup
void RpAtomicPS2AllObjInstanceTest RpAtomic   atomic,
RxPS2AllPipeData   ps2AllPipeData
 

RpAtomicPS2AllObjInstanceTest is a macro to test an RpAtomic to determine if it needs reinstancing.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpAtomics, RpAtomicPS2AllObjectSetupCallBack. It generates a new object identifier for the current RpAtomic and stores this in the objIdentifier field of the RxPS2AllPipeData struct. It also tests this identifier against the existing identifier stored in the atomic's instance data (it uses rwMeshCacheGetEntryRef, RWPS2ALLRESENTRYHEADERFROMRESENTRY and RWPS2ALLRESENTRYHEADERGETOBJIDENTIFIER to extract this from the header of the atomic'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 RPATOMICPS2ALLMAKEOBJID can be used to construct the identifier for an RpWorldSector from its RpMeshHeader and RpGeometry. RPATOMICPS2ALLOBJIDGETSERIALNUM can be used to extract the serial number from this indentifier, RPATOMICPS2ALLOBJIDGETFLAGS to extract the geometry flags and RPATOMICPS2ALLOBJIDGETNUMMORPHTARGETS to extract the number of morph targets. All these may be used in constructing user callbacks.

A full reinstance (see RxInstanceFlags) will be caused if: the number of morph targets changes, the atomic's RpGeometry was locked for editing using rpGEOMETRYLOCKPOLYGONS or the flags of the atomic's RpGeometry have changed. A congruent reinstance will occur if: the atomic's RpGeometry is locked for editing, the start or end morph targets are changed or any other change is made to the RpGeometry.

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

Parameters:
atomic  A pointer to the current RpAtomic
ps2AllPipeData  A pointer to a RxPS2AllPipeData struct containing information relevant to the current pipeline execution
See also:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpAtomicPS2AllPrimTypeTransTypeSetup RxPS2AllPipeData   ps2AllPipeData,
RwFrustumTestResult    inFrustum
 

RpAtomicPS2AllPrimTypeTransTypeSetup is a macro to select the type of transform and GS primitive for rendering an RpAtomic.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpAtomics, RpAtomicPS2AllObjectSetupCallBack. Based on the result of a prior camera frustum test on the atomic and the atomic's RpMeshHeader (which defines the primitive type of the atomic's geometry), it sets the transType and primType members of the RxPS2AllPipeData struct as appropriate. These are used later on in the pipeline, repsectively, to select VU1 code and set GS primitive type.

Currently, this macro is shared with the RpWorldSector and RwIm3D default pipelines, because the appropriate logic is the same in all cases. 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 RpAtomicPS2AllPrimTypeTransTypeSetupMacro and in function form through RpAtomicPS2AllPrimTypeTransTypeSetupFunc, 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
inFrustum  A RwFrustumTestResult holding the result of a frustum test on the atomic
See also:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
void RpAtomicPS2AllResEntryAlloc RxPS2AllPipeData   ps2AllPipeData,
RwResEntry **    repEntry,
RwUInt32    size,
RwResEntryDestroyNotify    destroyCallBack
 

RpAtomicPS2AllResEntryAlloc is a macro to allocate space for the instance data of an RpMesh in an RpAtomic.

This is a helper macro which is called from the default RxPipelineNodePS2AllMatResEntryAllocCallBack for RpAtomics, RpMeshPS2AllResEntryAllocCallBack. It allocates space in the Resource Arena (see RwResources Overview for details) for the instance data of the current mesh. Depending on whether the parent RpAtomic is morph-animated or not (this affects whether the resource entry is hung off the RpAtomic or its RpGeometry), it allocates space and stores a pointer to it 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 RpAtomicPS2AllResEntryAllocMacro and in function form through RpAtomicPS2AllResEntryAllocFunc, 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 RpAtomicPS2AllTransformSetup RpAtomic   atomic,
RwMatrix **    transform
 

RpAtomicPS2AllTransformSetup is a macro to set up the transformation matrix for an RpAtomic.

This is a helper macro which is called from the default RxPipelineNodePS2AllObjectSetupCallBack for RpAtomics, RpAtomicPS2AllObjectSetupCallBack. It concatenates the atomic's LTM matrix with the current camera's view matrix (see RwCameraGetViewMatrix) and stores the result in the matrix passed in. It may be used in constructing user callbacks.

If you wish for the matrix currently in VU1 memory to persist, you may (instead of calling this macro) set the pointer to the matrix to be NULL (the transform parameter is doubly indirected). This is a useful performance win for geometry which is specified in world-space or camera-space.

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

Parameters:
atomic  A pointer to the current RpAtomic
transform  A pointer to a pointer to the RwMatrix holding the object-space to camera-space transform for the current RpAtomic
See also:
RpAtomicPS2AllObjectSetupCallBack , RxPipelineNodePS2AllObjectSetupCallBack
RxPipeline* RpAtomicSkyGetPS2AllPipeline void   
 

RpAtomicSkyGetPS2AllPipeline returns a pointer to the default atomic PS2All pipeline.

The atomic pipeline based on the PS2All.csl node renders atomic 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, atomics 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 atomic object pipeline, you should use a generic (non-PlayStation 2-specific) one.

The world plugin must be attached before using this function.

The PS2Atomic atomic object pipeline:

PS2All.csl

Returns:
Returns pointer to the pipeline if successful or NULL if there is an error.
See also:
RxNodeDefinitionGetPS2All , RxNodeDefinitionGetPS2AllMat , RpAtomicGetDefaultPipeline , RpAtomicGetDefaultPipeline (platform-specific) , RpAtomicSetDefaultPipeline , RpAtomicGetPipeline , RpAtomicSetPipeline , RpWorldSectorSkyGetPS2AllPipeline , RpWorldGetDefaultSectorPipeline , RpWorldGetDefaultSectorPipeline (platform-specific) , RpWorldSetDefaultSectorPipeline , RpWorldGetSectorPipeline , RpWorldSetSectorPipeline , RpWorldSectorGetPipeline , RpWorldSectorSetPipeline , 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)