Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpPrtAdv Tools and Management
[RpPrtAdv]


Data Structures

struct  RpPrtAdvMultiPropParams
struct  RpPrtAdvParamBlock
struct  RpPrtAdvParamPointList

Functions

RwBool RpPrtAdvPluginAttach (void)
RpPrtStdEmitterClassRpPrtAdvEClassStdCreate (RwInt32 dataFlag, RpPrtAdvParamBlock *paramBlock)
RwInt32 RpPrtAdvEClassStdCreateID (RwInt32 dataFlag)
RpPrtStdParticleClassRpPrtAdvPClassStdCreate (RwInt32 dataFlag, RpPrtAdvParamBlock *paramBlock)
RwInt32 RpPrtAdvPClassStdCreateID (RwInt32 dataFlag)
RpPrtStdEmitterClassRpPrtAdvEClassStdSetupCB (RpPrtStdEmitterClass *eClass)
RpPrtStdParticleClassRpPrtAdvPClassStdSetupCB (RpPrtStdParticleClass *pClass)

Function Documentation

RpPrtStdEmitterClass* RpPrtAdvEClassStdCreate RwInt32    dataFlag,
RpPrtAdvParamBlock   paramBlock
 

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

This function support all the standard particles feature as well as the advanced ones, and it is advised, when using both plugins, to always use RpPrtAdvEClassStdCreate.

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

Emitters with user's custom properties should use RpPrtStdEClassCreate.

The possible settings for the data flags are described below, where each setting represents a property that can be present. Any one of these flags can be used to create an emitter class:

Standard properties :

        rpPRTSTDEMITTERDATAFLAGSTANDARD
        rpPRTSTDEMITTERDATAFLAGPRTCOLOR
        rpPRTSTDEMITTERDATAFLAGPRTTEXCOORDS
        rpPRTSTDEMITTERDATAFLAGPRTSIZE
        rpPRTSTDEMITTERDATAFLAGPTANK

Advanced properties :

        rpPRTADVEMITTERDATAFLAGPRTEMITTER
        rpPRTADVEMITTERDATAFLAGMULTICOLOR
        rpPRTADVEMITTERDATAFLAGMULTITEXCOORDS
        rpPRTADVEMITTERDATAFLAGMULTITEXCOORDSSTEP
        rpPRTADVEMITTERDATAFLAGMULTISIZE

An emitter type can be chosen as well :

        rpPRTADVEMITTERDATAFLAGPOINTLIST
        rpPRTADVEMITTERDATAFLAGCIRCLE
        rpPRTADVEMITTERDATAFLAGSPHERE
Note:
Only one emitter type can be selected per emitter class.
Warning:
When using the following flags :
  • rpPRTADVEMITTERDATAFLAGMULTICOLOR
  • rpPRTADVEMITTERDATAFLAGMULTITEXCOORDS
  • rpPRTADVEMITTERDATAFLAGMULTITEXCOORDSSTEP
  • rpPRTADVEMITTERDATAFLAGMULTISIZE
the corresponding standard flag needs to be set as well. For example to use multi-color particles, the flags rpPRTADVEMITTERDATAFLAGMULTICOLOR and rpPRTSTDEMITTERDATAFLAGPRTCOLOR also need to be set.

The paramBlock parameter (RpPrtAdvParamBlock) needs to be filled accordingly as well:

  • The pointList members (RpPrtAdvParamPointList) needs to be filled with the number of points required and the use of directions vectors when using rpPRTADVEMITTERDATAFLAGPOINTLIST.
  • The colorFrames member (RpPrtAdvMultiPropParams) needs to be filled with the number of frames required when using rpPRTADVEMITTERDATAFLAGMULTICOLOR.
  • The sizeFrames member (RpPrtAdvMultiPropParams) need to be filled with the number of frames required when using rpPRTADVEMITTERDATAFLAGMULTISIZE.
  • The texFrames member (RpPrtAdvMultiPropParams) need to be filled with the number of frames required when using rpPRTADVEMITTERDATAFLAGMULTITEXCOORDS and rpPRTADVEMITTERDATAFLAGMULTITEXCOORDSSTEP.
Please note that when using the multi-property emitter, the total number of frames will be the number of frame passed by the paramblock parameter plus 2, as the begin and end value from the standard properties are used as well. For example, to have four frames of color animation, the emitter will contain the begin and end values and two frames of color animation.
Parameters:
dataFlag  A bitfield representing the properties to be added to the emitter class.
paramBlock  A pointer to a RpPrtAdvParamBlock, needed only when using multi-properties or the point list emitter, as it contains the values used for the calculation of the memory size needed for those properties.
Returns:
Pointer to the RpPrtStdEmitterClass if successful, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassCreate

RwInt32 RpPrtAdvEClassStdCreateID RwInt32    dataFlag
 

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

The dataFlag is used to create a unique ID.

Note:
The ID range [0x00000000] to [0x00FFFFFF] is used internally. Using an ID in this range may result in crash or unpredictable behavior.
Parameters:
dataFlag  A bitfield representing the standard or advanced properties to be added to the emitter class.
Returns:
The generated unique ID.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassCreate

RpPrtStdEmitterClass* RpPrtAdvEClassStdSetupCB RpPrtStdEmitterClass   eClass
 

