Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpPTank
[Particles]


Modules

PlayStation 2

Data Structures

struct   RpPTankFormatDescriptor
struct   RpPTankLockStruct

Enumerations

enum   RpPTankDataFlags {
  rpPTANKDFLAGNONE = ((int)0x00000000), rpPTANKDFLAGPOSITION = ((int)0x00000001), rpPTANKDFLAGCOLOR = ((int)0x00000002), rpPTANKDFLAGSIZE = ((int)0x00000004),
  rpPTANKDFLAGMATRIX = ((int)0x00000008), rpPTANKDFLAGNORMAL = ((int)0x00000010), rpPTANKDFLAG2DROTATE = ((int)0x00000020), rpPTANKDFLAGVTXCOLOR = ((int)0x00000040),
  rpPTANKDFLAGVTX2TEXCOORDS = ((int)0x00000080), rpPTANKDFLAGVTX4TEXCOORDS = ((int)0x00000100), rpPTANKDFLAGCNSMATRIX = ((int)0x00008000), rpPTANKDFLAGCNSNORMAL = ((int)0x00010000),
  rpPTANKDFLAGCNS2DROTATE = ((int)0x00020000), rpPTANKDFLAGCNSVTXCOLOR = ((int)0x00040000), rpPTANKDFLAGCNSVTX2TEXCOORDS = ((int)0x00080000), rpPTANKDFLAGCNSVTX4TEXCOORDS = ((int)0x00100000),
  rpPTANKDFLAGUSECENTER = ((int)0x01000000), rpPTANKDFLAGARRAY = ((int)0x10000000), rpPTANKDFLAGSTRUCTURE = ((int)0x20000000), RPPTANKDATAFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RpPTankDataLockFlags {
  rpPTANKLFLAGNONE = ((int)0x00000000), rpPTANKLFLAGPOSITION = ((int)0x00000001), rpPTANKLFLAGCOLOR = ((int)0x00000002), rpPTANKLFLAGSIZE = ((int)0x00000004),
  rpPTANKLFLAGMATRIX = ((int)0x00000008), rpPTANKLFLAGNORMAL = ((int)0x00000010), rpPTANKLFLAG2DROTATE = ((int)0x00000020), rpPTANKLFLAGVTXCOLOR = ((int)0x00000040),
  rpPTANKLFLAGVTX2TEXCOORDS = ((int)0x00000080), rpPTANKLFLAGVTX4TEXCOORDS = ((int)0x00000100), RPPTANKLOCKFLAGSFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RpPTankLockFlags { rpPTANKLOCKWRITE = ((int)0x40000000), rpPTANKLOCKREAD = ((int)0x80000000) }

Functions

RwBool  RpPTankPluginAttach (void)
RpAtomic RpPTankAtomicCreate (RwInt32 maxParticleNum, RwUInt32 dataFlags, RwUInt32 platFlags)
void  RpPTankAtomicDestroy (RpAtomic *ptank)
RwBool  RpAtomicIsPTank (RpAtomic *atomic)
const RpPTankFormatDescriptor RpPTankAtomicGetDataFormat (RpAtomic *atomic)
RwInt32  RpPTankAtomicGetActiveParticlesCount (RpAtomic *atomic)
RwInt32  RpPTankAtomicGetMaximumParticlesCount (RpAtomic *atomic)
void  RpPTankAtomicSetActiveParticlesCount (RpAtomic *atomic, RwInt32 count)
void  RpPTankAtomicSetTexture (RpAtomic *atomic, RwTexture *texture)
RwTexture RpPTankAtomicGetTexture (RpAtomic *atomic)
RpMaterial RpPTankAtomicGetMaterial (RpAtomic *atomic)
void  RpPTankAtomicSetBlendModes (RpAtomic *atomic, RwBlendFunction srcBlendMode, RwBlendFunction dstBlendMode)
void  RpPTankAtomicGetBlendModes (RpAtomic *atomic, RwBlendFunction *srcBlendMode, RwBlendFunction *dstBlendMode)
void  RpPTankAtomicSetVertexAlpha (RpAtomic *atomic, RwBool vtxAlphaState)
RwBool  RpPTankAtomicGetVertexAlpha (RpAtomic *atomic)
void  RpPTankAtomicSetConstantCenter (RpAtomic *atomic, RwV2d *center)
const RwV2d RpPTankAtomicGetConstantCenter (RpAtomic *atomic)
void  RpPTankAtomicSetConstantSize (RpAtomic *atomic, RwV2d *size)
const RwV2d RpPTankAtomicGetConstantSize (RpAtomic *atomic)
void  RpPTankAtomicSetConstantRotate (RpAtomic *atomic, RwReal rotate)
RwReal  RpPTankAtomicGetConstantRotate (RpAtomic *atomic)
void  RpPTankAtomicSetConstantMatrix (RpAtomic *atomic, RwMatrix *matrix)
const RwMatrix RpPTankAtomicGetConstantMatrix (RpAtomic *atomic)
void  RpPTankAtomicSetConstantColor (RpAtomic *atomic, RwRGBA *color)
const RwRGBA RpPTankAtomicGetConstantColor (RpAtomic *atomic)
void  RpPTankAtomicSetConstantVtxColor (RpAtomic *atomic, RwRGBA *color)
const RwRGBA RpPTankAtomicGetConstantVtxColor (RpAtomic *atomic)
void  RpPTankAtomicSetConstantVtx2TexCoords (RpAtomic *atomic, RwTexCoords *UVs)
const RwTexCoords RpPTankAtomicGetConstantVtx2TexCoords (RpAtomic *atomic)
void  RpPTankAtomicSetConstantVtx4TexCoords (RpAtomic *atomic, RwTexCoords *UVs)
const RwTexCoords RpPTankAtomicGetConstantVtx4TexCoords (RpAtomic *atomic)
RwBool  RpPTankAtomicLock (RpAtomic *atomic, RpPTankLockStruct *dst, RwUInt32 dataFlags, RpPTankLockFlags lockFlag)
RpAtomic RpPTankAtomicUnlock (RpAtomic *atomic)
RpAtomic RpPTankAtomicSetMaterial (RpAtomic *atomic, RpMaterial *material)

Detailed Description

PTank Plugin for RenderWare.

RpPTank Plugin Overview

Requirements

Overview

PTank is a driver level particle manager and particle container. It helps the user define, animate and render particles through a platform independent API and provides platform specific access to the data. A particle is a 2D sprite, based on a set of information for example; position, size, 2D rotation and color.

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.

Data Organization

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

"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.

Positions Array
xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz xyz
Colors Array
rgba rgba rgba rgba rgba rgba rgba rgba rgba rgba rgba rgba rgba rgba
The number of arrays depends on the particle definition passed to RpPTankAtomicCreate.

Structure Organization

"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.

Example
xyz rgba xyz rgba xyz rgba xyz rgba xyz rgba xyz rgba xyz rgba

Specifying the Data Organization

The format used can be specified by passing a flag to RpPTankAtomicCreate

Accessing the Data

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.


Enumeration Type Documentation

enum RpPTankDataFlags
 

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.

Enumeration values:
rpPTANKDFLAGPOSITION  Uses a position per particle
rpPTANKDFLAGCOLOR  Uses a color per particle
rpPTANKDFLAGSIZE  Uses a size per particle. This flag is ignored if the particle is a matrix.
rpPTANKDFLAGMATRIX  Uses a matrix per particle
rpPTANKDFLAGNORMAL  Uses a normal per particle
rpPTANKDFLAG2DROTATE  Uses a 2D rotation per particle
rpPTANKDFLAGVTXCOLOR  Uses a color per Billboard vertex
rpPTANKDFLAGVTX2TEXCOORDS  Uses Top-Left and Bottom-Right Texture coordinates
rpPTANKDFLAGVTX4TEXCOORDS  Uses a texture UV per vertex
rpPTANKDFLAGCNSMATRIX  Uses a constant matrix
rpPTANKDFLAGCNSNORMAL  Uses a constant normal
rpPTANKDFLAGCNS2DROTATE  Uses a constant 2D rotation
rpPTANKDFLAGCNSVTXCOLOR  Uses a constant color per Billboard vertex
rpPTANKDFLAGCNSVTX2TEXCOORDS  Uses constant Top-Left and Bottom-Right Texture coordinates
rpPTANKDFLAGCNSVTX4TEXCOORDS  Uses a constant texture UV per vertex
rpPTANKDFLAGUSECENTER  The position of the particles are shifted
rpPTANKDFLAGARRAY  Data is organized in an array
rpPTANKDFLAGSTRUCTURE  Data is organized in a structure
enum RpPTankDataLockFlags
 

Passed to RpPTankAtomicLock, these flags specify the data accessed. those flags are mutually exclusive and should not be mixed.

Enumeration values:
rpPTANKLFLAGPOSITION  Access the positions buffer
rpPTANKLFLAGCOLOR  Access the colors buffer
rpPTANKLFLAGSIZE  Access the sizes buffer
rpPTANKLFLAGMATRIX  Access the matrixes buffer
rpPTANKLFLAGNORMAL  Access the normals buffer
rpPTANKLFLAG2DROTATE  Access the 2D rotations buffer
rpPTANKLFLAGVTXCOLOR  Access the colors buffer (when using a color per vertex)
rpPTANKLFLAGVTX2TEXCOORDS  Access the Top-Left and Bottom-Right Texture coordinates buffer
rpPTANKLFLAGVTX4TEXCOORDS  Access the texture UVs Buffer (when using a color per vertex)
enum RpPTankLockFlags
 

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.

Enumeration values:
rpPTANKLOCKWRITE  Lock data for writing.
rpPTANKLOCKREAD  Lock data for reading.

Function Documentation

RwBool RpAtomicIsPTank RpAtomic   atomic
 

RpAtomicIsPTank is called to check if an atomic is a PTank object.

Parameters:
atomic  A pointer to the atomic to be tested.
Returns:
TRUE if the atomic is a PTank object, FALSE otherwise.
See also:
RpPTankAtomicCreate
RpAtomic* RpPTankAtomicCreate RwInt32    maxParticleNum,
RwUInt32    dataFlags,
RwUInt32    platFlags
 

RpPTankAtomicCreate is used to create a PTank object. A PTank object is an extended atomic. To destroy a PTank object call RpPTankAtomicDestroy.

Parameters:
maxParticleNum  Maximum number of objects, or particles held by the PTank object.
dataFlags  A set of flags describing the particles held by the PTank object. The RpPTankDataFlags are the values accepted by this function.
platFlags  A set of flags used to enable platform specific functions and properties. See the platform specific section of this API Reference for more information.
Returns:
A pointer to the created PTank object ( in fact a pointer to a RpAtomic ) on succes, NULL otherwise.
See also:
RpAtomicIsPTank , RpPTankAtomicDestroy
void RpPTankAtomicDestroy RpAtomic   ptank
 

RpPTankAtomicDestroy is used to destroy a PTank object previously created by calling RpPTankAtomicCreate.

Parameters:
ptank  a pointer to the ptank object to be destroyed
See also:
RpAtomicIsPTank , RpPTankAtomicCreate
RwInt32 RpPTankAtomicGetActiveParticlesCount RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
The number of active particles.
See also:
RpPTankAtomicSetActiveParticlesCount , RpPTankAtomicGetMaximumParticlesCount
void RpPTankAtomicGetBlendModes RpAtomic   atomic,
RwBlendFunction   srcBlendMode,
RwBlendFunction   dstBlendMode
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
srcBlendMode  A pointer to a RwBlendFunction used to set the source blend mode.
dstBlendMode  A pointer to a RwBlendFunction used to set the destination blend mode.
Returns:
None.
const RwV2d* RpPTankAtomicGetConstantCenter RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A pointer to the particles center.
See also:
RpPTankAtomicSetConstantCenter
const RwRGBA* RpPTankAtomicGetConstantColor RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A pointer to the constant color.
See also:
RpPTankAtomicSetConstantColor , RpPTankAtomicSetConstantVtxColor , RpPTankAtomicGetConstantVtxColor
const RwMatrix* RpPTankAtomicGetConstantMatrix RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A pointer to the matrix.
See also:
RpPTankAtomicSetConstantMatrix
RwReal RpPTankAtomicGetConstantRotate RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
The angle of rotation.
See also:
RpPTankAtomicSetConstantRotate
const RwV2d* RpPTankAtomicGetConstantSize RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A pointer to the particles size.
See also:
RpPTankAtomicSetConstantSize
const RwTexCoords* RpPTankAtomicGetConstantVtx2TexCoords RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A pointer to the array of texture coordinates.
See also:
RpPTankAtomicSetConstantVtx2TexCoords , RpPTankAtomicSetConstantVtx4TexCoords , RpPTankAtomicGetConstantVtx4TexCoords
const RwTexCoords* RpPTankAtomicGetConstantVtx4TexCoords RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A pointer to the array of texture coordinates.
See also:
RpPTankAtomicSetConstantVtx4TexCoords , RpPTankAtomicSetConstantVtx2TexCoords , RpPTankAtomicGetConstantVtx2TexCoords
const RwRGBA* RpPTankAtomicGetConstantVtxColor RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A pointer to the array of vertex colors.
See also:
RpPTankAtomicSetConstantVtxColor , RpPTankAtomicSetConstantColor , RpPTankAtomicGetConstantColor
const RpPTankFormatDescriptor* RpPTankAtomicGetDataFormat RpAtomic   atomic
 

RpPTankAtomicGetDataFormat is called to get the format descriptor of a PTank object.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A pointer to the RpPTankFormatDescriptor structure describing the PTank data organization.
See also:
RpPTankAtomicLock , RpPTankAtomicUnlock , RpPTankAtomicCreate
RpMaterial* RpPTankAtomicGetMaterial RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A Pointer to the current Material on success, NULL otherwise.
RwInt32 RpPTankAtomicGetMaximumParticlesCount RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
The maximum number of particles held by the PTank object.
See also:
RpPTankAtomicGetActiveParticlesCount , RpPTankAtomicSetActiveParticlesCount
RwTexture* RpPTankAtomicGetTexture RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A Pointer to the current texture, NULL if none is selected.
RwBool RpPTankAtomicGetVertexAlpha RpAtomic   atomic
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A RwBool used to set the the vertex alpha transparency.
RwBool RpPTankAtomicLock RpAtomic   atomic,
RpPTankLockStruct   dst,
RwUInt32    dataFlags,
RpPTankLockFlags    lockFlag
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
dst  A pointer to the RpPTankLockStruct to be filled.
dataFlags  Only one flag needed (see RpPTankDataLockFlags ).
lockFlag  Specifies the type of access (see RpPTankLockFlags ).
Returns:
TRUE on success, FALSE otherwise.
See also:
RpPTankAtomicUnlock , RpPTankAtomicGetDataFormat
void RpPTankAtomicSetActiveParticlesCount RpAtomic   atomic,
RwInt32    count
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
count  The new number of active particles to set.
Returns:
None.
See also:
RpPTankAtomicGetActiveParticlesCount , RpPTankAtomicGetMaximumParticlesCount
void RpPTankAtomicSetBlendModes RpAtomic   atomic,
RwBlendFunction    srcBlendMode,
RwBlendFunction    dstBlendMode
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
srcBlendMode  A RwBlendFunction used to set the source blend mode.
dstBlendMode  A RwBlendFunction used to set the destination blend mode.
Returns:
None.
void RpPTankAtomicSetConstantCenter RpAtomic   atomic,
RwV2d   center
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
center  A pointer to the new value.
Returns:
None.
See also:
RpPTankAtomicCreate , RpPTankAtomicGetConstantCenter
void RpPTankAtomicSetConstantColor RpAtomic   atomic,
RwRGBA   color
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
color  A pointer to the new color
Returns:
None.
See also:
RpPTankAtomicGetConstantColor , RpPTankAtomicSetConstantVtxColor , RpPTankAtomicGetConstantVtxColor , RpPTankAtomicCreate
void RpPTankAtomicSetConstantMatrix RpAtomic   atomic,
RwMatrix   matrix
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
matrix  A pointer to the new matrix.
Returns:
None.
See also:
RpPTankAtomicGetConstantMatrix , RpPTankAtomicCreate
void RpPTankAtomicSetConstantRotate RpAtomic   atomic,
RwReal    rotate
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
rotate  The new angle of rotation.
Returns:
None.
See also:
RpPTankAtomicGetConstantRotate , RpPTankAtomicSetConstantCenter , RpPTankAtomicGetConstantCenter , RpPTankAtomicCreate
void RpPTankAtomicSetConstantSize RpAtomic   atomic,
RwV2d   size
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
size  A pointer to a 2d vector holding the new size. size->x represents the width and size->y the height of the particles.
Returns:
None.
See also:
RpPTankAtomicGetConstantSize , RpPTankAtomicCreate
void RpPTankAtomicSetConstantVtx2TexCoords RpAtomic   atomic,
RwTexCoords   UVs
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
UVs  A pointer to an array of 2 RwTexCoords values.
Returns:
None.
See also:
RpPTankAtomicSetConstantVtx2TexCoords , RpPTankAtomicSetConstantVtx4TexCoords , RpPTankAtomicGetConstantVtx4TexCoords , RpPTankAtomicCreate
void RpPTankAtomicSetConstantVtx4TexCoords RpAtomic   atomic,
RwTexCoords   UVs
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
UVs  A pointer to an array of four RwTexCoords values.
Returns:
None.
See also:
RpPTankAtomicSetConstantVtx4TexCoords , RpPTankAtomicSetConstantVtx2TexCoords , RpPTankAtomicGetConstantVtx2TexCoords , RpPTankAtomicCreate
void RpPTankAtomicSetConstantVtxColor RpAtomic   atomic,
RwRGBA   color
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
color  A pointer to an array of 4 RwRGBA values, one per particle vertex
Returns:
None.
See also:
RpPTankAtomicGetConstantVtxColor , RpPTankAtomicSetConstantColor , RpPTankAtomicGetConstantColor , RpPTankAtomicCreate
RpAtomic* RpPTankAtomicSetMaterial RpAtomic   atomic,
RpMaterial   material
 

RpPTankAtomicSetMaterial is called to set the material used by a PTank object

Parameters:
atomic  A pointer to the PTank object to access.
material  A pointer to the RpMaterial to use.
Returns:
A Pointer to the PTank object on success, NULL otherwise.
void RpPTankAtomicSetTexture RpAtomic   atomic,
RwTexture   texture
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
texture  A pointer to the RwTexture to use.
Returns:
None.
void RpPTankAtomicSetVertexAlpha RpAtomic   atomic,
RwBool    vtxAlphaState
 

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.

Parameters:
atomic  A pointer to the PTank object to access.
vtxAlphaState  A RwBool used to set the the vertex alpha transparency.
Returns:
None.
RpAtomic* RpPTankAtomicUnlock RpAtomic   atomic
 

RpPTankAtomicUnlock

is used to unlock some previously locked data

Parameters:
atomic  A pointer to the PTank object to access.
Returns:
A Pointer to the PTank object on success, NULL otherwise.
See also:
RpPTankAtomicLock , RpPTankAtomicGetDataFormat
RwBool RpPTankPluginAttach void   
 

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.

Returns:
TRUE on success, FALSE otherwise.
See also:
RwEngineInit , RwEngineOpen , RwEngineStart

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