Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpPrtStd
[Particles]


Modules

PlayStation 2

Data Structures

struct   RpPrtStdEmitter
struct   RpPrtStdEmitterClass
struct   RpPrtStdEmitterPrt2DRotate
struct   RpPrtStdEmitterPrtColor
struct   RpPrtStdEmitterPrtMatrix
struct   RpPrtStdEmitterPrtSize
struct   RpPrtStdEmitterPrtTexCoords
struct   RpPrtStdEmitterPTank
struct   RpPrtStdEmitterStandard
struct   RpPrtStdParticle2DRotate
struct   RpPrtStdParticleBatch
struct   RpPrtStdParticleClass
struct   RpPrtStdParticleColor
struct   RpPrtStdParticleSize
struct   RpPrtStdParticleStandard
struct   RpPrtStdParticleTexCoords
struct   RpPrtStdPropertyTable

Typedefs

typedef RpPrtStdEmitter *(*  RpPrtStdEmitterCallBack )(RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
typedef RpPrtStdParticleBatch *(*  RpPrtStdParticleCallBack )(RpPrtStdEmitter *emt, RpPrtStdParticleBatch *prtBatch, void *data)
typedef RpPrtStdEmitterCallBack  RpPrtStdEmitterCallBackArray [rpPRTSTDEMITTERCALLBACKMAX]
typedef RpPrtStdParticleCallBack  RpPrtStdParticleCallBackArray [rpPRTSTDPARTICLECALLBACKMAX]
typedef RpPrtStdEmitterClass *(*  RpPrtStdEClassSetupCallBack )(RpPrtStdEmitterClass *eClass)
typedef RpPrtStdParticleClass *(*  RpPrtStdPClassSetupCallBack )(RpPrtStdParticleClass *pClass)

Enumerations

enum   RpPrtStdParticleFlags { rpPRTSTDPARTICLEFLAGEMITTER = 0x00000001, rpPRTSTDPARTICLEFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }
enum   RpPrtStdEmitterFlags {
  rpPRTSTDEMITTERFLAGALIVE = 0x00000001, rpPRTSTDEMITTERFLAGACTIVE = 0x00000002, rpPRTSTDEMITTERFLAGPTANK = 0x00000004, rpPRTSTDEMITTERFLAGEMIT = 0x00000008,
  rpPRTSTDEMITTERFLAGUPDATE = 0x00000010, rpPRTSTDEMITTERFLAGUPDATEPARTICLE = 0x00000020, rpPRTSTDEMITTERFLAGRENDER = 0x00000040, rpPRTSTDEMITTERFLAGRENDERPARTICLE = 0x00000080,
  rpPRTSTDEMITTERFLAGNOBUFFERSWAP = 0x00000100, rpPRTSTDEMITTERFLAGSTREAMREAD = 0x00000200, rpPRTSTDEMITTERFLAGFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RpPrtStdParticleCallBackCode {
  rpPRTSTDPARTICLECALLBACKUPDATE = 0, rpPRTSTDPARTICLECALLBACKRENDER, rpPRTSTDPARTICLECALLBACKCREATE, rpPRTSTDPARTICLECALLBACKDESTROY,
  rpPRTSTDPARTICLECALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RpPrtStdEmitterCallBackCode {
  rpPRTSTDEMITTERCALLBACKEMIT = 0, rpPRTSTDEMITTERCALLBACKBEGINUPDATE, rpPRTSTDEMITTERCALLBACKENDUPDATE, rpPRTSTDEMITTERCALLBACKBEGINRENDER,
  rpPRTSTDEMITTERCALLBACKENDRENDER, rpPRTSTDEMITTERCALLBACKCREATE, rpPRTSTDEMITTERCALLBACKDESTROY, rpPRTSTDEMITTERCALLBACKSTREAMREAD,
  rpPRTSTDEMITTERCALLBACKSTREAMWRITE, rpPRTSTDEMITTERCALLBACKSTREAMGETSIZE, rpPRTSTDEMITTERCALLBACKCLONE, rpPRTSTDEMITTERCALLBACKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RpPrtStdEmitterPrtMatrixFlags { rpPRTSTDEMITTERPRTMTXFLAGSCNSMTX = 0x00000001, RPPRTSTDEMITTERPRTMTXFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT }

Functions

RpPrtStdEmitter RpPrtStdEmitterDefaultCB (RpAtomic *atomic, RpPrtStdEmitter *prtEmt, void *data)
RpPrtStdEmitterClass RpPrtStdEClassCreate (void)
RwBool  RpPrtStdEClassDestroy (RpPrtStdEmitterClass *eClass)
RpPrtStdEmitterClass RpPrtStdEClassSetCallBack (RpPrtStdEmitterClass *eClass, RwInt32 numCallback, RpPrtStdEmitterCallBackArray *emtCB)
RpPrtStdEmitterClass RpPrtStdEClassGetCallBack (RpPrtStdEmitterClass *eClass, RwInt32 *numCallback, RpPrtStdEmitterCallBackArray **emtCB)
RpPrtStdEmitterClass RpPrtStdEClassSetPropTab (RpPrtStdEmitterClass *eClass, RpPrtStdPropertyTable *propTab)
RpPrtStdEmitterClass RpPrtStdEClassGetPropTab (RpPrtStdEmitterClass *eClass, RpPrtStdPropertyTable **propTab)
RpPrtStdEmitterClass RpPrtStdEClassGet (RwInt32 id)
RpPrtStdEmitterClass RpPrtStdEClassGetByPropTab (RpPrtStdPropertyTable *propTab)
RpPrtStdEmitterClass RpPrtStdEClassStreamWrite (RpPrtStdEmitterClass *eClass, RwStream *stream)
RpPrtStdEmitterClass RpPrtStdEClassStreamRead (RwStream *stream)
RwInt32  RpPrtStdEClassStreamGetSize (RpPrtStdEmitterClass *eClass)
RpPrtStdParticleBatch RpPrtStdParticleBatchCreate (RpPrtStdParticleClass *pClass, RwInt32 maxPrt)
RwBool  RpPrtStdParticleBatchDestroy (RpPrtStdParticleBatch *prtBatch)
RpPrtStdParticleBatch RpPrtStdParticleBatchAddBatch (RpPrtStdParticleBatch *prtBatchHead, RpPrtStdParticleBatch *prtBatch)
RpPrtStdEmitter RpPrtStdEmitterCreate (RpPrtStdEmitterClass *eClass)
RwBool  RpPrtStdEmitterDestroy (RpPrtStdEmitter *emt)
RpPrtStdEmitter RpPrtStdEmitterClone (RpPrtStdEmitter *emt)
RpPrtStdEmitter RpPrtStdEmitterAddEmitter (RpPrtStdEmitter *emtHead, RpPrtStdEmitter *emt)
RpPrtStdEmitter RpPrtStdEmitterForAllParticleBatch (RpPrtStdEmitter *emt, RpPrtStdParticleCallBack callback, void *data)
RpPrtStdEmitter RpPrtStdEmitterDestroyParticleBatch (RpPrtStdEmitter *emt)
RpPrtStdParticleBatch RpPrtStdEmitterNewParticleBatch (RpPrtStdEmitter *emt)
RpPrtStdEmitter RpPrtStdEmitterAddParticleBatch (RpPrtStdEmitter *emt, RpPrtStdParticleBatch *prtBatch)
RpPrtStdEmitter RpPrtStdEmitterSetPClass (RpPrtStdEmitter *emt, RpPrtStdParticleClass *pClass, RwInt32 maxPrt)
RpPrtStdEmitter RpPrtStdEmitterGetPClass (RpPrtStdEmitter *emt, RpPrtStdParticleClass **pClass, RwInt32 *maxPrt)
RpPrtStdParticleBatch RpPrtStdParticleDefaultCB (RpPrtStdEmitter *prtEmt, RpPrtStdParticleBatch *prtBatch, void *data)
RpPrtStdParticleClass RpPrtStdPClassCreate (void)
RwBool  RpPrtStdPClassDestroy (RpPrtStdParticleClass *pClass)
RpPrtStdParticleClass RpPrtStdPClassSetCallBack (RpPrtStdParticleClass *pClass, RwInt32 numCallback, RpPrtStdParticleCallBackArray *prtCB)
RpPrtStdParticleClass RpPrtStdPClassGetCallBack (RpPrtStdParticleClass *pClass, RwInt32 *numCallback, RpPrtStdParticleCallBackArray **prtCB)
RpPrtStdParticleClass RpPrtStdPClassSetPropTab (RpPrtStdParticleClass *pClass, RpPrtStdPropertyTable *propTab)
RpPrtStdParticleClass RpPrtStdPClassGetPropTab (RpPrtStdParticleClass *pClass, RpPrtStdPropertyTable **propTab)
RpPrtStdParticleClass RpPrtStdPClassGet (RwInt32 id)
RpPrtStdParticleClass RpPrtStdPClassGetByPropTab (RpPrtStdPropertyTable *propTab)
RpPrtStdParticleClass RpPrtStdPClassStreamWrite (RpPrtStdParticleClass *pClass, RwStream *stream)
RpPrtStdParticleClass RpPrtStdPClassStreamRead (RwStream *stream)
RwInt32  RpPrtStdPClassStreamGetSize (RpPrtStdParticleClass *pClass)
RpPrtStdPropertyTable RpPrtStdPropTabCreate (RwInt32 numProp, RwInt32 *propID, RwInt32 *propStride)
RwBool  RpPrtStdPropTabDestroy (RpPrtStdPropertyTable *propTab)
RpPrtStdPropertyTable RpPrtStdPropTabGetProperties (RpPrtStdPropertyTable *propTab, RwInt32 *numProp, RwInt32 **propID, RwInt32 **propOffset, RwInt32 **propSize)
RwInt32  RpPrtStdPropTabGetPropIndex (RpPrtStdPropertyTable *propTab, RwInt32 propID)
RwInt32  RpPrtStdPropTabGetPropOffset (RpPrtStdPropertyTable *propTab, RwInt32 propID)
RpPrtStdPropertyTable RpPrtStdPropTabGet (RwInt32 id)
RpPrtStdPropertyTable RpPrtStdPropTabGetByProperties (RwInt32 numProp, RwInt32 *propID, RwInt32 *propStride)
RpPrtStdPropertyTable RpPrtStdPropTabStreamRead (RwStream *stream)
RpPrtStdPropertyTable RpPrtStdPropTabStreamWrite (RpPrtStdPropertyTable *eClass, RwStream *stream)
RwInt32  RpPrtStdPropTabStreamGetSize (RpPrtStdPropertyTable *eClass)
RpPrtStdEmitter RpPrtStdEmitterLinkPTank (RpPrtStdEmitter *emt, RpAtomic *ptank)
RpPrtStdParticleBatch RpPrtStdParticleStdUpdateCB (RpPrtStdEmitter *emt, RpPrtStdParticleBatch *prtBatch, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdEmitCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdCreateCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdDestroyCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdCloneCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdBeginUpdateCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdEndUpdateCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdRenderCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RwInt32  RpPrtStdPClassStdCreateID (RwInt32 dataFlag)
RpPrtStdParticleClass RpPrtStdPClassStdCreate (RwInt32 dataFlag)
RwInt32  RpPrtStdEClassStdCreateID (RwInt32 dataFlag)
RpPrtStdEmitterClass RpPrtStdEClassStdCreate (RwInt32 dataFlag)
RpPrtStdEmitter RpPrtStdEmitterStdStreamReadCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdStreamWriteCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitter RpPrtStdEmitterStdStreamGetSizeCB (RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
RpPrtStdEmitterClass RpPrtStdEClassStdSetupCB (RpPrtStdEmitterClass *eClass)
RpPrtStdParticleClass RpPrtStdPClassStdSetupCB (RpPrtStdParticleClass *pClass)
RwBool  RpPrtStdPluginAttach (void)
RwBool  RpAtomicIsParticleEmitter (RpAtomic *atomic)
RpAtomic RpPrtStdAtomicCreate (RpPrtStdEmitterClass *eClass, void *data)
RpAtomic RpPrtStdAtomicForAllEmitter (RpAtomic *atomic, RpPrtStdEmitterCallBack callback, void *data)
RpPrtStdEmitter RpPrtStdAtomicGetEmitter (RpAtomic *atomic)
RpAtomic RpPrtStdAtomicSetEmitter (RpAtomic *atomic, RpPrtStdEmitter *emt)
RpAtomic RpPrtStdAtomicAddEmitter (RpAtomic *, RpPrtStdEmitter *emt)
RpAtomic RpPrtStdAtomicUpdate (RpAtomic *atomic, void *data)
RwStream RpPrtStdGlobalDataStreamRead (RwStream *stream)
RwStream RpPrtStdGlobalDataStreamWrite (RwStream *stream)
RwInt32  RpPrtStdGlobalDataStreamGetSize (void)
RwBool  RpPrtStdSetEClassSetupCallBack (RpPrtStdEClassSetupCallBack emtCB)
RwBool  RpPrtStdGetEClassSetupCallBack (RpPrtStdEClassSetupCallBack *emtCB)
RwBool  RpPrtStdSetPClassSetupCallBack (RpPrtStdPClassSetupCallBack prtCB)
RwBool  RpPrtStdGetPClassSetupCallBack (RpPrtStdPClassSetupCallBack *prtCB)
void  RpPrtStdGlobalDataSetStreamEmbedded (RwBool embedded)
RwBool  RpPrtStdGlobalDataGetStreamEmbedded (void)

Detailed Description

Particle Animation Plugin for RenderWare Graphics.

RpPrtStd Plugin Overview

Requirements

Overview

PrtStd is a basic particle animation and management system. It allows the user to design a set of emitters and particles and animate them via a series of callback functions. It can use the RpPTank plugin for the rendering of the particles emitters.

The plugin defines two objects, an emitter and a particle. Both objects are customizables and can contain user defined data. The user can provide a set of callbacks for handling both objects for different events.

An emitter is an object that emits particles. Once emitted, particles can be independently animated and is always in world space. They are still attached to their parent emitters for management purposes. So an emitter cannot be removed without removing its child particles.

Data for particles are split between the RpPrtStd plugin and the RpPTank plugin. Typically rendering data are stored with the RpPTank, such as positions. Animation data, such as velocity, are stored with the RpPrtStd plugin. Emitter data are always stored in the RpPrtStd plugin.

The operation of the particle system is generally a cycle of

Update

Emitters and particles are updated with the function RpPrtStdAtomicUpdate. This function updates the emitter and its particles. New particles can be created and dead particles are removal during this stage.

The sequence of events during an update is as follows, calling the appropiate callback


        begin emitter update
        for each particle batch
            removal empty particle batches
        for each particle batch
            update existing particles
        emit new particles
            create new particle batch
        end emitter update

   
Warning:
The function RpPrtStdAtomicUpdate cannot be called between RwCameraBeginUpdate and RwCameraEndUpdate.

Render

Emitter and particles are rendering with the function RpAtomicRender. This functions calls the necessary callback to render the objects.

The sequence of events during a render is as follows, calling the appropiate callback


        begin emitter render
        for each particle batch
            render the particles
        end emitter render

   

Typedef Documentation

typedef RpPrtStdEmitterClass*(* RpPrtStdEClassSetupCallBack)(RpPrtStdEmitterClass *eClass)
 

RpPrtStdEClassSetupCallBack represents the function called for setting up an emitter class's set of callback function. The callback function is called after an emitter class is streamed in.

Parameters:
eClass  A pointer to an emitter class.
Returns:
A pointer to the emitter class on success. NULL otherwise.
typedef RpPrtStdEmitter*(* RpPrtStdEmitterCallBack)(RpAtomic *atomic, RpPrtStdEmitter *emt, void *data)
 

RpPrtStdEmitterCallBack RpPrtStdEmitterCallBack represents the function called for processing a RpPrtStdEmitter. There can several types of the functions, each performing a specific task defined by RpPrtStdEmitterCallBackCode.

Parameters:
atomic  A pointer to the emitter's parent atomic.
emt  A pointer to the emitter.
data  A pointer to user data.
Returns:
A pointer to the emitter on success. NULL otherwise.
typedef RpPrtStdEmitterCallBack RpPrtStdEmitterCallBackArray[rpPRTSTDEMITTERCALLBACKMAX]
 

RpPrtStdEmitterCallBackArray represents a set of callback functions for processing a RpPrtStdEmitter. All the functions are of the type RpPrtStdEmitterCallBack.

See also:
RpPrtStdEmitterCallBackCode
typedef RpPrtStdParticleBatch*(* RpPrtStdParticleCallBack)(RpPrtStdEmitter *emt, RpPrtStdParticleBatch *prtBatch, void *data)
 

RpPrtStdParticleCallBack represents the function called for processing a RpPrtStdParticleBatch. There can be several types of the functions, each performing a specific task defined by RpPrtStdParticleCallBackCode.

Parameters:
emt  A pointer to the particle batch's parent emitter.
prtBatch  A pointer to the particle batch.
data  A pointer to user data.
Returns:
A pointer to the particle batch on success. NULL otherwise.
typedef RpPrtStdParticleCallBack RpPrtStdParticleCallBackArray[rpPRTSTDPARTICLECALLBACKMAX]
 

RpPrtStdParticleCallBackArray represents a set of callback functions for processing a RpPrtStdParticleBatch. All the functions are of the type RpPrtStdParticleCallBack.

See also:
RpPrtStdParticleCallBackCode
typedef RpPrtStdParticleClass*(* RpPrtStdPClassSetupCallBack)(RpPrtStdParticleClass *pClass)
 

RpPrtStdPClassSetupCallBack represents the function called for setting up an emitter class's set of callback function. The callback function is called after an emitter class is streamed in.

Parameters:
pClass  A pointer to a particle class.
Returns:
A pointer to the particle class on success. NULL otherwise.

Enumeration Type Documentation

enum RpPrtStdEmitterCallBackCode
 

RpPrtStdEmitterCallBackCode, this type represents the different callbacks for processing a RpPrtStdEmitter. These callbacks will be called at various point for processing the emitter's custom data.

Enumeration values:
rpPRTSTDEMITTERCALLBACKEMIT  Emitter particle emission callback
rpPRTSTDEMITTERCALLBACKBEGINUPDATE  Emitter begin update call back
rpPRTSTDEMITTERCALLBACKENDUPDATE  Emitter end update callback
rpPRTSTDEMITTERCALLBACKBEGINRENDER  Emitter begin render callback
rpPRTSTDEMITTERCALLBACKENDRENDER  Emitter end render callback
rpPRTSTDEMITTERCALLBACKCREATE  Emitter create callback
rpPRTSTDEMITTERCALLBACKDESTROY  Emitter destroy callback
rpPRTSTDEMITTERCALLBACKSTREAMREAD  Emitter stream input callback
rpPRTSTDEMITTERCALLBACKSTREAMWRITE  Emitter stream output callback
rpPRTSTDEMITTERCALLBACKSTREAMGETSIZE  Emitter stream get size callback
rpPRTSTDEMITTERCALLBACKCLONE  Emitter clone callback
enum RpPrtStdEmitterFlags
 

RpPrtStdEmitterFlags, this type represents the different properties of an emitter.

Enumeration values:
rpPRTSTDEMITTERFLAGALIVE  The emitter is alive and should not be removed
rpPRTSTDEMITTERFLAGACTIVE  This indicates the emitter is active or idle
rpPRTSTDEMITTERFLAGPTANK  The emitter uses the RpPTank
rpPRTSTDEMITTERFLAGEMIT  This indicates the emitter can emit new particles
rpPRTSTDEMITTERFLAGUPDATE  This indicates if the emitter is to be updated.
rpPRTSTDEMITTERFLAGUPDATEPARTICLE  This indicated if the emitter's particles are updated.
rpPRTSTDEMITTERFLAGRENDER  This indicates if the emitter is rendered.
rpPRTSTDEMITTERFLAGRENDERPARTICLE  This indicates if the emitter's particles are rendered.
rpPRTSTDEMITTERFLAGNOBUFFERSWAP  Internal usage
rpPRTSTDEMITTERFLAGSTREAMREAD  Internal usage
enum RpPrtStdEmitterPrtMatrixFlags
 

A set of flag settings for use in the RpPrtStdEmitterPrtMatrix flag

Enumeration values:
rpPRTSTDEMITTERPRTMTXFLAGSCNSMTX  Apply the prtCnsMtx matrix to each particle if set
enum RpPrtStdParticleCallBackCode
 

RpPrtStdParticleCallBackCode, this type represents the different callbacks for processing a RpPrtStdParticleBatch. These callbacks will be called at various point for processing the particle's custom data.

Enumeration values:
rpPRTSTDPARTICLECALLBACKUPDATE  Particle update callback
rpPRTSTDPARTICLECALLBACKRENDER  Particle render callback
rpPRTSTDPARTICLECALLBACKCREATE  Particle create callback
rpPRTSTDPARTICLECALLBACKDESTROY  Particle destroy callback
enum RpPrtStdParticleFlags
 

RpPrtStdParticleFlags, this type represents the different properties of a particle.

Enumeration values:
rpPRTSTDPARTICLEFLAGEMITTER  Particle is an emitter.

Function Documentation

RwBool RpAtomicIsParticleEmitter RpAtomic   atomic
 

RpAtomicIsParticleEmitter is called by the application to query if an atomic is a particle emitter.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
atomic  Pointer to an atomic.
Returns:
an TRUE if atomic is a particle emitter, FALSE otherwise.
RpAtomic* RpPrtStdAtomicAddEmitter RpAtomic   atomic,
RpPrtStdEmitter   emt
 

RpPrtStdAtomicAddEmitter is a utility function to add an emitter to an atomic. The emitters are held in a circular linked list in the order they are added to the atomic.

This function should only be used for atomics created with RpPrtStdAtomicCreate.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
atomic  Pointer to an emitter atomic.
emt  Pointer to an emitter to be added.
Returns:
a pointer to an atomic on success, NULL otherwise
See also:
RpPrtStdAtomicCreate , RpPrtStdAtomicGetEmitter , RpPrtStdAtomicSetEmitter
RpAtomic* RpPrtStdAtomicCreate RpPrtStdEmitterClass   eClass,
void *    data
 

RpPrtStdAtomicCreate is called by the application to create an emitter atomic.

The atomic will have a single particle emitter attached as extension data. The type of emitter is set by the eClass parameter. The class's create callbacks will be called to allow custom properties to be set.

An emitter atomic is different from a normal atomic. It does not contain any geometric data and its render callback is replaced.

Depending on the emitters attached, the atomic's frame could be used to position the emitters in the world. So if the emitter is not stationary, the atomic's frame should be updated as with other atomics.

The atomic can be destroyed using RpAtomicDestroy.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
eClass  Pointer to an emitter class.
data  Private data passed to the create callbacks.
Returns:
an atomic on success, NULL otherwise
RpAtomic* RpPrtStdAtomicForAllEmitter RpAtomic   atomic,
RpPrtStdEmitterCallBack    callback,
void *    data
 

RpPrtStdAtomicForAllEmitter is a utility function to apply a callback function to all emitters attached to the atomic.

If the atomic does not contain any emitters, then the function does nothing.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
atomic  Pointer to an emitter atomic.
callback  Callback function to be called for the emitters.
data  Pointer to private data to be passed to the callback.
Returns:
an atomic on success, NULL otherwise
See also:
RpPrtStdAtomicCreate , RpPrtStdAtomicAddEmitter
RpPrtStdEmitter* RpPrtStdAtomicGetEmitter RpAtomic   atomic
 

RpPrtStdAtomicGetEmitter is a utility function to return the emitter attached to the atomic.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
atomic  Pointer to an emitter atomic.
Returns:
a pointer to an emitter on success, NULL otherwise
See also:
RpPrtStdAtomicCreate , RpPrtStdAtomicAddEmitter , RpPrtStdAtomicSetEmitter
RpAtomic* RpPrtStdAtomicSetEmitter RpAtomic   atomic,
RpPrtStdEmitter   emt
 

RpPrtStdAtomicSetEmitter is a utility function to attach an emitter to an atomic. This replaces the existing emitter in the atomic. It is the responsibility of the caller to destroy the atomic's existing emitters if required.

This function should only be used for atomics created with RpPrtStdAtomicCreate.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
atomic  Pointer to an emitter atomic.
emt  Pointer to an emitter to be attached.
Returns:
a pointer to an atomic on success, NULL otherwise
See also:
RpPrtStdAtomicCreate , RpPrtStdAtomicAddEmitter , RpPrtStdAtomicGetEmitter
RpAtomic* RpPrtStdAtomicUpdate RpAtomic   atomic,
void *    data
 

RpPrtStdAtomicUpdate is the function to update all the emitters in the atomic. This in turn updates all particle emitted by the emitters. New particles are also created by emitters during the emit stage. Dead emitters and particles are removed before any updates.

The update is performed by the update callback of the emitters' and particles' classes. The emitters and particles are updated in the order they are added to the atomic and emitters respectively. The callbacks are applied in the order they are created in the emitter and particle classes.

The emitters are updated before any particles.

The particles are updated in batches and all update callbacks are applied to the batch before the next batch.

The content of the data parameter is implementation specific, depending on the underlying callback. This may be a simple delta time value to a private data strcuture if more than one type of data are used for updating.

This function should only be used for atomics created with RpPrtStdAtomicCreate. It cannot be used between RwCameraBeginUpdate and RwCameraEndUpdate. Depending on the platform, it may also make use of hardware resources for optimization purposes. The application needs to ensure this does not conflict with its own use of these resources. See the platform's specific section for more details.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
atomic  Pointer to an emitter atomic.
data  Pointer to private data for the update callbacks, this contents of this parameter depends on the underlying callbacks.
Returns:
a pointer to an atomic on success, NULL otherwise
See also:
RpPrtStdAtomicCreate , RpPrtStdParticleStdUpdateCB , RpPrtStdEmitterStdEmitCB
RpPrtStdEmitterClass* RpPrtStdEClassCreate void   
 

RpPrtStdEClassCreate is the function to create a new empty emitter class.

Returns:
a pointer to an emitter class on success, NULL otherwise.
See also:
RpPrtStdEClassDestroy , RpPrtStdEClassGetCallBack , RpPrtStdEClassSetCallBack , RpPrtStdEClassGetPropTab , RpPrtStdEClassSetPropTab , RpPrtStdPropTabCreate
RwBool RpPrtStdEClassDestroy RpPrtStdEmitterClass   eClass
 

RpPrtStdEClassDestroy is the function to destroys an emitter class.

Parameters:
eClass  A pointer to the emitter class.
Returns:
TRUE on success, FALSE otherwise.
See also:
RpPrtStdEClassDestroy , RpPrtStdEClassGetCallBack , RpPrtStdEClassSetCallBack , RpPrtStdEClassGetPropTab , RpPrtStdEClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdEmitterClass* RpPrtStdEClassGet RwInt32    id
 

RpPrtStdEClassGet is the function to return the emitter class by its id number.

Each emitter class is given an identification number that must be unique. This number is primary used to identify the emitter class used by an emitter.

Parameters:
id  An emitter class id number to search for.
Returns:
a pointer to an emitter class on successful, NULL otherwise.
See also:
RpPrtStdEClassGetByPropTab
RpPrtStdEmitterClass* RpPrtStdEClassGetByPropTab RpPrtStdPropertyTable   propTab
 

RpPrtStdEClassGetByPropTab is the function to return the emitter class by the property table.

Each emitter class has a reference to a property table. This property table is used to defined the data present in the emitter.

Parameters:
propTab  A pointer to the property table.
Returns:
a pointer to an emitter class on successful, NULL otherwise.
See also:
RpPrtStdEClassGet
RpPrtStdEmitterClass* RpPrtStdEClassGetCallBack RpPrtStdEmitterClass   eClass,
RwInt32   numCallback,
RpPrtStdEmitterCallBackArray **    emtCB
 

RpPrtStdEClassGetCallBack is the function to return the set of callbacks attached to the emitter class.

These callbacks will be called for any emitters created with this emitter class. This will replace the previous set of callbacks attached.

Parameters:
eClass  A pointer to the emitter class.
numCallback  A pointer to a RwInt32 for returning the number of callbacks.
emtCB  A pointer to a RpPrtStdEmitterCallBackArray for returning the callback arrays.
Returns:
a pointer to an emitter class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdEClassDestroy , RpPrtStdEClassSetCallBack , RpPrtStdEClassGetPropTab , RpPrtStdEClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdEmitterClass* RpPrtStdEClassGetPropTab RpPrtStdEmitterClass   eClass,
RpPrtStdPropertyTable **    propTab
 

RpPrtStdEClassGetPropTab is the function to return the property table of emitter class.

The property table describes what information are stored in the emitter and their location. The emitter class keeps a reference to the input property table.

Parameters:
eClass  A pointer to the emitter class.
propTab  A pointer to a pointer the property table for returning a reference to the property table.
Returns:
a pointer to an emitter class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdEClassDestroy , RpPrtStdEClassGetCallBack , RpPrtStdEClassSetCallBack , RpPrtStdEClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdEmitterClass* RpPrtStdEClassSetCallBack RpPrtStdEmitterClass   eClass,
RwInt32    numCallback,
RpPrtStdEmitterCallBackArray   emtCB
 

RpPrtStdEClassSetCallBack is the function to assign a set of callbacks to the emitter class.

These callbacks will be called for any emitters created with this emitter class. This will replace the previous set of callbacks attached.

A copy of the callback array will be made and attached to the emitter class. So the input callback array can be destroyed after use.

Parameters:
eClass  A pointer to the emitter class.
numCallback  A RwInt32 for returning the number callback arrays.
emtCB  A pointer to a callback array to be attached.
Returns:
a pointer to an emitter class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdEClassDestroy , RpPrtStdEClassGetCallBack , RpPrtStdEClassGetPropTab , RpPrtStdEClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdEmitterClass* RpPrtStdEClassSetPropTab RpPrtStdEmitterClass   eClass,
RpPrtStdPropertyTable   propTab
 

RpPrtStdEClassSetPropTab is the function to assign a set of properties to the emitter class.

The property table describes what information are stored in the emitter and their location. The emitter class keeps a reference to the input property table.

Parameters:
eClass  A pointer to the emitter class.
propTab  A pointer to the property table to be attached.
Returns:
a pointer to an emitter class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdEClassDestroy , RpPrtStdEClassGetCallBack , RpPrtStdEClassSetCallBack , RpPrtStdEClassGetPropTab , RpPrtStdPropTabCreate
RpPrtStdEmitterClass* RpPrtStdEClassStdCreate RwInt32    dataFlag
 

RpPrtStdEClassStdCreate is a utility function to create an emitter class containing a set of standard properties and callbacks.

The dataFlag is used to set the properties in the emitter class. Not all properties are necessary and some are optional.

This function creates an emitter class containing standard properties only. Emitters with custom properties should use RpPrtStdEClassCreate.

A property table is created internally for this class. This property table will be destroyed with the emitter class when it is destroyed. The user does not need to destroy the property table explicitly.

The possible settings for the data flags are, where each setting represent a property to be present.

        rpPRTSTDEMITTERDATAFLAGSTANDARD
        rpPRTSTDEMITTERDATAFLAGPRTCOLOR
        rpPRTSTDEMITTERDATAFLAGPRTTEXCOORDS
        rpPRTSTDEMITTERDATAFLAGPRTSIZE
        rpPRTSTDEMITTERDATAFLAGPTANK
        rpPRTSTDEMITTERDATAFLAGPRTMATRIX
   
Parameters:
dataFlag  A bitfield representing the standard properties to be added to the emitter class.
Returns:
pointer to the emitter class if sucessful, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassCreate
RwInt32 RpPrtStdEClassStdCreateID RwInt32    dataFlag
 

RpPrtStdEClassStdCreateID is a utility function to create an emitter class ID.

The dataFlag is used to create a unique ID.

Note that the ID range [0x00000000] to [0x00FFFFFF] is used internally, using an idea in this range may result in crash and unpredictable behaviors.

        rpPRTSTDEMITTERDATAFLAGSTANDARD
        rpPRTSTDEMITTERDATAFLAGPRTCOLOR
        rpPRTSTDEMITTERDATAFLAGPRTTEXCOORDS
        rpPRTSTDEMITTERDATAFLAGPRTSIZE
        rpPRTSTDEMITTERDATAFLAGPTANK
        rpPRTSTDEMITTERDATAFLAGPRTMATRIX
   
Parameters:
dataFlag  A bitfield representing the standard properties to be added to the emitter class.
Returns:
The generated unique ID.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassCreate
RpPrtStdEmitterClass* RpPrtStdEClassStdSetupCB RpPrtStdEmitterClass   eClass
 

RpPrtStdEClassStdSetupCB is the callback function to restore the emitter class callback functions for standard emitter properties.

This function is called after an emitter class is streamed in.

This callback should be used if the emitter cle class contains the standard emitter properties.

Parameters:
eClass  A pointer to an emitter class for the restoring of the callback.
Returns:
pointer to the emitter class if sucessful, NULL otherwise.
See also:
RpPrtStdGetEClassSetupCallBack , RpPrtStdSetEClassSetupCallBack
RwInt32 RpPrtStdEClassStreamGetSize RpPrtStdEmitterClass   eClass
 

RpPrtStdEClassStreamGetSize is used to determine the size in bytes of the binary representation of an emitter class. This value is used in the binary chunk header to indicate the size of the chunk. The size includes the size of the chunk header.

Parameters:
eClass  A pointer to the emitter class.
Returns:
Returns a RwInt32 value equal to the chunk size (in bytes) of the emitter class.
See also:
RpPrtStdEClassCreate , RpPrtStdEClassDestroy , RpPrtStdEClassGet , RpPrtStdEClassGetCallBack , RpPrtStdEClassGetCallBack , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamGetSize , RpPrtStdPClassStreamRead , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamGetSize
RpPrtStdEmitterClass* RpPrtStdEClassStreamRead RwStream   stream
 

RpPrtStdEClassStreamRead is the function to stream in an emitter class.

The emitter classes must be streamed out before any emitters. By default the emitter class is streamed out with each emitter. Using the function RpPrtStdGlobalDataSetStreamEmbedded this behavior can be changed, allowing to stream all the class and other needed data to one stream and the emitter in another one.

When the emitters are streamed in, if there is no emitter class streamed with it, it will search for any emitter class with the same identification number. If it fails, then the emitter will have a NULL emitter class.

The sequence to locate and read a emitter class from a binary stream is as follows:

   RwStream *stream;
   RpPrtStdEmitterClass *newEmitterClass;

   stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx");
   if( stream )
   {
       if( RwStreamFindChunk(stream, rwID_PRTSTDGLOBALDATA, NULL, NULL) )
       {
           newEmitterClass = RpPrtStdEClassStreamRead(stream);
       }

       RwStreamClose(stream, NULL);
   }
Parameters:
stream  A pointer to the input stream.
Returns:
a pointer to an emitter class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdEClassDestroy , RpPrtStdEClassGet , RpPrtStdEClassGetCallBack , RpPrtStdEClassGetCallBack , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamGetSize , RpPrtStdPClassStreamRead , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamGetSize , RpPrtStdGlobalDataSetStreamEmbedded , RpPrtStdGlobalDataGetStreamEmbedded , RwStreamOpen , RwStreamClose , RwStreamFindChunk , RpPrtStdPluginAttach
RpPrtStdEmitterClass* RpPrtStdEClassStreamWrite RpPrtStdEmitterClass   eClass,
RwStream   stream
 

RpPrtStdEClassStreamWrite is the function to stream out an emitter class.

The emitter classes must be streamed out before any emitters. By default the emitter class is streamed out with each emitter. Using the function RpPrtStdGlobalDataSetStreamEmbedded this behavior can be changed, allowing to stream all the class and other needed data to one stream and the emitter in another one.

When the emitters are streamed in, if there is no emitter class streamed with it, it will search for any emitter class with the same identification number. If it fails, then the emitter will have a NULL emitter class.

Parameters:
eClass  A pointer to the emitter class.
stream  A pointer to the output stream.
Returns:
a pointer to an emitter class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdEClassDestroy , RpPrtStdEClassGet , RpPrtStdEClassGetCallBack , RpPrtStdEClassGetCallBack , RpPrtStdEClassStreamRead , RpPrtStdEClassStreamGetSize , RpPrtStdPClassStreamRead , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamGetSize , RpPrtStdGlobalDataSetStreamEmbedded , RpPrtStdGlobalDataGetStreamEmbedded
RpPrtStdEmitter* RpPrtStdEmitterAddEmitter RpPrtStdEmitter   emtHead,
RpPrtStdEmitter   emt
 

RpPrtStdEmitterAddEmitter is the function to add an emitter to a circular linked emitter list.

If the list is empty, then the emitter forms a new list. If the list is not empty, then the emitter is added to the end of the list. The emitter class of the list and the emitter must match.

Parameters:
emtHead  Pointer to the emitter list.
emt  Pointer to the emitter.
Returns:
a pointer to an emitter on success, NULL otherwise
See also:
RpPrtStdEmitterCreate , RpPrtStdEmitterDestroy
RpPrtStdEmitter* RpPrtStdEmitterAddParticleBatch RpPrtStdEmitter   emt,
RpPrtStdParticleBatch   prtBatch
 

RpPrtStdEmitterAddParticleBatch is the function to add a particle batch to an emitter.

If the list is empty, then the particle batch forms a new list. If the list is not empty, then the particle batch is added to the end of the list. The particle class of the emitter and the particle batch must match.

Parameters:
emt  Pointer to the emitter.
prtBatch  Pointer to the particle batch.
Returns:
a pointer to an emitter on success, NULL otherwise
See also:
RpPrtStdEmitter* RpPrtStdEmitterClone RpPrtStdEmitter   emt
 

RpPrtStdEmitterClone is the function to clone an emitter.

Parameters:
emt  Pointer to the emitter.
Returns:
A pointer to the new emitter on success, null otherwise.
See also:
RpPrtStdEmitterCreate , RpPrtStdEmitterDestroy
RpPrtStdEmitter* RpPrtStdEmitterCreate RpPrtStdEmitterClass   eClass
 

RpPrtStdEmitterCreate is the function to create a new emitter.

Parameters:
eClass  Pointer to the emitter class.
Returns:
a pointer to an emitter on success, NULL otherwise
See also:
RpPrtStdEmitterAddEmitter , RpPrtStdEmitterClone , RpPrtStdEmitterDestroy
RpPrtStdEmitter* RpPrtStdEmitterDefaultCB RpAtomic   atomic,
RpPrtStdEmitter   prtEmt,
void *    data
 

RpPrtStdEmitterDefaultCB is the default empty callback for the emitter class.

Parameters:
atomic  Pointer to the parent atomic.
prtEmt  Pointer to the emitter.
data  Pointer to private data
Returns:
a pointer to an emitter on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdEClassGetCallBack , RpPrtStdEClassSetCallBack , RpPrtStdEClassGetPropTab , RpPrtStdEClassSetPropTab , RpPrtStdPropTabCreate
RwBool RpPrtStdEmitterDestroy RpPrtStdEmitter   emt
 

RpPrtStdEmitterDestroy is the function to destroy an emitter.

Parameters:
emt  Pointer to the emitter.
Returns:
TRUE on success, FALSE otherwise
See also:
RpPrtStdEmitterAddEmitter , RpPrtStdEmitterClone , RpPrtStdEmitterCreate
RpPrtStdEmitter* RpPrtStdEmitterDestroyParticleBatch RpPrtStdEmitter   emt
 

RpPrtStdEmitterDestroyParticleBatch is a function to destroy all particle batches attached to the emitter.

If the emiter does not contain any particle batches, then the function does nothing.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
emt  Pointer to an emitter.
Returns:
a pointer to an emitter on success, NULL otherwise
See also:
RpPrtStdParticleBatchCreate , RpPrtStdParticleBatchDestroy , RpPrtStdEmitterNewParticleBatch
RpPrtStdEmitter* RpPrtStdEmitterForAllParticleBatch RpPrtStdEmitter   emt,
RpPrtStdParticleCallBack    callback,
void *    data
 

RpPrtStdEmitterForAllParticleBatch is a utility function to apply a callback function to all particle batches attached to the emitter.

If the emiter does not contain any particle batches, then the function does nothing.

The library rpprtstd and the header file rpprtstd.h are required.

Parameters:
emt  Pointer to an emitter.
callback  Callback function to be called for the particle batches.
data  Pointer to private data to be passed to the callback.
Returns:
a pointer to an emitter on success, NULL otherwise
See also:
RpPrtStdEmitterNewParticleBatch , RpPrtStdEmitterDestroyParticleBatch
RpPrtStdEmitter* RpPrtStdEmitterGetPClass RpPrtStdEmitter   emt,
RpPrtStdParticleClass **    pClass,
RwInt32   maxPrt
 

RpPrtStdEmitterGetPClass is the function to return the particle class attached to an emitter.

Particles from the emitter will be created using this particle class.

Parameters:
emt  A pointer to the emitter.
pClass  A pointer to the particle class.
maxPrt  A pointer to a RwInt32 for the particle batch size.
Returns:
a pointer to an emitter on success, NULL otherwise
See also:
RpPrtStdPClassCreate , RpPrtStdPClassDestroy , RpPrtStdEmitterSetPClass
RpPrtStdEmitter* RpPrtStdEmitterLinkPTank RpPrtStdEmitter   emt,
RpAtomic   ptank
 

RpPrtStdEmitterLinkPTank allow one to link a custom PTank to an emitter. This function should be called before any call to RpPrtStdAtomicUpdate and should never be called after. Once linked, the emitter got ownership of the ptank and will destroy it as if it had created it. The PTank Atomic need to be linked to a RwFrame

Parameters:
emt  Pointer to the parent emitter.
ptank  Pointer to the ptank object to link.
Returns:
pointer to the particle emitter if sucessful, NULL otherwise.
See also:
RpPrtStdAtomicUpdate , RpPTankAtomicCreate
RpPrtStdParticleBatch* RpPrtStdEmitterNewParticleBatch RpPrtStdEmitter   emt
 

RpPrtStdEmitterNewParticleBatch is the function to return an empty particle batch for use with the emitter.

The new particle batch will be added to the list of particle batches attached to the emitter.

Parameters:
emt  Pointer to the emitter.
Returns:
a pointer to a particle batch on success, NULL otherwise
See also:
RpPrtStdParticleBatchCreate , RpPrtStdParticleBatchDestroy , RpPrtStdEmitterDestroyParticleBatch
RpPrtStdEmitter* RpPrtStdEmitterSetPClass RpPrtStdEmitter   emt,
RpPrtStdParticleClass   pClass,
RwInt32    maxPrt
 

RpPrtStdEmitterSetPClass is the function to set the particle class to an emitter.

Particles emitted from the emitter will be created using this particle class. Any existing particle batches attached to the emitter will be destroyed as they will be unusable with the new particle class.

Parameters:
emt  A pointer to the emitter.
pClass  A pointer to the particle class.
maxPrt  A RwInt32 for the particle batch size.
Returns:
a pointer to an emitter on success, NULL otherwise
See also:
RpPrtStdPClassCreate , RpPrtStdPClassDestroy , RpPrtStdEmitterGetPClass
RpPrtStdEmitter* RpPrtStdEmitterStdBeginUpdateCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdBeginUpdateCB is the begin update callback for the standard emitter property.

This callback updates the standard emitter properties of an emitter.

This callback should be added to an emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  Pointer to the parent atomic.
emt  Pointer to the emitter.
data  Pointer to private data for the emit callback. Not used.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdAtomicUpdate , RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdCloneCB , RpPrtStdEmitterStdCreateCB , RpPrtStdEmitterStdDestroyCB , RpPrtStdEmitterStdEmitCB , RpPrtStdEmitterStdEndUpdateCB , RpPrtStdEmitterStdRenderCB , RpPrtStdPClassSetCallBack , RpPrtStdPClassStdCreate
RpPrtStdEmitter* RpPrtStdEmitterStdCloneCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdCloneCB is the clone callback for the standard emitter property.

This callback clones the standard emitter properties of an emitter.

This callback should be added to an emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  Pointer to the parent atomic.
emt  Pointer to the source emitter.
data  Pointer to the destination emitter.
Returns:
pointer to the destination emitter if sucessful, NULL otherwise.
See also:
RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdBeginUpdateCB , RpPrtStdEmitterStdEmitCB , RpPrtStdEmitterStdEndUpdateCB , RpPrtStdEmitterStdRenderCB , RpPrtStdPClassSetCallBack , RpPrtStdPClassStdCreate , RpPrtStdParticleStdUpdateCB
RpPrtStdEmitter* RpPrtStdEmitterStdCreateCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdCreateCB is the create callback for the standard emitter property.

This callback setups the standard emitter properties of an emitter.

This callback should be added to an emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  Pointer to the parent atomic.
emt  Pointer to the emitter.
data  Pointer to private data for the emit callback. Not used.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdBeginUpdateCB , RpPrtStdEmitterStdDestroyCB , RpPrtStdEmitterStdCloneCB , RpPrtStdEmitterStdEmitCB , RpPrtStdEmitterStdEndUpdateCB , RpPrtStdEmitterStdRenderCB , RpPrtStdPClassSetCallBack , RpPrtStdPClassStdCreate , RpPrtStdParticleStdUpdateCB
RpPrtStdEmitter* RpPrtStdEmitterStdDestroyCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdDestroyCB is the destroy callback for the standard emitter property.

This callback destroy the standard emitter properties of an emitter.

This callback should be added to an emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  Pointer to the parent atomic.
emt  Pointer to the emitter.
data  Pointer to private data for the emit callback. Not used.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdCreateCB , RpPrtStdEmitterStdDestroyCB , RpPrtStdEmitterStdBeginUpdateCB , RpPrtStdEmitterStdCloneCB , RpPrtStdEmitterStdEmitCB , RpPrtStdEmitterStdEndUpdateCB , RpPrtStdEmitterStdRenderCB , RpPrtStdPClassSetCallBack , RpPrtStdPClassStdCreate , RpPrtStdParticleStdUpdateCB
RpPrtStdEmitter* RpPrtStdEmitterStdEmitCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdEmitCB is the emit callback for the standard emitter property.

This callback emits new particles using the current emitter. The particle class must contain the standard particle properties.

This callback should be added to an emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  Pointer to the parent atomic.
emt  Pointer to the emitter.
data  Pointer to private data for the emit callback. This callback expects the data to be a pointer to a RwReal representing the delta time elapsed.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdAtomicUpdate , RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdBeginUpdateCB , RpPrtStdEmitterStdCloneCB , RpPrtStdEmitterStdCreateCB , RpPrtStdEmitterStdDestroyCB , RpPrtStdEmitterStdEndUpdateCB , RpPrtStdEmitterStdRenderCB , RpPrtStdPClassSetCallBack , RpPrtStdPClassStdCreate
RpPrtStdEmitter* RpPrtStdEmitterStdEndUpdateCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdEndUpdateCB is the end update callback for the standard emitter property.

This callback completes the updates for the standard emitter properties of an emitter.

This callback should be added to an emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  Pointer to the parent atomic.
emt  Pointer to the emitter.
data  Pointer to private data for the emit callback. Not used.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdAtomicUpdate , RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdBeginUpdateCB , RpPrtStdEmitterStdCloneCB , RpPrtStdEmitterStdCreateCB , RpPrtStdEmitterStdDestroyCB , RpPrtStdEmitterStdEmitCB , RpPrtStdEmitterStdRenderCB , RpPrtStdPClassSetCallBack , RpPrtStdPClassStdCreate
RpPrtStdEmitter* RpPrtStdEmitterStdRenderCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdRenderCB is the render callback for the standard emitter property.

This callbacks renders the particles emitted by the emitter.

This callback should be added to an emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  Pointer to the parent atomic.
emt  Pointer to the emitter.
data  Pointer to private data for the emit callback. Not used.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdEClassSetCallBack , RpPrtStdEmitterStdBeginUpdateCB , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdCloneCB , RpPrtStdEmitterStdCreateCB , RpPrtStdEmitterStdDestroyCB , RpPrtStdEmitterStdEmitCB , RpPrtStdEmitterStdEndUpdateCB , RpPrtStdPClassSetCallBack , RpPrtStdPClassStdCreate
RpPrtStdEmitter* RpPrtStdEmitterStdStreamGetSizeCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdStreamGetSizeCB is the callback used to determine the size in bytes of the binary representation of an emitter. This value is used in the binary chunk header to indicate the size of the chunk.

This callback should be added to a emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  A pointer to the emitter's parent atomic.
emt  A pointer to the emitter.
data  A pointer to a RwInt32 to return the stream size.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdStreamGetSizeCB , RpPrtStdEmitterStdStreamReadCB , RpPrtStdEmitterStdStreamWriteCB
RpPrtStdEmitter* RpPrtStdEmitterStdStreamReadCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdStreamReadCB is the stream in callback for the standard particle property.

This function streams in an emitter containing standard properties.

This callback should be added to a emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  A pointer to the emitter's parent atomic.
emt  A pointer to the emitter to stream into.
data  A pointer to the input stream.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdStreamGetSizeCB , RpPrtStdEmitterStdStreamReadCB , RpPrtStdEmitterStdStreamWriteCB
RpPrtStdEmitter* RpPrtStdEmitterStdStreamWriteCB RpAtomic   atomic,
RpPrtStdEmitter   emt,
void *    data
 

RpPrtStdEmitterStdStreamWriteCB is the stream out callback for the standard particle property.

This function streams out an emitter containing standard properties.

This callback should be added to a emitter class if the emitter contains any of the standard emitter properties.

Parameters:
atomic  A pointer to the emitter's parent atomic.
emt  A pointer to the emitter.
data  A pointer to output stream.
Returns:
pointer to the emitter if sucessful, NULL otherwise.
See also:
RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdStreamGetSizeCB , RpPrtStdEmitterStdStreamReadCB , RpPrtStdEmitterStdStreamWriteCB
RwBool RpPrtStdGetEClassSetupCallBack RpPrtStdEClassSetupCallBack   emtCB
 

RpPrtStdGetEClassSetupCallBack is the function to get the RpPrtStdEClassSetupCallBack callback function.

The RpPrtStdEClassSetupCallBack is used to setup the callback function for an emitter class. It is called after a RpPrtStdEmitterClass is streamed in. This allows the user the opportunity to setup the RpPrtStdEmitterClass with any custom function for the emitter class.

Parameters:
emtCB  A pointer to a RpPrtStdEClassSetupCallBack for returning the setup function.
Returns:
TRUE if successful, FALSE otherwise.
See also:
RpPrtStdSetEClassSetupCallBack , RpPrtStdGetPClassSetupCallBack , RpPrtStdSetPClassSetupCallBack
RwBool RpPrtStdGetPClassSetupCallBack RpPrtStdPClassSetupCallBack   prtCB
 

RpPrtStdGetPClassSetupCallBack is the function to get the RpPrtStdPClassSetupCallBack callback function.

The RpPrtStdPClassSetupCallBack is used to setup the callback function for a particle class. It is called after a RpPrtStdParticleClass is streamed in. This allows the user the opportunity to setup the RpPrtStdParticleClass with any custom function for the particle class.

Parameters:
prtCB  A pointer to a RpPrtStdPClassSetupCallBack for returning the setup function.
Returns:
TRUE if successful, FALSE otherwise.
See also:
RpPrtStdGetEClassSetupCallBack , RpPrtStdSetEClassSetupCallBack , RpPrtStdSetPClassSetupCallBack
RwBool RpPrtStdGlobalDataGetStreamEmbedded void   
 

RpPrtStdGlobalDataGetStreamEmbedded is the function to get the status of stream embedded flag.

Returns:
the value of the stream embedded flag.
See also:
RpPrtStdGlobalDataSetStreamEmbedded , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamRead , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamRead , RpPrtStdPropTabStreamRead , RpPrtStdPropTabStreamWrite , RpPrtStdPropTabStreamGetSize , RpPrtStdGlobalDataStreamRead , RpPrtStdGlobalDataStreamWrite , RpPrtStdGlobalDataStreamGetSize , RpPrtStdGlobalDataStreamRead , RpPrtStdGlobalDataStreamWrite
void RpPrtStdGlobalDataSetStreamEmbedded RwBool    value
 

RpPrtStdGlobalDataSetStreamEmbedded is the function to set the status of stream embedded flag.

The stream embeddes flag change the way the emitters are streamed : by default the emitters are streamed with there attached emitter class, particle class and two property tables (one for the emitter class, one for the particle class). As most of the class and properties can be shared by many emitters, it is possible to stream out emitters whithout those informations by setting the stream embedded flag to FALSE, and to stream out all the classes at once using the RpPrtStdGlobalDataStreamWrite function, reducing the size of the files.

Parameters:
value  the new value of the stream embedded flag.
See also:
RpPrtStdGlobalDataGetStreamEmbedded , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamRead , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamRead , RpPrtStdPropTabStreamRead , RpPrtStdPropTabStreamWrite , RpPrtStdPropTabStreamGetSize , RpPrtStdGlobalDataStreamRead , RpPrtStdGlobalDataStreamWrite , RpPrtStdGlobalDataStreamGetSize , RpPrtStdGlobalDataStreamRead , RpPrtStdGlobalDataStreamWrite
RwInt32 RpPrtStdGlobalDataStreamGetSize void   
 

RpPrtStdGlobalDataStreamGetSize is used to determine the size in bytes of the binary representation of an emitter class, particle class and property tables. This value is used in the binary chunk header to indicate the size of the chunk. The size includes the size of the chunk header.

Returns:
Returns a RwInt32 value equal to the chunk size (in bytes) of the emitter class.
See also:
RpPrtStdGlobalDataStreamRead , RpPrtStdGlobalDataStreamWrite , RpPrtStdEClassStreamRead , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamGetSize , RpPrtStdPClassStreamRead , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamGetSize , RpPrtStdPropTabStreamRead , RpPrtStdPropTabStreamWrite , RpPrtStdPropTabStreamGetSize
RwStream* RpPrtStdGlobalDataStreamRead RwStream   stream
 

RpPrtStdGlobalDataStreamRead is the function to stream in the shared data used by an emitter.

RpPrtStdGlobalDataStreamRead streams in the RpPrtStdEmitterClass, the RpPrtStdParticleClass and the RpPrtStdPropertyTable. These data are stored by default with the emitters, but as these can be shared by more than one emitter, they can be stored separatly using RpPrtStdGlobalDataStreamWrite

When the emitters are streamed in, if there is no emitter class streamed with it, it will search for any emitter class with the same identification number. If it fails, then the emitter will have a NULL emitter class.

The sequence to locate and read a emitter class from a binary stream is as follows:

   RwStream *stream;

   stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx");
   if( stream )
   {
       if( RwStreamFindChunk(stream, rwID_PRTSTDGLOBALDATA, NULL, NULL) )
       {
           if (RpPrtStdGlobalDataStreamRead(stream) != stream)
           {
               // Error during input.
           }
       }

       RwStreamClose(stream, NULL);
   }
Parameters:
stream  A pointer to the input stream.
Returns:
a pointer to the input stream on success, NULL otherwise.
See also:
RpPrtStdGlobalDataStreamGetSize , RpPrtStdGlobalDataStreamRead , RpPrtStdEClassStreamRead , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamGetSize , RpPrtStdPClassStreamRead , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamGetSize , RpPrtStdPropTabStreamRead , RpPrtStdPropTabStreamWrite , RpPrtStdPropTabStreamGetSize , RwStreamOpen , RwStreamClose , RwStreamFindChunk , RpPrtStdPluginAttach
RwStream* RpPrtStdGlobalDataStreamWrite RwStream   stream
 

RpPrtStdGlobalDataStreamWrite is the function to stream out the shared data used by an emitter.

RpPrtStdGlobalDataStreamWrite streams out the RpPrtStdEmitterClass, the RpPrtStdParticleClass and the RpPrtStdPropertyTable. These data are stored by default with the emitters, but as these can be shared by more than one emitter, they can be stored separatly using RpPrtStdGlobalDataStreamWrite

When the emitters are streamed in, if there is no emitter class streamed with it, it will search for any emitter class with the same identification number. If it fails, then the emitter will have a NULL emitter class.

Parameters:
stream  A pointer to the output stream.
Returns:
a pointer to the output stream in success, NULL otherwise.
See also:
RpPrtStdGlobalDataStreamGetSize , RpPrtStdGlobalDataStreamWrite , RpPrtStdEClassStreamRead , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamGetSize , RpPrtStdPClassStreamRead , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamGetSize , RpPrtStdPropTabStreamRead , RpPrtStdPropTabStreamWrite , RpPrtStdPropTabStreamGetSize
RpPrtStdParticleBatch* RpPrtStdParticleBatchAddBatch RpPrtStdParticleBatch   prtBatchHead,
RpPrtStdParticleBatch   prtBatch
 

RpPrtStdParticleBatchAddBatch is the function to add a particle batch to circular linked particle batch list.

If the list is empty, then the particle batch forms a new list. If the list is not empty, then the particle batch is added to the end of the list. The particle class of the list and the batch must match.

Parameters:
prtBatchHead  Pointer to the particle batch list.
prtBatch  Pointer to the particle batch.
Returns:
a pointer to a particle batch on success, NULL otherwise
See also:
RpPrtStdParticleBatchCreate , RpPrtStdParticleBatchDestroy
RpPrtStdParticleBatch* RpPrtStdParticleBatchCreate RpPrtStdParticleClass   pClass,
RwInt32    maxPrt
 

RpPrtStdParticleBatchCreate is the function to create a new particle batch.

Parameters:
pClass  A pointer to the particle class.
maxPrt  Max number of particles in the batch.
Returns:
a pointer to a particle batch on success, NULL otherwise
See also:
RpPrtStdParticleBatchAddBatch , RpPrtStdParticleBatchDestroy
RwBool RpPrtStdParticleBatchDestroy RpPrtStdParticleBatch   prtBatch
 

RpPrtStdParticleBatchDestroy is the function to destroy a particle batch.

Parameters:
prtBatch  Pointer to the particle batch.
Returns:
TRUE on success, FALSE otherwise
See also:
RpPrtStdParticleBatchAddBatch , RpPrtStdParticleBatchCreate
RpPrtStdParticleBatch* RpPrtStdParticleDefaultCB RpPrtStdEmitter   prtEmt,
RpPrtStdParticleBatch   prtBatch,
void *    data
 

RpPrtStdParticleDefaultCB is the default empty callback for the particle class.

Parameters:
prtEmt  Pointer to the emitter.
prtBatch  Pointer to the particle batch.
data  Pointer to private data.
Returns:
a pointer to a particle on success, NULL otherwise.
See also:
RpPrtStdPClassCreate , RpPrtStdPClassGetCallBack , RpPrtStdPClassSetCallBack , RpPrtStdPClassGetPropTab , RpPrtStdPClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdParticleBatch* RpPrtStdParticleStdUpdateCB RpPrtStdEmitter   emt,
RpPrtStdParticleBatch   prtBatch,
void *    data
 

RpPrtStdParticleStdUpdateCB is the update callback for the standard particle property.

This callback updates all the standard particle properties in a particle.

This callback should be added to a particle class if the particle contains any of the standard particle properties.

Parameters:
emt  Pointer to the parent emitter.
prtBatch  Pointer to the particle batch to be updated.
data  Pointer to private data for the update callback. This callback expects the data to be a pointer to a RwReal representing the delta time elapsed.
Returns:
pointer to the particle batch if sucessful, NULL otherwise.
See also:
RpPrtStdAtomicUpdate , RpPrtStdEClassSetCallBack , RpPrtStdEClassStdCreate , RpPrtStdEmitterStdBeginUpdateCB , RpPrtStdEmitterStdCloneCB , RpPrtStdEmitterStdCreateCB , RpPrtStdEmitterStdDestroyCB , RpPrtStdEmitterStdEmitCB , RpPrtStdEmitterStdEndUpdateCB , RpPrtStdEmitterStdRenderCB , RpPrtStdPClassSetCallBack , RpPrtStdPClassStdCreate
RpPrtStdParticleClass* RpPrtStdPClassCreate void   
 

RpPrtStdPClassCreate is the function to create a new empty particle class.

Returns:
a pointer to a particle class on success, NULL otherwise.
See also:
RpPrtStdPClassDestroy , RpPrtStdPClassGetCallBack , RpPrtStdPClassSetCallBack , RpPrtStdPClassGetPropTab , RpPrtStdPClassSetPropTab , RpPrtStdPropTabCreate
RwBool RpPrtStdPClassDestroy RpPrtStdParticleClass   pClass
 

RpPrtStdPClassDestroy is the function to destroys a particle class.

Parameters:
pClass  A pointer to the particle class.
Returns:
TRUE on success, FALSE otherwise.
See also:
RpPrtStdPClassDestroy , RpPrtStdPClassGetCallBack , RpPrtStdPClassSetCallBack , RpPrtStdPClassGetPropTab , RpPrtStdPClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdParticleClass* RpPrtStdPClassGet RwInt32    id
 

RpPrtStdPClassGet is the function to return the particle class by its id number.

Each particle class is given an identification number that must be unique. This number is primary used to identify the particle class used by an emitter.

Parameters:
id  A particle class id number to search for.
Returns:
a pointer to a particle class on successful, NULL otherwise.
See also:
RpPrtStdPClassGetByPropTab
RpPrtStdParticleClass* RpPrtStdPClassGetByPropTab RpPrtStdPropertyTable   propTab
 

RpPrtStdPClassGetByPropTab is the function to return the particle class by a property table.

Each particle class has a reference to a property table. This property table is used to defined the data present in the particle.

Parameters:
propTab  A pointer to a property table..
Returns:
a pointer to a particle class on successful, NULL otherwise.
See also:
RpPrtStdPClassGet
RpPrtStdParticleClass* RpPrtStdPClassGetCallBack RpPrtStdParticleClass   pClass,
RwInt32   numCallback,
RpPrtStdParticleCallBackArray **    prtCB
 

RpPrtStdPClassGetCallBack is the function to return the set of callbacks attached to the particle class.

These callbacks will be called for any particles created with this particle class. This will replace the previous set of callbacks attached.

Parameters:
pClass  A pointer to the particle class.
numCallback  A pointer to a RwInt32 for returning the number of callbacks.
prtCB  A pointer to a RpPrtStdParticleCallBackArray for returning the callback arrays.
Returns:
a pointer to a particle class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassDestroy , RpPrtStdPClassSetCallBack , RpPrtStdPClassGetPropTab , RpPrtStdPClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdParticleClass* RpPrtStdPClassGetPropTab RpPrtStdParticleClass   pClass,
RpPrtStdPropertyTable **    propTab
 

RpPrtStdPClassGetPropTab is the function to return the property table of a particle class.

The property table describes what information are stored in the particle and their location. The particle class keeps a reference to the input property table.

Parameters:
pClass  A pointer to the particle class.
propTab  A pointer to a pointer of a property table for returning a reference to the particle class property table.
Returns:
a pointer to a particle class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassDestroy , RpPrtStdPClassGetCallBack , RpPrtStdPClassSetCallBack , RpPrtStdPClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdParticleClass* RpPrtStdPClassSetCallBack RpPrtStdParticleClass   pClass,
RwInt32    numCallback,
RpPrtStdParticleCallBackArray   prtCB
 

RpPrtStdPClassSetCallBack is the function to assign a set of callbacks to the particle class.

These callbacks will be called for any particles created with this particle class. This will replace the previous set of callbacks attached.

A copy of the callback array will be made and attached to the particle class. So the input callback array can be destroyed after use.

Parameters:
pClass  A pointer to the particle class.
numCallback  A RwInt32 for returning the number callback arrays.
prtCB  A pointer to a callback array to be attached.
Returns:
a pointer to a particle class on success, NULL otherwise.
See also:
RpPrtStdPClassCreate , RpPrtStdPClassDestroy , RpPrtStdPClassGetCallBack , RpPrtStdPClassGetPropTab , RpPrtStdPClassSetPropTab , RpPrtStdPropTabCreate
RpPrtStdParticleClass* RpPrtStdPClassSetPropTab RpPrtStdParticleClass   pClass,
RpPrtStdPropertyTable   propTab
 

RpPrtStdPClassSetPropTab is the function to assign a set of properties to the particle class.

The property table describes what information are stored in the particle and their location. The particle class keeps a reference to the input property table.

Parameters:
pClass  A pointer to the particle class.
propTab  A pointer to the property table to be attached.
Returns:
a pointer to a particle class on success, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassDestroy , RpPrtStdPClassGetCallBack , RpPrtStdPClassSetCallBack , RpPrtStdPClassGetPropTab , RpPrtStdPropTabCreate
RpPrtStdParticleClass* RpPrtStdPClassStdCreate RwInt32    dataFlag
 

RpPrtStdPClassStdCreate is a utility function to create a particle class containing a set of standard properties and callbacks.

The dataFlag is used to set the properties in the particle class. Not all properties are necessary and some are optional.

This function creates a particle class containing standard properties only. Particles with custom properties should use RpPrtStdPClassCreate.

A property table is created internally for this class. This property table will be destroyed with the particle class when it is destroyed. The user does not need to destroy the property table explicitly.

The possible settings for the data flags are, where each setting represent a property to be present.

        rpPRTSTDPARTICLEDATAFLAGSTANDARD
        rpPRTSTDPARTICLEDATAFLAGCOLOR
        rpPRTSTDPARTICLEDATAFLAGTEXCOORDS
        rpPRTSTDPARTICLEDATAFLAGSIZE
        rpPRTSTDPARTICLEDATAFLAGVELOCITY
        rpPRTSTDPARTICLEDATAFLAGMATRIX
   
Parameters:
dataFlag  A bitfield representing the standard properties to be added to the emitter class.
Returns:
pointer to the particle class if sucessful, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassCreate
RwInt32 RpPrtStdPClassStdCreateID RwInt32    dataFlag
 

RpPrtStdPClassStdCreateID is a utility function to create an particle class ID.

The dataFlag is used to create a unique ID.

Note that the ID range [0x00000000] to [0x00FFFFFF] is used internally, using an idea in this range may result in crash and unpredictable behaviors.

        rpPRTSTDPARTICLEDATAFLAGSTANDARD
        rpPRTSTDPARTICLEDATAFLAGCOLOR
        rpPRTSTDPARTICLEDATAFLAGTEXCOORDS
        rpPRTSTDPARTICLEDATAFLAGSIZE
        rpPRTSTDPARTICLEDATAFLAGVELOCITY
        rpPRTSTDPARTICLEDATAFLAGMATRIX
   
Parameters:
dataFlag  A bitfield representing the standard properties to be added to the particle class.
Returns:
The generated unique ID.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassCreate
RpPrtStdParticleClass* RpPrtStdPClassStdSetupCB RpPrtStdParticleClass   pClass
 

RpPrtStdPClassStdSetupCB is the callback function to restore the particle class callback functions for standard particle properties.

This function is called after a particle class is streamed in.

This callback should be used if the particle class contains the standard particle properties.

Parameters:
pClass  A pointer to a particle class for the restoring of the callback.
Returns:
pointer to the particle class if sucessful, NULL otherwise.
See also:
RpPrtStdGetPClassSetupCallBack , RpPrtStdSetPClassSetupCallBack
RwInt32 RpPrtStdPClassStreamGetSize RpPrtStdParticleClass   pClass
 

RpPrtStdPClassStreamGetSize is used to determine the size in bytes of the binary representation of a particle class. This value is used in the binary chunk header to indicate the size of the chunk. The size includes the size of the chunk header.

Parameters:
pClass  A pointer to the particle class.
Returns:
Returns a RwUInt32 value equal to the chunk size (in bytes) of the particle class.
See also:
RpPrtStdEClassStreamRead , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamGetSize , RpPrtStdPClassCreate , RpPrtStdPClassDestroy , RpPrtStdPClassGet , RpPrtStdPClassGetCallBack , RpPrtStdPClassGetCallBack , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamGetSize
RpPrtStdParticleClass* RpPrtStdPClassStreamRead RwStream   stream
 

RpPrtStdPClassStreamRead is the function to stream in a particle class.

The particles classes must be streamed out before any emitters. By default the emitter class is streamed out with each emitter. Using the function RpPrtStdGlobalDataSetStreamEmbedded this behavior can be changed, allowing to stream all the class and other needed data to one stream and the emitter in another one.

When the emitters are streamed in, if there is no emitter class streamed with it, it will search for any emitter class with the same identification number. If it fails, then the emitter will have a NULL emitter class.

The sequence to locate and read a particle class from a binary stream is as follows:

   RwStream *stream;
   RpPrtStdParticleClass *newParticleClass;

   stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx");
   if( stream )
   {
       if( RwStreamFindChunk(stream, rwID_PRTSTDGLOBALDATA, NULL, NULL) )
       {
           newParticleClass = RpPrtStdPClassStreamRead(stream);
       }

       RwStreamClose(stream, NULL);
   }
Parameters:
stream  A pointer to the input stream.
Returns:
a pointer to a particle class on success, NULL otherwise.
See also:
RpPrtStdEClassStreamRead , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamGetSize , RpPrtStdPClassCreate , RpPrtStdPClassDestroy , RpPrtStdPClassGet , RpPrtStdPClassGetCallBack , RpPrtStdPClassGetCallBack , RpPrtStdPClassStreamWrite , RpPrtStdPClassStreamGetSize , RpPrtStdGlobalDataSetStreamEmbedded , RpPrtStdGlobalDataGetStreamEmbedded , RwStreamOpen , RwStreamClose , RwStreamFindChunk , RpPrtStdPluginAttach
RpPrtStdParticleClass* RpPrtStdPClassStreamWrite RpPrtStdParticleClass   pClass,
RwStream   stream
 

RpPrtStdPClassStreamWrite is the function to stream out a particle class.

The particles classes must be streamed out before any emitters. By default the emitter class is streamed out with each emitter. Using the function RpPrtStdGlobalDataSetStreamEmbedded this behavior can be changed, allowing to stream all the class and other needed data to one stream and the emitter in another one.

When the emitters are streamed in, if there is no emitter class streamed with it, it will search for any emitter class with the same identification number. If it fails, then the emitter will have a NULL emitter class.

Parameters:
pClass  A pointer to the particle class.
stream  A pointer to the output stream.
Returns:
a pointer to a particle class on success, NULL otherwise.
See also:
RpPrtStdEClassStreamRead , RpPrtStdEClassStreamWrite , RpPrtStdEClassStreamGetSize , RpPrtStdPClassCreate , RpPrtStdPClassDestroy , RpPrtStdPClassGet , RpPrtStdPClassGetCallBack , RpPrtStdPClassGetCallBack , RpPrtStdPClassStreamRead , RpPrtStdPClassStreamGetSize , RpPrtStdGlobalDataSetStreamEmbedded , RpPrtStdGlobalDataGetStreamEmbedded
RwBool RpPrtStdPluginAttach void   
 

RpPrtStdPluginAttach is called by the application to indicate that the particle plugin should be used. The call to this function should be placed between RwEngineInit and RwEngineOpen and the world plugin must already be attached.

The library rpprtstd and the header file rpprtstd.h are required.

Returns:
TRUE on success, FALSE otherwise
RpPrtStdPropertyTable* RpPrtStdPropTabCreate RwInt32    numProp,
RwInt32   propID,
RwInt32   propStride
 

RpPrtStdPropTabCreate is the function to create a property table.

A property table is used to describes the contents in an emitter or particle and their position. This allows emitters and particles to be customizable to specific requirement.

Each property must have a unique ID and cannot appear more than once in a property table. Otherwise only the first appearance will be used.

Parameters:
numProp  An RwInt32 for the number of properties.
propID  A pointer to an array of property's ID.
propStride  A pointer to an array of property's size.
Returns:
a pointer to a property table on success, NULL otherwise.
See also:
RpPrtStdPropTabDestroy , RpPrtStdEClassCreate , RpPrtStdEClassGetPropTab , RpPrtStdEClassSetPropTab , RpPrtStdPClassCreate , RpPrtStdPClassGetPropTab , RpPrtStdPClassSetPropTab
RwBool RpPrtStdPropTabDestroy RpPrtStdPropertyTable   propTab
 

RpPrtStdPropTabDestroy is the function to destroy a property table.

A property table is used to describes the contents in an emitter or particle and their position. This allows emitters and particles to be customizable to specific requirement.

Property tables are shared and referenced by emitter and particle classes. Care must taken to ensure no classes references the property table before it is destroyed.

Parameters:
propTab  A pointer to a property table.
Returns:
TRUE on success, FALSE otherwise.
See also:
RpPrtStdPropTabCreate , RpPrtStdEClassCreate , RpPrtStdEClassGetPropTab , RpPrtStdEClassSetPropTab , RpPrtStdPClassCreate , RpPrtStdPClassGetPropTab , RpPrtStdPClassSetPropTab
RpPrtStdPropertyTable* RpPrtStdPropTabGet RwInt32    id
 

RpPrtStdPropTabGet is the function to return the property table by its id number.

Each property table is given an identification number that must be unique. This number is used to identify the property table used by an emitter or particle class.

Parameters:
id  A property table id number to search for.
Returns:
a pointer to a property table on successful, NULL otherwise.
See also:
RpPrtStdPropTabGetByProperties
RpPrtStdPropertyTable* RpPrtStdPropTabGetByProperties RwInt32    numProp,
RwInt32   propID,
RwInt32   propStride
 

RpPrtStdPropTabGetByProperties is the function to return the property table by its property contents.

This function can be used to query the current list of property tables for one that contains the same set of property ID and property size. A matching property table is returned if found. The order of the properties listed is not important.

Parameters:
numProp  An RwInt32 for the number of properties.
propID  A pointer to an array of property's ID.
propStride  A pointer to an array of property's size.
Returns:
a pointer to a property table on successful, NULL otherwise.
See also:
RpPrtStdPropTabGet
RpPrtStdPropertyTable* RpPrtStdPropTabGetProperties RpPrtStdPropertyTable   propTab,
RwInt32   numProp,
RwInt32 **    propID,
RwInt32 **    propOffset,
RwInt32 **    propSize
 

RpPrtStdPropTabGetProperties is the function to return the properties's details in a property table.

A property table is used to describes the contents in an emitter or particle and their position. This allows emitters and particles to be customizable to specific requirement.

Parameters:
propTab  A pointer to the property table.
numProp  A pointer for returning the number of properties.
propID  A pointer for returning the array of properties's ID.
propOffset  A pointer for returning the array of properties's offset.
propSize  A pointer for returning the array of properties's size.
Returns:
TRUE on success, FALSE otherwise.
See also:
RpPrtStdPropTabCreate , RpPrtStdPropTabDestroy , RpPrtStdEClassCreate , RpPrtStdEClassGetPropTab , RpPrtStdEClassSetPropTab , RpPrtStdPClassCreate , RpPrtStdPClassGetPropTab , RpPrtStdPClassSetPropTab
RwInt32 RpPrtStdPropTabGetPropIndex RpPrtStdPropertyTable   propTab,
RwInt32    propID
 

RpPrtStdPropTabGetPropIndex is the function to get the index of a property in a property table.

A property table is used to describes the contents in an emitter or particle and their position. This allows emitters and particles to be customizable to specific requirement.

If the property exist in the property table, a valid index is return, otherwise -1.

Parameters:
propTab  A pointer to the property table.
propID  The property's ID.
Returns:
a valid index on success, -1 otherwise.
See also:
RpPrtStdPropTabCreate , RpPrtStdPropTabDestroy , RpPrtStdPropTabGetPropOffset
RwInt32 RpPrtStdPropTabGetPropOffset RpPrtStdPropertyTable   propTab,
RwInt32    propID
 

RpPrtStdPropTabGetPropOffset is the function to return the offset of a property in an emitter or particle.

A property table is used to describes the contents in an emitter or particle and their position. This allows emitters and particles to be customizable to specific requirement.

If the property exist in the property table, a valid offset is is return, otherwise -1.

This offset is used to reference property's data in emitter or particle.

Parameters:
propTab  A pointer to the property table.
propID  The property's ID.
Returns:
a valid offset on success, -1 otherwise.
See also:
RpPrtStdPropTabCreate , RpPrtStdPropTabDestroy , RpPrtStdPropTabGetPropIndex
RwInt32 RpPrtStdPropTabStreamGetSize RpPrtStdPropertyTable   propTab
 

RpPrtStdPropTabStreamGetSize is used to determine the size in bytes of the binary representation of a property table. This value is used in the binary chunk header to indicate the size of the chunk. The size includes the size of the chunk header.

Parameters:
propTab  A pointer to the property table.
Returns:
Returns a RwInt32 value equal to the chunk size (in bytes) of the property table.
See also:
RpPrtStdPropTabCreate , RpPrtStdPropTabDestroy , RpPrtStdPropTabGet , RpPrtStdPropTabStreamRead , RpPrtStdPropTabStreamWrite
RpPrtStdPropertyTable* RpPrtStdPropTabStreamRead RwStream   stream
 

RpPrtStdPropTabStreamRead is the function to stream in a property table.

The property tables must be streamed out before any emitters. By default the property table is streamed out with each emitter. Using the function RpPrtStdGlobalDataSetStreamEmbedded this behavior can be changed, allowing to stream all the class and other needed data to one stream and the emitter in another one.

When the emitters are streamed in, if there is no emitter class streamed with it, it will search for any emitter class with the same identification number. If it fails, then the emitter will have a NULL emitter class.

The sequence to locate and read a property table from a binary stream is as follows:

   RwStream *stream;
   RpPrtStdPropertyTable *newPropertyTable;

   stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx");
   if( stream )
   {
       if( RwStreamFindChunk(stream, rwID_PRTSTDGLOBALDATA, NULL, NULL) )
       {
           newPropertyTable = RpPrtStdPropTabStreamRead(stream);
       }

       RwStreamClose(stream, NULL);
   }
Parameters:
stream  A pointer to the output stream.
Returns:
a pointer to a property table on success, NULL otherwise.
See also:
RpPrtStdPropTabCreate , RpPrtStdPropTabDestroy , RpPrtStdPropTabGet , RpPrtStdPropTabStreamWrite , RpPrtStdPropTabStreamGetSize , RpPrtStdGlobalDataSetStreamEmbedded , RpPrtStdGlobalDataGetStreamEmbedded , RwStreamOpen , RwStreamClose , RwStreamFindChunk , RpPrtStdPluginAttach
RpPrtStdPropertyTable* RpPrtStdPropTabStreamWrite RpPrtStdPropertyTable   propTab,
RwStream   stream
 

RpPrtStdPropTabStreamWrite is the function to stream out a property table

The property tables must be streamed out before any emitters. By default the property table is streamed out with each emitter. Using the function RpPrtStdGlobalDataSetStreamEmbedded this behavior can be changed, allowing to stream all the class and other needed data to one stream and the emitter in another one.

When the emitters are streamed in, if there is no emitter class streamed with it, it will search for any emitter class with the same identification number. If it fails, then the emitter will have a NULL emitter class.

Parameters:
propTab  A pointer to the property table.
stream  A pointer to the output stream.
Returns:
a pointer to a property table on success, NULL otherwise.
See also:
RpPrtStdPropTabCreate , RpPrtStdPropTabDestroy , RpPrtStdPropTabGet , RpPrtStdPropTabStreamRead , RpPrtStdPropTabStreamGetSize , RpPrtStdGlobalDataSetStreamEmbedded , RpPrtStdGlobalDataGetStreamEmbedded
RwBool RpPrtStdSetEClassSetupCallBack RpPrtStdEClassSetupCallBack    emtCB
 

RpPrtStdSetEClassSetupCallBack is the function to set the RpPrtStdEClassSetupCallBack callback function.

The RpPrtStdEClassSetupCallBack is used to setup the callback function for an emitter class. It is called after a RpPrtStdEmitterClass is streamed in. This allows the user the opportunity to setup the RpPrtStdEmitterClass with any custom function for the emitter class.

Parameters:
emtCB  A RpPrtStdEClassSetupCallBack to be set.
Returns:
TRUE if successful, FALSE otherwise.
See also:
RpPrtStdGetEClassSetupCallBack , RpPrtStdGetPClassSetupCallBack , RpPrtStdSetPClassSetupCallBack
RwBool RpPrtStdSetPClassSetupCallBack RpPrtStdPClassSetupCallBack    prtCB
 

RpPrtStdSetPClassSetupCallBack is the function to set the RpPrtStdPClassSetupCallBack callback function.

The RpPrtStdPClassSetupCallBack is used to setup the callback function for an emitter class. It is called after a RpPrtStdParticleClass is streamed in. This allows the user the opportunity to setup the RpPrtStdParticleClass with any custom function for the particle class.

Parameters:
prtCB  A RpPrtStdPClassSetupCallBack to be set.
Returns:
TRUE if successful, FALSE otherwise.
See also:
RpPrtStdGetEClassSetupCallBack , RpPrtStdSetEClassSetupCallBack , RpPrtStdGetPClassSetupCallBack

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