RpPrtAdvEClassStdSetupCB is the callback function to restore the emitter class callback functions for advanced emitter properties.

This function is called after an emitter class is streamed in or after it is created.

This callback should be used if the emitter class contains any of the standard or advanced emitter properties.

Parameters:
eClass  A pointer to an RpPrtStdEmitterClass for restoring the callbacks.
Returns:
Pointer to the RpPrtStdEmitterClass if successful, NULL otherwise.
See also:
RpPrtStdGetEClassSetupCallBack , RpPrtStdSetEClassSetupCallBack

RpPrtStdParticleClass* RpPrtAdvPClassStdCreate RwInt32    dataFlag,
RpPrtAdvParamBlock   paramBlock
 

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

This function supports all the standard particle features as well as the advanced ones, and it is advised, when using both plugins, to always use RpPrtAdvPClassStdCreate.

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

Particles with user's custom properties should use RpPrtStdPClassCreate.

The possible settings for the data flags are described below, where each setting represents a property that can be present. Any one of these flags can be used to create a particle class:

Standard properties :

        rpPRTSTDPARTICLEDATAFLAGSTANDARD
        rpPRTSTDPARTICLEDATAFLAGCOLOR
        rpPRTSTDPARTICLEDATAFLAGTEXCOORDS
        rpPRTSTDPARTICLEDATAFLAGSIZE
        rpPRTSTDPARTICLEDATAFLAGVELOCITY 

Advanced properties :

        rpPRTADVPARTICLEDATAFLAGPRTEMITTER
        rpPRTADVPARTICLEDATAFLAGMULTICOLOR
        rpPRTADVPARTICLEDATAFLAGMULTITEXCOORDS
        rpPRTADVPARTICLEDATAFLAGMULTITEXCOORDSSTEP
        rpPRTADVPARTICLEDATAFLAGMULTISIZE 

Warning:
When using the following flags :
  • rpPRTADVPARTICLEDATAFLAGMULTICOLOR
  • rpPRTADVPARTICLEDATAFLAGMULTITEXCOORDS
  • rpPRTADVPARTICLEDATAFLAGMULTITEXCOORDSSTEP
  • rpPRTADVPARTICLEDATAFLAGMULTISIZE
the corresponding standard flags needs to be set as well. For example to use multi-color particles, the flags rpPRTADVPARTICLEDATAFLAGMULTICOLOR and rpPRTSTDPARTICLEDATAFLAGCOLOR also need to be set.

The paramBlock parameter (RpPrtAdvParamBlock) needs to be filled accordingly as well:

  • The colorFrames member (RpPrtAdvMultiPropParams) needs to be filled with the number of frames required when using rpPRTADVPARTICLEDATAFLAGMULTICOLOR.
  • The sizeFrames member (RpPrtAdvMultiPropParams) needs to be filled with the number of frames required when using rpPRTADVPARTICLEDATAFLAGMULTISIZE.
  • The texFrames member (RpPrtAdvMultiPropParams) needs to be filled with the number of frames required when using rpPRTADVPARTICLEDATAFLAGMULTITEXCOORDS and rpPRTADVPARTICLEDATAFLAGMULTITEXCOORDSSTEP.
Please note that when using multi-property particles, the total number of frames will be the number of frames passed by the paramblock parameter plus 2, as the begin and end value from the standard properties are used as well. For example, to have four frames of color animation, the particles will contain the begin and end values and two frames of color animation.
Parameters:
dataFlag  A bitfield representing the properties to be added to the particle class.
paramBlock  A pointer to a RpPrtAdvParamBlock, needed only when using multi-properties particles, as it contains the values used for the calculation of the memory size needed for those properties.
Returns:
Pointer to the RpPrtStdParticleClass if successful, NULL otherwise.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassCreate

RwInt32 RpPrtAdvPClassStdCreateID RwInt32    dataFlag
 

RpPrtAdvPClassStdCreateID is a utility function to create a particle class ID.

The dataFlag is used to create a unique ID.

Note:
The ID range [0x00000000] to [0x00FFFFFF] is used internally. Using an ID in this range may result in crash or unpredictable behavior.
Parameters:
dataFlag  A bitfield representing the standard or advanced properties to be added to the particle class.
Returns:
The generated unique ID.
See also:
RpPrtStdEClassCreate , RpPrtStdPClassCreate

RpPrtStdParticleClass* RpPrtAdvPClassStdSetupCB RpPrtStdParticleClass   pClass
 

RpPrtAdvPClassStdSetupCB is the callback function to restore the particle class callback functions for advanced particle properties.

This function is called after a particle class is streamed in or after it is created.

This callback should be used if the particle class contains any of the standard or advanced particles properties.

Parameters:
pClass  A pointer to a RpPrtStdParticleClass for restoring the callbacks.
Returns:
Pointer to the RpPrtStdParticleClass if successful, NULL otherwise.
See also:
RpPrtStdGetPClassSetupCallBack , RpPrtStdSetPClassSetupCallBack

RwBool RpPrtAdvPluginAttach void   
 

RpPrtAdvPluginAttach is called by the application to indicate that the advanced 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 rpprtadv and the header file rpprtadv.h are required.

Returns:
TRUE on success, FALSE otherwise.


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