The user is able to access the particles data through a lock/unlock mechanism. In addition to that system, RpPTank also provides a lock/unlock mechanism for the Platform specific data. This allows the application to directly manipulate data offering the best performance. The user is able, via RpPTank, to define specific particles meeting its exact needs and to animate them using a platform independent abstraction layer.
When creating a PTank object, a series of flags defining the particles and the maximum number of particles to display are passed to RpPTankAtomicCreate. These two values are not modifiable after the PTank object has been created.
RpPTank supports two internal organizations for its data, "structure of arrays" (Array Organization) or "array of structures" (Structure Organization), depending on the user needs and the targeted platform.
"Arrays organization" means that data is stored in different arrays, using one array per data piece : one array of positions, one array of colors etc.
"Structures organizations" means that data is stored in one array of structure, per particle. The size of the structures depends on the particle definition passed to RpPTankAtomicCreate.
The format used can be specified by passing a flag to RpPTankAtomicCreate
To modify the data set, the PTank object will give access to this data via RpPTankAtomicLock, with the required parameter. The PTank object will then return a pointer to the desired array along with the stride needed to access the next structure/data.
The number of actually visible/rendered particles varies between 0 and the maximum number specified when creating a PTank object. To change the number of active particles call RpPTankAtomicSetActiveParticlesCount.
|
Passed to RpPTankAtomicCreate, these flags specify the type and properties held by the particles. Some flags are mutually exclusive and should not be mixed. The debug version of the library will assert and signal these problems.
|
|
Passed to RpPTankAtomicLock, these flags specify the data accessed. those flags are mutually exclusive and should not be mixed.
|
|
Passed to RpPTankAtomicLock to specify the type of access needed. Accessing data using rpPTANKLOCKWRITE will force the PTank object to reinstance the rendered data. The instantiation of this data takes place at rendering time and is done once per frame. |
|
RpAtomicIsPTank is called to check if an atomic is a PTank object.
|
|
RpPTankAtomicCreate is used to create a PTank object. A PTank object is an extended atomic. To destroy a PTank object call RpPTankAtomicDestroy.
|
|
RpPTankAtomicDestroy is used to destroy a PTank object previously created by calling RpPTankAtomicCreate.
|
|
RpPTankAtomicGetActiveParticlesCount is called to get the number of active particles in the PTank object. These particles are rendered in most instances. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetBlendModes is called to get the blending functions used by a PTank object Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetConstantCenter is used to get the center of the particles. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetConstantColor is used to get the particles constant color. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetConstantMatrix is used to get the particles matrix. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetConstantRotate is used to get the angle of rotation of the particles. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetConstantSize is used to get the size of the particles. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetConstantVtx2TexCoords is used to get the two texture coordinates used per particle. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetConstantVtx4TexCoords is used to get the four texture coordinates used per particles. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetConstantVtxColor is used to get the particles vertex color. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetDataFormat is called to get the format descriptor of a PTank object.
|
|
RpPTankAtomicGetMaterial is called to get the Material used by a PTank object Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetMaximumParticlesCount is called to get the maximum number of particles held by the PTank object. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetTexture is called to get the texture used by a PTank object Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicGetVertexAlpha is called to get the state of the vertex alpha transparency for this object Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicLock is used to lock and access the data held by the PTank object. The function fills a RpPTankLockStruct with a pointer to the data accessed and the stride of that data, whether in a structure or an array organization. When using a structure organization, locking rpPTANKLFLAGPOSITION returns the base pointer of the array of structures.
|
|
RpPTankAtomicSetActiveParticlesCount is called to set the number of active particles in a PTank object. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetBlendModes is called to set the blending functions used by a PTank object Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetConstantCenter is used to set the center of the particles. if the center is (0.0f, 0.0f), then the particle center will match it's position. By default the center is (0.0f, 0.0f). To use this feature the rpPTANKDFLAGUSECENTER flag should be passed to RpPTankAtomicCreate. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetConstantColor is used to set the color of the particles. All the particles share this color when no color information is specified when calling RpPTankAtomicCreate. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetConstantMatrix is used to set the matrix of the particles. The matrix will be used to create 3D oriented particles lying in the (right,up) plane. The pos member of the RwMatrix is ignored. To use this feature the rpPTANKDFLAGCNSMATRIX flag should be passed to RpPTankAtomicCreate. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetConstantRotate is used to set the angle of rotation of the particles. If the rotation's angle is 0.0f, the particles will not be rotated. The rotation is made in the screen plane, around the Z axis, through the constant center. To use this feature the rpPTANKDFLAGCNS2DROTATE flag should be passed to RpPTankAtomicCreate. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetConstantSize is used to set the size of the particles. This size is the size for all particles when no size or matrix is specified when calling RpPTankAtomicCreate. The default value is (1.0f,1.0f). Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetConstantVtx2TexCoords is used to set the two texture coordinates used per particle. Only the top-left and bottom-right texture coordinates are submitted, the two others are calculated using the following rules : (U1,V1)--(U2,V1) (U1,V2)--(U2,V2) To use this feature the rpPTANKDFLAGCNSVTX2TEXCOORDS flag should be passed to RpPTankAtomicCreate. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetConstantVtx4TexCoords is used to set the four texture coordinates used per particles. To use this feature the rpPTANKDFLAGCNSVTX4TEXCOORDS flag should be passed to RpPTankAtomicCreate. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetConstantVtxColor is used to set the vertex colors of the particles. To use this feature the rpPTANKDFLAGCNSVTXCOLOR flag should be passed to RpPTankAtomicCreate. Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetMaterial is called to set the material used by a PTank object
|
|
RpPTankAtomicSetTexture is called to set the texture used by a PTank object Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
RpPTankAtomicSetVertexAlpha is called to set the state of the vertex alpha transparency for this object Note that this function is used for debug purposes only and, for efficiency, is available as a macro for final release versions of an application.
|
|
is used to unlock some previously locked data
|
|
RpPTankPluginAttach is used to attach the PTank plugin to the RenderWare system. The PTank plugin must be attached between initializing the system with RwEngineInit and opening it with RwEngineOpen.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |