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
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
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
|
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.
|
|
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.
|
|
RpPrtStdEmitterCallBackArray represents a set of callback functions for processing a RpPrtStdEmitter. All the functions are of the type RpPrtStdEmitterCallBack.
|
|
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.
|
|
RpPrtStdParticleCallBackArray represents a set of callback functions for processing a RpPrtStdParticleBatch. All the functions are of the type RpPrtStdParticleCallBack.
|
|
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.
|
|
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.
|
|
RpPrtStdEmitterFlags, this type represents the different properties of an emitter.
|
|
A set of flag settings for use in the RpPrtStdEmitterPrtMatrix flag |
|
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. |
|
RpPrtStdParticleFlags, this type represents the different properties of a particle. |
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
RpPrtStdAtomicGetEmitter is a utility function to return the emitter attached to the atomic. The library rpprtstd and the header file rpprtstd.h are required.
|
|
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.
|
|
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.
|
|
RpPrtStdEClassCreate is the function to create a new empty emitter class.
|
|
RpPrtStdEClassDestroy is the function to destroys an emitter class.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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); }
|
|
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.
|
|
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.
|
|
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.
|
|
RpPrtStdEmitterClone is the function to clone an emitter.
|
|
RpPrtStdEmitterCreate is the function to create a new emitter.
|
|
RpPrtStdEmitterDefaultCB is the default empty callback for the emitter class.
|
|
RpPrtStdEmitterDestroy is the function to destroy an emitter.
|
|
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.
|
|
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.
|
|
RpPrtStdEmitterGetPClass is the function to return the particle class attached to an emitter. Particles from the emitter will be created using this particle class.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
RpPrtStdGlobalDataGetStreamEmbedded is the function to get the status of stream embedded flag.
|
|
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.
|
|
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.
|
|
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); }
|
|
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.
|
|
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.
|
|
RpPrtStdParticleBatchCreate is the function to create a new particle batch.
|
|
RpPrtStdParticleBatchDestroy is the function to destroy a particle batch.
|
|
RpPrtStdParticleDefaultCB is the default empty callback for the particle class.
|
|
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.
|
|
RpPrtStdPClassCreate is the function to create a new empty particle class.
|
|
RpPrtStdPClassDestroy is the function to destroys a particle class.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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); }
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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); }
|
|
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.
|
|
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.
|
|
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.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |