Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpTeam
[FXPack]


Modules

PlayStation 2

Data Structures

struct   RpTeamShadows

Defines

#define  rpTEAMELEMENTUNUSED   (~((RwUInt32)0))
#define  rpTEAMELEMENTMAXLOD   (5)
#define  rpTEAMMAXNUMSHADOWS   (4)
#define  rpTEAMMAXNUMBONES   (32)

Typedefs

typedef RpTeamPlayer  RpTeamPlayer
typedef RpTeamDictionary  RpTeamDictionary
typedef RpTeam  RpTeam
typedef RwCamera RpTeamLODCamera
typedef void *  RpTeamLODData
typedef void *  RpTeamRenderData
typedef RwUInt32(*  RpTeamLODCallBack )(const RpTeam *team, RwUInt32 playerIndex, RpTeamLODData data)
typedef RpAtomic *(*  RpTeamPlayerRenderCallBack )(const RpTeam *team, RwUInt32 playerIndex, RpAtomic *atomic, RpTeamRenderData data)
typedef void *  RpTeamCameraTestSphereData
typedef RwFrustumTestResult(*  RpTeamCameraTestSphere )(const RpTeam *team, RwUInt32 playerIndex, const RwCamera *camera, const RwSphere *sphere, RpTeamCameraTestSphereData data)

Enumerations

enum   RpTeamElementType {
  rpNATEAMELEMENTTYPE = 0, rpTEAMELEMENTSTATIC = 0x01, rpTEAMELEMENTSKINNED = 0x02, rpTEAMELEMENTPATCH = 0x04,
  rpTEAMELEMENTALL = 0xff, rpTEAMELEMENTFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RpTeamLockMode {
  rpNATEAMLOCKMODE = 0, rpTEAMLOCKDICTIONARY = 0x01, rpTEAMLOCKPLAYERS = 0x02, rpTEAMLOCKPLAYERLODS = 0x04,
  rpTEAMLOCKTEAMLOD = 0x08, rpTEAMLOCKTEXDICTIONARYS = 0x10, rpTEAMLOCKSHADOWS = 0x20, rpTEAMLOCKPLAYERSHADOWS = 0x40,
  rpTEAMLOCKLIGHTS = 0x80, rpTEAMLOCKALL = 0xff, rpTEAMLOCKFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}
enum   RpTeamElementLOD {
  rpTEAMELEMENTLODFIRST = 0, rpTEAMELEMENTLODMAX = rpTEAMELEMENTMAXLOD, rpTEAMELEMENTLODSHADOW1 = rpTEAMELEMENTMAXLOD, rpTEAMELEMENTLODSHADOW4,
  rpTEAMELEMENTLODSUP, rpTEAMELEMENTLODFORCEENUMSIZEINT = RWFORCEENUMSIZEINT
}

Functions

RpTeam RpTeamCreate (RwUInt32 numOfPlayers, RwUInt32 numOfPlayerElements)
RwBool  RpTeamDestroy (RpTeam *team)
RwUInt32  RpTeamGetNumberOfPlayers (const RpTeam *team)
RpTeamDictionary RpTeamGetDictionary (const RpTeam *team)
RpTeam RpTeamSetDictionary (RpTeam *team, RpTeamDictionary *dictionary)
RpTeamPlayer RpTeamGetPlayer (const RpTeam *team, RwUInt32 index)
const RpTeam RpTeamRender (const RpTeam *team)
RpTeam RpTeamLock (RpTeam *team, RwUInt32 lockMode)
RpTeam RpTeamUnlock (RpTeam *team)
RwUInt32  RpTeamGetNumberOfElements (const RpTeam *team)
RpTeam RpTeamSetCameraTestSphereCallBack (RpTeam *team, RpTeamCameraTestSphere callBack, RpTeamCameraTestSphereData data)
const RpTeam RpTeamGetCameraTestSphereCallBack (const RpTeam *team, RpTeamCameraTestSphere *callBack, RpTeamCameraTestSphereData *data)
RpTeam RpTeamSetPersistentLights (RpTeam *team, RpLight *directional, RpLight *ambient)
const RpTeam RpTeamGetPersistentLights (const RpTeam *team, RpLight **directional, RpLight **ambient)
RwUInt32  RpTeamDictionaryGetNumOfElements (const RpTeamDictionary *dictionary)
RpTeamDictionary RpTeamDictionarySetElement (RpTeamDictionary *dictionary, RpAtomic *atomic, RpTeamElementType type, RwUInt32 dictionaryIndex)
RpAtomic RpTeamDictionaryGetElement (const RpTeamDictionary *dictionary, RwUInt32 dictionayIndex)
RpTeamDictionary RpTeamDictionarySetLODElement (RpTeamDictionary *dictionary, RpAtomic *atomic, RpTeamElementType type, RwUInt32 lodIndex, RwUInt32 dictionaryIndex)
RpAtomic RpTeamDictionaryGetLODElement (const RpTeamDictionary *dictionary, RwUInt32 lodIndex, RwUInt32 dictionaryIndex)
RpTeamDictionary RpTeamDictionaryCreate (RwUInt32 numOfDictionaryElements)
RwBool  RpTeamDictionaryDestroy (RpTeamDictionary *dictionary)
RpTeamDictionary RpTeamDictionaryInstance (RpTeamDictionary *dictionary)
RpTeam RpTeamSetLODCamera (RpTeam *team, RpTeamLODCamera camera)
RpTeam RpTeamSetLODFarRange (RpTeam *team, RwReal farRange)
RpTeam RpTeamSetLODCallBack (RpTeam *team, RpTeamLODCallBack callBack, RpTeamLODData data)
RpTeamLODCamera  RpTeamGetLODCamera (const RpTeam *team)
RwReal  RpTeamGetLODFarRange (const RpTeam *team)
const RpTeam RpTeamGetLODCallBack (const RpTeam *team, RpTeamLODCallBack *callBack, RpTeamLODData *data)
RpTeamPlayer RpTeamPlayerSetCurrentLOD (RpTeamPlayer *player, RwUInt32 lod)
RwUInt32  RpTeamPlayerGetCurrentLOD (const RpTeamPlayer *player)
RpTeamPlayer RpTeamPlayerSetSyncLODPerFrame (RpTeamPlayer *player, RwBool syncLODPerFrame)
RwBool  RpTeamPlayerGetSyncLODPerFrame (RpTeamPlayer *player)
RpMaterial RpTeamMaterialSetTeamTexture (RpMaterial *material, const RpTeam *team, RwTexture *texture)
RwTexture RpTeamMaterialGetTeamTexture (const RpMaterial *material, const RpTeam *team)
RpMaterial RpTeamMaterialSetPlayerTexture (RpMaterial *material, const RpTeamPlayer *player, RwTexture *texture)
RwTexture RpTeamMaterialGetPlayerTexture (const RpMaterial *material, const RpTeamPlayer *player)
RpMaterial RpTeamMaterialSetPlayerDualTexture (RpMaterial *material, const RpTeamPlayer *player, RwTexture *texture)
RwTexture RpTeamMaterialGetPlayerDualTexture (const RpMaterial *material, const RpTeamPlayer *player)
RpTeamPlayer RpTeamPlayerSetElement (RpTeamPlayer *player, RwUInt32 index, RwUInt32 dictionaryIndex)
RwUInt32  RpTeamPlayerGetElement (const RpTeamPlayer *player, RwUInt32 index)
RpTeamPlayer RpTeamPlayerSetHierarchyFrame (RpTeamPlayer *player, RwFrame *frame)
RwFrame RpTeamPlayerGetHierarchyFrame (const RpTeamPlayer *player)
RpTeamPlayer RpTeamPlayerSetActivity (RpTeamPlayer *player, RwBool active)
RwBool  RpTeamPlayerGetActivity (const RpTeamPlayer *player)
RpTeamPlayer RpTeamPlayerSetRenderCallBack (RpTeamPlayer *player, RpTeamPlayerRenderCallBack preCallBack, RpTeamPlayerRenderCallBack postCallBack, RpTeamRenderData data)
const RpTeamPlayer RpTeamPlayerGetRenderCallBack (const RpTeamPlayer *player, RpTeamPlayerRenderCallBack *preCallBack, RpTeamPlayerRenderCallBack *postCallBack, RpTeamRenderData *data)
RwSphere RpTeamPlayerGetBoundingSphere (RpTeamPlayer *player)
RpTeamPlayer RpTeamPlayerSetShadows (RpTeamPlayer *player, RwBool active)
RwBool  RpTeamPlayerGetShadows (RpTeamPlayer *player)
RpTeam RpTeamSetShadows (RpTeam *team, RpTeamShadows *shadows)
RpTeamShadows RpTeamGetShadows (const RpTeam *team)
RwUInt32  RpTeamStreamGetSize (const RpTeam *team)
RpTeam RpTeamStreamRead (RwStream *stream, RpTeamDictionary *dictionary)
const RpTeam RpTeamStreamWrite (const RpTeam *team, RwStream *stream)
RwUInt32  RpTeamDictionaryStreamGetSize (const RpTeamDictionary *dictionary)
RpTeamDictionary RpTeamDictionaryStreamRead (RwStream *stream)
const RpTeamDictionary RpTeamDictionaryStreamWrite (const RpTeamDictionary *dictionary, RwStream *stream)
RwBool  RpTeamPluginAttach (void)

Detailed Description

Team Plugin for RenderWare.

RpTeam Plugin Overview

Requirements

Overview

RpTeam is provided to develop teams of players which are similar in construction. The plugin is designed to optimize the rendering of a team of players.

Before any of the plugin functions can be used, RpTeamPluginAttach must be called to attach the plugin. The team plugin also uses functionality from the following plugins which must also be attached: RpWorld, RpHAnim, RpMatFX and RpSkin.

The RpTeam plugin contains:

Creating a Team
  1. RpTeamPluginAttach attaches the team plugin.
  2. RpTeamCreate creates a team consisting of players and player elements. The team is locked by default.
  3. RpTeamDictionaryCreate creates a team dictionary.
  4. RpTeamSetDictionary attaches the team dictionary to the team.
  5. RpTeamDictionarySetLODElement adds LOD atomics to dictionary elements.
  6. RpTeamPlayerSetElement assigns dictionary elements to players.
  7. RpTeamSetShadows sets the shadows for the team.
  8. RpTeamUnlock unlocks the team.
  9. RpTeamRender renders the team.
Dictionaries
An RpTeamDictionary contains an array of dictionary elements to construct the team's players. Dictionary elements are set by calling RpTeamDictionarySetLODElement.
Players
Each player is generated and rendered by selecting elements from the dictionary. Each player contains an array of indices which reference dictionary elements.
Shadows
Shadows can be assigned per player and per team.
Level of Detail
Each player has a current LOD.
Other Documents
For more information about the RpTeam plugin refer to the Team Chapter in the User Guide.

Define Documentation

#define rpTEAMELEMENTMAXLOD   (5)
 

rpTEAMELEMENTMAXLOD defines the maximum number of level of details that can be added to the dictionary for a single element.

See also:
RpTeamDictionarySetLODElement , RpTeamDictionaryGetLODElement , RpTeamPlayerSetCurrentLOD , RpTeamPlayerGetCurrentLOD
#define rpTEAMELEMENTUNUSED   (~((RwUInt32)0))
 

rpTEAMELEMENTUNUSED should be used for the dictionary index when disabling an element that a player is constructed. A player is constructed using RpTeamPlayerSetElement

#define rpTEAMMAXNUMBONES   (32)
 

rpTEAMMAXNUMBONES defines the maximum number of bones the Team plugin can render for a single skinned character.

#define rpTEAMMAXNUMSHADOWS   (4)
 

rpTEAMMAXNUMSHADOWS defines the maximum number of shadows the Team plugin can render.

See also:
RpTeamShadows , RpTeamSetShadows , RpTeamGetShadows

Typedef Documentation

typedef struct RpTeam RpTeam
 

RpTeam represents a single team. This should be considered an opaque type. Use the RpTeam API functions to access it.

See also:
RpTeamCreate , RpTeamDestroy , RpTeamGetNumberOfPlayers , RpTeamGetNumberOfElements , RpTeamGetDictionary , RpTeamGetPlayer , RpTeamRender , RpTeamLock , RpTeamUnlock , RpTeamSetShadows , RpTeamGetShadows
typedef RwFrustumTestResult(* RpTeamCameraTestSphere)(const RpTeam * team, RwUInt32 playerIndex, const RwCamera * camera, const RwSphere * sphere, RpTeamCameraTestSphereData data)
 

RpTeamCameraTestSphere represents the function called from RpTeamRender to allow custom player culling. The callback is set per team by RpTeamSetCameraTestSphereCallBack.

The fuction should return :-

Even if rwSPHEREOUTSIDE is returned, RpTeam may still decide to render the player's shadows if they're visible.

To stop a player from being rendered completely unselect the player with RpTeamPlayerSetActivity

Parameters:
team  Team which the player is a member of.
playerIndex  Index of player being camera tested.
camera  Camera to test the player against.
sphere  World space transformed player bounding sphere.
data  User callback data.
See also:
RpTeamSetCameraTestSphereCallBack , RpTeamGetCameraTestSphereCallBack
typedef void* RpTeamCameraTestSphereData
 

RpTeamCameraTestSphereData represents the user data to be passed to the RpTeamCameraTestSphere function.

See also:
RpTeamSetCameraTestSphereCallBack , RpTeamGetCameraTestSphereCallBack
typedef struct RpTeamDictionary RpTeamDictionary
 

RpTeamDictionary represents the part dictionary of a team. It can be retrieved by RpTeamGetDictionary. This should be considered an opaque type. Use the RpTeamDictionary API functions to access it.

See also:
RpTeamDictionaryGetNumOfElements , RpTeamDictionarySetElement , RpTeamDictionaryGetElement , RpTeamDictionarySetLODElement , RpTeamDictionaryGetLODElement
typedef RwUInt32(* RpTeamLODCallBack)(const RpTeam * team, RwUInt32 playerIndex, RpTeamLODData data)
 

RpTeamLODCallBack represents the function called from RpTeamRender to calculate the correct LOD for each player. Only players which are active in the team will be processed, RpTeamPlayerSetActivity. A player will also be processed if it has been set to synchronize per frame, RpTeamPlayerSetSyncLODPerFrame.

Parameters:
team  Team which is being rendered.
playerIndex  Index of player to calculate LOD.
data  User callback data.
Returns:
The the present LOD of the player.
See also:
RpTeamPlayerSetRenderCallBack , RpTeamPlayerGetRenderCallBack , RpTeamPlayerSetActivity , RpTeamPlayerGetActivity , RpTeamPlayerSetSyncLODPerFrame , RpTeamPlayerGetSyncLODPerFrame
typedef RwCamera* RpTeamLODCamera
 

RpTeamLODCamera represents a camera within the team used to calculate the LOD for the players.

See also:
RpTeamSetLODCamera , RpTeamGetLODCamera
typedef void* RpTeamLODData
 

RpTeamLODData represents the user data to be passed to the RpTeamLODCallBack function.

See also:
RpTeamSetLODCallBack , RpTeamGetLODCallBack
typedef struct RpTeamPlayer RpTeamPlayer
 

RpTeamPlayer represents a player in a team. They are retrieved by RpTeamGetPlayer. This should be considered an opaque type. Use the RpTeamPlayer API functions to access it.

See also:
RpTeamPlayerSetElement , RpTeamPlayerGetElement , RpTeamPlayerSetHierarchyFrame , RpTeamPlayerGetHierarchyFrame , RpTeamPlayerSetActivity , RpTeamPlayerGetActivity , RpTeamPlayerSetRenderCallBack , RpTeamPlayerGetRenderCallBack , RpTeamPlayerSetCurrentLOD , RpTeamPlayerGetCurrentLOD , RpTeamPlayerSetSyncLODPerFrame , RpTeamPlayerGetSyncLODPerFrame , RpTeamPlayerGetBoundingSphere
typedef RpAtomic*(* RpTeamPlayerRenderCallBack)(const RpTeam * team, RwUInt32 playerIndex, RpAtomic * atomic, RpTeamRenderData data)
 

RpTeamPlayerRenderCallBack represents the function called from RpTeamRender to allow player specific alteration to atomics. The callback is set per player by RpTeamPlayerSetRenderCallBack.

Parameters:
team  Team which the player is a member of.
playerIndex  Index of player being rendered.
atomic  Atomic which is being rendered as a part of the player.
data  User callback data.
typedef void* RpTeamRenderData
 

RpTeamRenderData represents the user data to be passeds to the RpTeamPlayerRenderCallBack function.

See also:
RpTeamPlayerSetRenderCallBack , RpTeamPlayerGetRenderCallBack

Enumeration Type Documentation

enum RpTeamElementLOD
 

RpTeamElementLOD defines the special LOD elements. The values rpTEAMELEMENTLODSHADOW1 and rpTEAMELEMENTLODSHADOW4 are used whilst rendering the player shadows and should be heavily reduced LOD.

See also:
RpTeamShadows , RpTeamDictionarySetLODElement , RpTeamDictionaryGetLODElement
Enumeration values:
rpTEAMELEMENTLODFIRST  Highest LOD.
rpTEAMELEMENTLODMAX  Lowest LOD.
rpTEAMELEMENTLODSHADOW1  One shadow LOD.
rpTEAMELEMENTLODSHADOW4  Four shadow LOD.
enum RpTeamElementType
 

RpTeamElementType defines the different type of atomic which the Team can control. The type is used when setting elements into the team's dictionary.

See also:
RpTeamDictionarySetElement , RpTeamDictionaryGetElement
Enumeration values:
rpTEAMELEMENTSTATIC  The atomic contains static geometry.
rpTEAMELEMENTSKINNED  The atomic contains skinned geometry.
rpTEAMELEMENTPATCH  The atomic contains patched geometry.
enum RpTeamLockMode
 

RpTeamLockMode defines the different areas of the team which can be locked and then altered.

See also:
RpTeamLock , RpTeamUnlock
Enumeration values:
rpTEAMLOCKDICTIONARY  Lock the team's dictionary.
rpTEAMLOCKPLAYERS  Lock the team's players.
rpTEAMLOCKPLAYERLODS  Lock the team's player's LODS.
rpTEAMLOCKTEAMLOD  Lock the team LOD setup.
rpTEAMLOCKTEXDICTIONARYS  Lock the team's texture dictionary.
rpTEAMLOCKSHADOWS  Lock the team shadow data.
rpTEAMLOCKPLAYERSHADOWS  Lock the team's player shadows.
rpTEAMLOCKLIGHTS  Lock the team's persistent lights.
rpTEAMLOCKALL  Lock the entire team.

Function Documentation

RpTeam* RpTeamCreate RwUInt32    numOfPlayers,
RwUInt32    numOfPlayerElements
 

RpTeamCreate is called to create an RpTeam object. The team object contains players and a player element dictionary. The players are then constructed from the elements in the player dictionary. The team is created locked with RpTeamLockMode rpTEAMLOCKALL and should be unlocked before rendering.

Once a team has been created a RpTeamDictionary should be attached to the team.

Parameters:
numOfPlayers  Number of players in the team.
numOfPlayerElements  Maximum number of elements a player can be constructed from.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamDestroy , RpTeamDictionaryCreate , RpTeamGetNumberOfPlayers , RpTeamGetNumberOfElements , RpTeamSetDictionary , RpTeamGetDictionary , RpTeamGetPlayer , RpTeamRender , RpTeamLock , RpTeamUnlock
RwBool RpTeamDestroy RpTeam   team
 

RpTeamDestroy is called to destroy a team object. All the players will be destroyed, and the player's hierarchy frame will be destroyed. The team's dictionary must be destroyed manually as it may be in use by a number of teams.

Parameters:
team  Pointer to the team to destroy.
Returns:
Returns TRUE if successful or FALSE if there is an error.
See also:
RpTeamCreate , RpTeamLock , RpTeamUnlock
RpTeamDictionary* RpTeamDictionaryCreate RwUInt32    numOfDictionaryElements
 

RpTeamDictionaryCreate is called to create an RpTeamDictionary object. The team dictionary object contains the player elements used to construct a team's players.

Parameters:
numOfDictionaryElements  Number of elements the dictionary can hold.
Returns:
Returns a pointer to the team dictionary if successful or NULL if there is an error.
See also:
RpTeamDictionaryDestroy , RpTeamDestroy , RpTeamCreate , RpTeamSetDictionary , RpTeamGetDictionary
RwBool RpTeamDictionaryDestroy RpTeamDictionary   dictionary
 

RpTeamDictionaryDestroy is called to destroy a team dictionary object. All the elements and all the levels of detail in the team dictionary will be destroyed.

Parameters:
dictionary  Pointer to the dictionary to destroy.
Returns:
Returns TRUE if successful or FALSE if there is an error.
See also:
RpTeamDictionaryCreate , RpTeamGetDictionary , RpTeamDestroy
RpAtomic* RpTeamDictionaryGetElement const RpTeamDictionary   dictionary,
RwUInt32    index
 

RpTeamDictionaryGetElement is used to return an atomic element from the team dictionary. The element will remain in the dictionary.

Parameters:
dictionary  Pointer to the dictionary to query.
index  Location in the dictionary to get the element.
Returns:
Returns a pointer to the atomic if successful or NULL if there is an error.
See also:
RpTeamGetDictionary , RpTeamDictionaryGetNumOfElements , RpTeamDictionarySetElement , RpTeamDictionarySetLODElement , RpTeamDictionaryGetLODElement , RpTeamPlayerGetElement
RpAtomic* RpTeamDictionaryGetLODElement const RpTeamDictionary   dictionary,
RwUInt32    lodIndex,
RwUInt32    dictionaryIndex
 

RpTeamDictionaryGetLODElement is used to return an element's level of detail atomic from the team dictionary. The element will remain in the dictionary.

Parameters:
dictionary  Pointer to the dictionary to query.
lodIndex  Level of detail index.
dictionaryIndex  Location in the dictionary to get the element.
Returns:
Returns a pointer to the atomic if successful or NULL if there is an error.
See also:
RpTeamGetDictionary , RpTeamDictionaryGetNumOfElements , RpTeamDictionarySetLODElement , RpTeamPlayerGetElement
RwUInt32 RpTeamDictionaryGetNumOfElements const RpTeamDictionary   dictionary
 

RpTeamDictionaryGetNumOfElements returns the number of elements the team's dictionary can contain.

Parameters:
dictionary  Pointer to the dictionary to query.
Returns:
Returns total number elements the dictionary can contain.
See also:
RpTeamCreate , RpTeamGetDictionary , RpTeamDictionarySetElement , RpTeamDictionaryGetElement , RpTeamDictionarySetLODElement , RpTeamDictionaryGetLODElement
RpTeamDictionary* RpTeamDictionaryInstance RpTeamDictionary   dictionary
 

RpTeamDictionaryInstance is called to instance the dictionary elements. All elements in the dictionary and all levels of detail will be instanced. RpAtomicInstance contains more details about the instancing process.

This function must be called between RwCameraBeginUpdate and RwCameraEndUpdate as this function executes the rendering pipelines to guarantee that all the needed data is generated.

NOTE: See the platform specific documentation to see if this feature is not supported on your target platform.

Parameters:
dictionary  Pointer to the dictionary to instance.
Returns:
Returns the dictionary if successful or NULL if there is an error.
See also:
RpAtomicInstance , RpTeamGetDictionary
RpTeamDictionary* RpTeamDictionarySetElement RpTeamDictionary   dictionary,
RpAtomic   atomic,
RpTeamElementType    type,
RwUInt32    index
 

RpTeamDictionarySetElement is used to set an atomic element into the dictionary. As no level of detail is specified it's assumed to be using RpTeamElementLOD default rpTEAMELEMENTLODFIRST.

To permanently remove an element from the dictionary, set a NULL element into the dictionary element.

Parameters:
dictionary  Pointer to the dictionary to added the element to.
atomic  Pointer to the atomic to add.
type  Element type.
index  Location in the dictionary to add the element.
Returns:
Returns a pointer to the dictionary if successful or NULL if there is an error.
See also:
RpTeamGetDictionary , RpTeamLock , RpTeamDictionaryGetNumOfElements , RpTeamDictionaryGetElement , RpTeamDictionarySetLODElement , RpTeamDictionaryGetLODElement , RpTeamPlayerSetElement
RpTeamDictionary* RpTeamDictionarySetLODElement RpTeamDictionary   dictionary,
RpAtomic   atomic,
RpTeamElementType    type,
RwUInt32    lodIndex,
RwUInt32    index
 

RpTeamDictionarySetLODElement is used to set an atomic element into the dictionary. The dictionary elements are broken up into a number of levels of detail, defined by rpTEAMELEMENTMAXLOD. The atomic element will be stored in the correct level of detail index.

We define two extra special levels of detail called rpTEAMELEMENTLODSHADOW1 and rpTEAMELEMENTLODSHADOW4, which should be used for shadow rendering geometry. This geometry should be low detail, none textured, with no pre-light colors. The geometry should also be generated from a single mesh.

To permanently remove an element from the dictionary, set a NULL element into the dictionary element with the correct level of detail.

Parameters:
dictionary  Pointer to the dictionary to add the element to.
atomic  Pointer to the atomic to add.
type  Element type.
lodIndex  Level of detail index.
index  Location in the dictionary to add the element.
Returns:
Returns a pointer to the dictionary if successful or NULL if there is an error.
See also:
RpTeamGetDictionary , RpTeamLock , RpTeamDictionaryGetNumOfElements , RpTeamDictionaryGetLODElement , RpTeamPlayerSetElement
RwUInt32 RpTeamDictionaryStreamGetSize const RpTeamDictionary   dictionary
 

RpTeamDictionaryStreamGetSize is used to determine the size in bytes of the binary representation of the specified dictionary. This is used in the binary chunk header to indicate the size of the team chunk. The size does not include the size of the chunk header.

Parameters:
dictionary  Pointer to the dictionary whose binary size is required.
Returns:
The chunk size of the patch mesh if successful, or zero otherwise.
See also:
RwStreamOpen , RwStreamClose , RpTeamDictionaryStreamRead , RpTeamDictionaryStreamWrite
RpTeamDictionary* RpTeamDictionaryStreamRead RwStream   stream
 

RpTeamDictionaryStreamRead is used to read a dictionary from the specified binary stream. Prior to this function call, a binary team chunk must have been found in the stream.

The sequence to locate and read a team dictionary from a binary stream is as follows:

   RwStream *stream;
   RpTeamDictionary *newTeamDictionary;
  
   stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx");
   if( stream )
   {
       if( RwStreamFindChunk(stream, rwID_TEAMDICTIONARY, NULL, NULL) )
       {
           newTeamDictionary = RpTeamDictionaryStreamRead(stream);
       }
  
       RwStreamClose(stream, NULL);
   }
Parameters:
stream  Pointer to the binary stream.
Returns:
Returns a pointer to the dictionary if successful, or NULL if there is an error.
See also:
RpTeamDictionaryStreamWrite , RpTeamDictionaryStreamGetSize , RwStreamOpen , RwStreamClose , RwStreamFindChunk , RpTeamPluginAttach
const RpTeamDictionary* RpTeamDictionaryStreamWrite const RpTeamDictionary   dictionary,
RwStream   stream
 

RpTeamDictionaryStreamWrite is used to write the specified dictionary to the given binary stream. The stream must have been opened prior to this function call.

Parameters:
dictionary  Pointer to the dictionary.
stream  Pointer to the binary stream.
Returns:
Returns a pointer to the dictionary if successful, or NULL if there is an error.
See also:
RwStreamOpen , RwStreamClose , RpTeamStreamRead , RpTeamStreamGetSize
const RpTeam* RpTeamGetCameraTestSphereCallBack const RpTeam   team,
RpTeamCameraTestSphere   callBack,
RpTeamCameraTestSphereData   data
 

RpTeamGetCameraTestSphereCallBack is called to query the current team player frustum test call back function.

Parameters:
team  Pointer to the team.
callBack  Pointer to receive the current call back.
data  Pointer to receive the current call back user data.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamSetCameraTestSphereCallBack
RpTeamDictionary* RpTeamGetDictionary const RpTeam   team
 

RpTeamGetDictionary returns a pointer to the team's element dictionary.

Parameters:
team  Pointer to the team.
Returns:
Returns a pointer to the team's dictionary if successful or NULL if there is an error.
See also:
RpTeamCreate , RpTeamDestroy , RpTeamSetDictionary , RpTeamGetNumberOfPlayers , RpTeamGetNumberOfElements , RpTeamGetPlayer , RpTeamRender , RpTeamLock , RpTeamUnlock
const RpTeam* RpTeamGetLODCallBack const RpTeam   team,
RpTeamLODCallBack   callBack,
RpTeamLODData   data
 

RpTeamGetLODCallBack is called to retrieve the team's current, calculate player LOD callback function.

Parameters:
team  Pointer to the team.
callBack  Pointer to receive the callback function.
data  Pointer to receive the user data passed to the callback function.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamSetLODCallBack
RpTeamLODCamera RpTeamGetLODCamera const RpTeam   team
 

RpTeamGetLODCamera is called to return the camera used by the default LOD callback function to calculate a players LOD. The camera is set with RpTeamSetLODCamera.

Parameters:
team  Pointer to the team.
Returns:
Returns a pointer to the camera if successful or NULL if there is an error.
See also:
RpTeamSetLODCamera , RpTeamSetLODFarRange , RpTeamGetLODFarRange
RwReal RpTeamGetLODFarRange const RpTeam   team
 

RpTeamGetLODFarRange is called to return the far range used by the default LOD callback function to calculate a players LOD. The far range is set with RpTeamSetLODFarRange.

Parameters:
team  Pointer to the team.
Returns:
Returns the far range of the default LOD callback.
See also:
RpTeamSetLODCamera , RpTeamGetLODCamera , RpTeamSetLODFarRange
RwUInt32 RpTeamGetNumberOfElements const RpTeam   team
 

RpTeamGetNumberOfElements returns the number of elements each player can be constucted from.

Parameters:
team  Pointer to the team to query.
Returns:
Returns the maximum number of elements a player can be constructed from.
See also:
RpTeamCreate , RpTeamDestroy , RpTeamGetNumberOfPlayers , RpTeamGetDictionary , RpTeamGetPlayer , RpTeamRender , RpTeamLock , RpTeamUnlock
RwUInt32 RpTeamGetNumberOfPlayers const RpTeam   team
 

RpTeamGetNumberOfPlayers returns the number of players in a team.

Parameters:
team  Pointer to the team to query.
Returns:
Number of players the team was created with.
See also:
RpTeamCreate , RpTeamDestroy , RpTeamGetNumberOfElements , RpTeamGetDictionary , RpTeamGetPlayer
const RpTeam* RpTeamGetPersistentLights const RpTeam   team,
RpLight **    directional,
RpLight **    ambient
 

RpTeamGetPersistentLights returns the persistent lights currently defined for the team.

Parameters:
team  Pointer to the team to define the lights.
directional  Pointer to the receive the directional light.
ambient  Pointer to the receive the ambient light.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamSetPersistentLights
RpTeamPlayer* RpTeamGetPlayer const RpTeam   team,
RwUInt32    index
 

RpTeamGetPlayer returns a pointer to the indexed player in the team.

Parameters:
team  Pointer to the team.
index  Player index in the team.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamCreate , RpTeamDestroy , RpTeamGetNumberOfPlayers , RpTeamGetNumberOfElements , RpTeamGetDictionary , RpTeamRender , RpTeamLock , RpTeamUnlock
RpTeamShadows* RpTeamGetShadows const RpTeam   team
 

RpTeamGetShadows is used to get the shadow data for a team.

Parameters:
team  Pointer to the team.
Returns:
Returns a pointer to the shadow data if successful or NULL if none has been set.
See also:
RpTeamRender , RpTeamSetShadows
RpTeam* RpTeamLock RpTeam   team,
RwUInt32    lockMode
 

RpTeamLock should be called before any of the team's internal data structures are changed. This function prepares the team for unlocking after its data has been modified so that the rendering optimizations can be rebuilt. A newly created geometry is already locked.

The lock flags are (type RpTeamLockMode):

  • rpTEAMLOCKDICTIONARY - Lock the team's dictionary.
  • rpTEAMLOCKPLAYERS - Lock the team's players.
  • rpTEAMLOCKPLAYERLODS - Lock the player's individual level of detail.
  • rpTEAMLOCKTEAMLOD - Lock the team's level of detail setup
  • rpTEAMLOCKTEXDICTIONARYS - Lock the team's tetxure dictionary.
  • rpTEAMLOCKSHADOWS - Lock the team's shadow data.
  • rpTEAMLOCKALL - Lock the entire team.
Parameters:
team  Pointer to the team to lock.
lockMode  Team lock flags.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamCreate , RpTeamDestroy , RpTeamRender , RpTeamUnlock
RwTexture* RpTeamMaterialGetPlayerDualTexture const RpMaterial   material,
const RpTeamPlayer   player
 

RpTeamMaterialGetPlayerDualTexture is used to return the defined second pass player specific texture.

Parameters:
material  Pointer to the material.
player  Pointer to the player.
Returns:
Returns a pointer to the texture if successful or NULL if there is an error.
See also:
RpTeamGetPlayer , RpTeamMaterialSetPlayerTexture , RpTeamMaterialGetPlayerTexture , RpTeamMaterialSetPlayerDualTexture
RwTexture* RpTeamMaterialGetPlayerTexture const RpMaterial   material,
const RpTeamPlayer   player
 

RpTeamMaterialGetPlayerTexture is used to return the defined player specific texture.

Parameters:
material  Pointer to the material.
player  Pointer to the player.
Returns:
Returns a pointer to the texture if successful or NULL if there is an error.
See also:
RpTeamGetPlayer , RpTeamMaterialSetPlayerTexture , RpTeamMaterialSetPlayerDualTexture , RpTeamMaterialGetPlayerDualTexture
RwTexture* RpTeamMaterialGetTeamTexture const RpMaterial   material,
const RpTeam   team
 

RpTeamMaterialGetTeamTexture is used to return the defined team specific texture.

Parameters:
material  Pointer to the material.
team  Pointer to the team.
Returns:
Returns a pointer to the texture if successful or NULL if there is an error.
See also:
RpTeamMaterialSetTeamTexture , RpTeamMaterialSetPlayerTexture , RpTeamMaterialGetPlayerTexture , RpTeamMaterialSetPlayerDualTexture , RpTeamMaterialGetPlayerDualTexture
RpMaterial* RpTeamMaterialSetPlayerDualTexture RpMaterial   material,
const RpTeamPlayer   player,
RwTexture   texture
 

RpTeamMaterialSetPlayerDualTexture is used to set a player specific second pass texture. This allows the developer to use a single piece of geometry and overload the second pass texture that is used to render geometry.

If no texture is specified for an individual player then the generic material effect second pass texture is used when rendering. A player specific second pass texture can be removed by setting NULL for the player.

Parameters:
material  Pointer to the material.
player  Pointer to the player.
texture  Pointer to the texture.
Returns:
Returns a pointer to the material if successful or NULL if there is an error.
See also:
RpTeamGetPlayer , RpTeamMaterialSetPlayerTexture , RpTeamMaterialGetPlayerTexture , RpTeamMaterialGetPlayerDualTexture
RpMaterial* RpTeamMaterialSetPlayerTexture RpMaterial   material,
const RpTeamPlayer   player,
RwTexture   texture
 

RpTeamMaterialSetPlayerTexture is used to set a player specific base texture. This allows the developer to use a single piece of geometry and overload the texture that is used to render the texture with.

If no texture is specified for an individual player then the team specific texture is used when rendering. If no player and team specific textures are defined then the base texture is used when rendering. A player specific texture can be removed by setting NULL for the player.

Parameters:
material  Pointer to the material.
player  Pointer to the player.
texture  Pointer to the texture.
Returns:
Returns a pointer to the material if successful or NULL if there is an error.
See also:
RpTeamGetPlayer , RpTeamMaterialGetPlayerTexture , RpTeamMaterialSetPlayerDualTexture , RpTeamMaterialGetPlayerDualTexture
RpMaterial* RpTeamMaterialSetTeamTexture RpMaterial   material,
const RpTeam   team,
RwTexture   texture
 

RpTeamMaterialSetTeamTexture is used to set a team specific base texture. This allows the developer to use a single piece of geometry and overload the texture that is used to render the texture with on a team basis. Hence it is possible to have a number of team's using the same pieces of geometry.

If no texture is specified for a team or an individual player then the base texture is used when rendering. A player specific texture is used in favor of a team specific texture.

A team specific texture can be removed by setting NULL for that team.

Parameters:
material  Pointer to the material.
team  Pointer to the team.
texture  Pointer to the texture.
Returns:
Returns a pointer to the material if successful or NULL if there is an error.
See also:
RpTeamMaterialGetTeamTexture , RpTeamMaterialSetPlayerTexture , RpTeamMaterialGetPlayerTexture , RpTeamMaterialSetPlayerDualTexture , RpTeamMaterialGetPlayerDualTexture
RwBool RpTeamPlayerGetActivity const RpTeamPlayer   player
 

RpTeamPlayerGetActivity is used to return if the player is set to be rendered.

The team should be locked before any players activity is altered with RpTeamLockMode rpTEAMLOCKPLAYERS.

Parameters:
player  Pointer to the player to query.
Returns:
Returns TRUE if the player is active and FALSE if not.
See also:
RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamPlayerSetActivity , RpTeamPlayerGetElement , RpTeamPlayerGetHierarchyFrame , RpTeamPlayerGetRenderCallBack , RpTeamPlayerGetBoundingSphere , RpTeamPlayerGetCurrentLOD , RpTeamPlayerGetSyncLODPerFrame
RwSphere* RpTeamPlayerGetBoundingSphere RpTeamPlayer   player
 

RpTeamPlayerGetBoundingSphere is used to get the players bounding sphere. This is used during RpTeamRender to determine clipping and shadow rendering information. If the bounding sphere intersects the the near clip plane the whole player is culled.

Parameters:
player  Pointer to the player.
Returns:
Returns a pointer to the bounding sphere if successful or NULL if there is an error.
See also:
RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamPlayerGetElement , RpTeamPlayerGetHierarchyFrame , RpTeamPlayerGetActivity , RpTeamPlayerGetRenderCallBack , RpTeamPlayerGetCurrentLOD , RpTeamPlayerGetSyncLODPerFrame
RwUInt32 RpTeamPlayerGetCurrentLOD const RpTeamPlayer   player
 

RpTeamPlayerGetCurrentLOD is called to return the RpTeamPlayer's current LOD. If a player's LOD is not updated because the player has been removed from the LOD sync list with RpTeamPlayerSetSyncLODPerFrame then the LOD value will be used when the player's parts are rendered.

Parameters:
player  Pointer to the player to query.
Returns:
Returns the player's current LOD.
See also:
RpTeamGetPlayer , RpTeamLock , RpTeamPlayerSetCurrentLOD , RpTeamPlayerSetSyncLODPerFrame , RpTeamPlayerGetSyncLODPerFrame
RwUInt32 RpTeamPlayerGetElement const RpTeamPlayer   player,
RwUInt32    index
 

RpTeamPlayerGetElement is used to return the dictionary index for the element that the player is constructed from.

Parameters:
player  Pointer to the player to query.
index  Index of the player's elements.
Returns:
Returns the dictionary index of the element.
See also:
RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamPlayerSetElement , RpTeamPlayerGetHierarchyFrame , RpTeamPlayerGetActivity , RpTeamPlayerGetRenderCallBack , RpTeamPlayerGetBoundingSphere , RpTeamPlayerGetCurrentLOD , RpTeamPlayerGetSyncLODPerFrame
RwFrame* RpTeamPlayerGetHierarchyFrame const RpTeamPlayer   player
 

RpTeamPlayerGetHierarchyFrame is used to return the hierarchy frame for the player.

Parameters:
player  Pointer to the player to query.
Returns:
Returns a pointer to the frame if successful or NULL if there is an error.
See also:
RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamPlayerGetElement , RpTeamPlayerSetHierarchyFrame , RpTeamPlayerGetActivity , RpTeamPlayerGetRenderCallBack , RpTeamPlayerGetBoundingSphere , RpTeamPlayerGetCurrentLOD , RpTeamPlayerGetSyncLODPerFrame
const RpTeamPlayer* RpTeamPlayerGetRenderCallBack const RpTeamPlayer   player,
RpTeamPlayerRenderCallBack   preCallBack,
RpTeamPlayerRenderCallBack   postCallBack,
RpTeamRenderData   data
 

RpTeamPlayerGetRenderCallBack is used to get the players render callback set with RpTeamPlayerSetRenderCallBack.

Parameters:
player  Pointer to the player.
preCallBack  Pointer to the pre-render callback function.
postCallBack  Pointer to the post-render callback function.
data  Pointer to the user data.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamUnlock , RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamPlayerSetRenderCallBack , RpTeamPlayerGetElement , RpTeamPlayerGetHierarchyFrame , RpTeamPlayerGetActivity , RpTeamPlayerGetRenderCallBack , RpTeamPlayerGetBoundingSphere , RpTeamPlayerGetCurrentLOD , RpTeamPlayerGetSyncLODPerFrame
RwBool RpTeamPlayerGetShadows RpTeamPlayer   player
 

RpTeamPlayerGetShadows is used to return if the player's shadows are set to rendered.

The team should be locked before any player's shadows are altered with RpTeamLockMode rpTEAMLOCKPLAYERSHADOWS.

Parameters:
player  Pointer to the player to query.
Returns:
Returns TRUE if the player's shadows are active and FALSE if not.
See also:
RpTeamPlayerSetShadows , RpTeamGetNumberOfPlayers , RpTeamGetPlayer
RwBool RpTeamPlayerGetSyncLODPerFrame RpTeamPlayer   player
 

RpTeamPlayerGetSyncLODPerFrame is called to query if a RpTeamPlayer will have their LOD updated during RpTeamRender with the LOD callback function.

Parameters:
player  Pointer to the player to query.
Returns:
Returns TRUE if the player's LOD is automatically update with the callback or FALSE otherwise.
See also:
RpTeamGetPlayer , RpTeamLock , RpTeamPlayerSetCurrentLOD , RpTeamPlayerGetCurrentLOD , RpTeamPlayerSetSyncLODPerFrame
RpTeamPlayer* RpTeamPlayerSetActivity RpTeamPlayer   player,
RwBool    active
 

RpTeamPlayerSetActivity is used to define if the player should be rendered. Hence it is possible to define a whole team of players and only render the players who are actually 'playing'.

The team should be locked before any players activity is altered with RpTeamLockMode rpTEAMLOCKPLAYERS.

Parameters:
player  Pointer to the player.
active  Player's selection.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamUnlock , RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamPlayerSetElement , RpTeamPlayerSetHierarchyFrame , RpTeamPlayerGetActivity , RpTeamPlayerSetRenderCallBack , RpTeamPlayerSetCurrentLOD , RpTeamPlayerSetSyncLODPerFrame
RpTeamPlayer* RpTeamPlayerSetCurrentLOD RpTeamPlayer   player,
RwUInt32    lod
 

RpTeamPlayerSetCurrentLOD is called to directly set a RpTeamPlayer's current LOD. If a player doesn't have it's LOD calculated during RpTeamRender via the LOD callback function, then this function should be used.

Any LOD value set will persist until the LOD function is called or the user updates it. Therefore, it is not necessary to change the LOD values each frame.

The team should be locked before any individual player level of detail are changed with RpTeamLockMode rpTEAMLOCKPLAYERLODS.

Parameters:
player  Pointer to the player to set the LOD.
lod  Level of detail of the player.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamGetPlayer , RpTeamLock , RpTeamPlayerGetCurrentLOD , RpTeamPlayerSetSyncLODPerFrame , RpTeamPlayerGetSyncLODPerFrame
RpTeamPlayer* RpTeamPlayerSetElement RpTeamPlayer   player,
RwUInt32    index,
RwUInt32    dictionaryIndex
 

RpTeamPlayerSetElement is used to add a dictionary element to the player. The players are constructed by referencing dictionary elements. When the player is rendered, all the dictionary elements that they are constructed from will be positioned and rendered.

To remove a dictionary element from the players constuction set rpTEAMELEMENTUNUSED for the dictionary index.

The team should be locked before any player elements are altered with RpTeamLockMode rpTEAMLOCKPLAYERS.

Parameters:
player  Pointer to the player.
index  Index of the player elements.
dictionaryIndex  Dictionary index of the element to set.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamUnlock , RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamPlayerGetElement , RpTeamPlayerSetHierarchyFrame , RpTeamPlayerSetActivity , RpTeamPlayerSetRenderCallBack , RpTeamPlayerSetCurrentLOD , RpTeamPlayerSetSyncLODPerFrame
RpTeamPlayer* RpTeamPlayerSetHierarchyFrame RpTeamPlayer   player,
RwFrame   frame
 

RpTeamPlayerSetHierarchyFrame is used to attach a hierarchy frame to a player. Each player needs a unique hierarchy to define the skinning and rigid element positions.

The team should be locked before any players hierarchy frame setup is altered with RpTeamLockMode rpTEAMLOCKPLAYERS.

Parameters:
player  Pointer to the player.
frame  Pointer to the frame hierarchy to set.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamUnlock , RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamPlayerSetElement , RpTeamPlayerGetHierarchyFrame , RpTeamPlayerSetActivity , RpTeamPlayerSetRenderCallBack , RpTeamPlayerSetCurrentLOD , RpTeamPlayerSetSyncLODPerFrame
RpTeamPlayer* RpTeamPlayerSetRenderCallBack RpTeamPlayer   player,
RpTeamPlayerRenderCallBack    preCallBack,
RpTeamPlayerRenderCallBack    postCallBack,
RpTeamRenderData    data
 

RpTeamPlayerSetRenderCallBack is used to setup a players render callback. The team which the player is a member of must be locked with RpTeamLockMode rpTEAMLOCKPLAYERS. When an element in the dictionary, that the player is generated from, is rendered the callbacks will be called to allow the user to over load features of the atomic.

If the pre-render callback function returns NULL then the post-render call back will be not be processed.

Parameters:
player  Pointer to the player.
preCallBack  Pre-render callback function, or NULL if there is no pre-render function.
postCallBack  Post-render callback function, or NULL if there is no post-render function.
data  Pointer to user data which is passed to the callbacks.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamUnlock , RpTeamGetNumberOfPlayers , RpTeamGetPlayer , RpTeamLock , RpTeamUnlock , RpTeamPlayerSetElement , RpTeamPlayerSetHierarchyFrame , RpTeamPlayerSetActivity , RpTeamPlayerSetRenderCallBack , RpTeamPlayerSetCurrentLOD , RpTeamPlayerSetSyncLODPerFrame
RpTeamPlayer* RpTeamPlayerSetShadows RpTeamPlayer   player,
RwBool    active
 

RpTeamPlayerSetShadows is used to define if the player's shadows should be rendered. Hence it is possible to disable the rendering of specific player's shadows. All players shadows are enabled by default when the team is created.

The team should be locked before any player's shadows are altered with RpTeamLockMode rpTEAMLOCKPLAYERSHADOWS.

Parameters:
player  Pointer to the player.
active  Enable or disable the player's shadows.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamUnlock , RpTeamPlayerGetShadows , RpTeamGetNumberOfPlayers , RpTeamGetPlayer
RpTeamPlayer* RpTeamPlayerSetSyncLODPerFrame RpTeamPlayer   player,
RwBool    syncLODPerFrame
 

RpTeamPlayerSetSyncLODPerFrame is called to specify if a RpTeamPlayer should have their LOD updated during RpTeamRender with the LOD callback function.

The team should be locked before any individual players level of detail setup is changed with RpTeamLockMode rpTEAMLOCKPLAYERLODS.

Parameters:
player  Pointer to the player.
syncLODPerFrame  TRUE is the player should have their LOD automatically updated, and FALSE otherwise.
Returns:
Returns a pointer to the player if successful or NULL if there is an error.
See also:
RpTeamGetPlayer , RpTeamLock , RpTeamPlayerSetCurrentLOD , RpTeamPlayerGetCurrentLOD , RpTeamPlayerGetSyncLODPerFrame
RwBool RpTeamPluginAttach void   
 

RpTeamPluginAttach is called by the application to indicate that the team plugin should be attached. The call to this function should be placed between RwEngineInit and RwEngineOpen. The team plugin uses functionality from the following plugins, whilst must also be attached: Scene Management, RpHAnim, RpMatFX and RpSkin.

Returns:
True on success, false otherwise.
See also:
RpTeamCreate , RpTeamGetDictionary , RpTeamGetPlayer , RpTeamRender , RpTeamLock , RpTeamUnlock , RpWorldPluginAttach , RpSkinPluginAttach , RpMatFXPluginAttach
const RpTeam* RpTeamRender const RpTeam   team
 

RpTeamRender is called to render the team.

Only the players who have been selected will be considered for rendering. The team will be rendered with the correct team and player textures defined by RpTeamMaterialSetPlayerTexture and RpTeamMaterialSetTeamTexture. The player's level of detail will determine which atomic element is used when rendering a player's dictionary element.

This function should only be called from within the context of a RwCameraBeginUpdate...RwCameraEndUpdate block. This ensures that any rendering that takes place is directed towards an image raster connected to a camera. It also ensures that the player's local transformation matrices are recalculated, if necessary, so that the dictionary elements are rendered in the correct position and orientation.

The team must be unlocked before rendering.

Parameters:
team  Pointer to the team.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamCreate , RpTeamDestroy , RpTeamLock , RpTeamUnlock
RpTeam* RpTeamSetCameraTestSphereCallBack RpTeam   team,
RpTeamCameraTestSphere    callBack,
RpTeamCameraTestSphereData    data
 

RpTeamSetCameraTestSphereCallBack is called to overload the default team player frustum test function. Each frame, any player that is active ( RpTeamPlayerSetActivity ), is considered for rendering. The player's bounding sphere ( RpTeamPlayerGetBoundingSphere ) is tested against the active camera's frustum.

The user may want to overload this test to allow a close up as the default frustum test culls players that intersect the near clip plane. This stops the camera from accidently being inside the player.

Parameters:
team  Pointer to the team.
callBack  Frustum call back function.
data  User data to pass to the call back function.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamGetCameraTestSphereCallBack
RpTeam* RpTeamSetDictionary RpTeam   team,
RpTeamDictionary   dictionary
 

RpTeamSetDictionary attaches a RpTeamDictionary to the the specified team. Currently a team dictionary may not be attached to multiple team objects.

The team should be locked before any elements are added to it's dictionary with RpTeamLockMode rpTEAMLOCKDICTIONARY.

Parameters:
team  Pointer to the team.
dictionary  Pointer to the dictionary to attach.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamCreate , RpTeamDestroy , RpTeamGetDictionary , RpTeamGetNumberOfPlayers , RpTeamGetNumberOfElements , RpTeamGetPlayer , RpTeamRender , RpTeamLock , RpTeamUnlock
RpTeam* RpTeamSetLODCallBack RpTeam   team,
RpTeamLODCallBack    callBack,
RpTeamLODData    data
 

RpTeamSetLODCallBack is called to overload the default LOD calculation callback function. The callback is called each frame for all the players who have the sync per frame enabled, RpTeamPlayerSetSyncLODPerFrame.

If the default LOD callback is not overloaded then a camera RpTeamSetLODCamera and far range RpTeamSetLODFarRange should be setup.

The team should be locked before any level of detail setup is changed with RpTeamLockMode rpTEAMLOCKTEAMLOD.

Parameters:
team  Pointer to the team.
callBack  Pointer to the LOD callback function.
data  Pointer to user data which is passed to the callback function.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamGetLODCallBack
RpTeam* RpTeamSetLODCamera RpTeam   team,
RpTeamLODCamera    camera
 

RpTeamSetLODCamera is called to define the RwCamera which the default LOD callback uses as the base reference frame to calculate the LOD during RpTeamRender. The position of the camera's frame defines the origin of the LOD calculation.

If no camera is specified the default LOD callback will use the current camera, see RwCameraGetCurrentCamera.

The team should be locked before any level of detail setup is changed with RpTeamLockMode rpTEAMLOCKTEAMLOD.

Parameters:
team  Pointer to the team.
camera  Pointer to the camera for the default LOD test to use.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamGetLODCamera , RpTeamSetLODFarRange , RpTeamSetLODCallBack
RpTeam* RpTeamSetLODFarRange RpTeam   team,
RwReal    farRange
 

RpTeamSetLODFarRange is called to define the range of the default LOD callback function. The default LOD function calculates the z distance of a player from the LOD camera's frame. The z distance from the camera's frame is split evenly between the LODs up to the farRange. Any players further from the reference RwCamera than the farRange will receive the maximum level of detail value.

      / \
       |
       |  LOD 0 LOD 1 LOD 2  ...  LOD max
      +-> -----|-----|-----|-----|-----|-------->
     /                               farRange
    L
   

The team should be locked before any level of detail setup is changed with RpTeamLockMode rpTEAMLOCKTEAMLOD.

Parameters:
team  Pointer to the team.
farRange  Range of the furthest LOD.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamLock , RpTeamGetLODFarRange , RpTeamSetLODCamera , RpTeamSetLODCallBack
RpTeam* RpTeamSetPersistentLights RpTeam   team,
RpLight   directional,
RpLight   ambient
 

RpTeamSetPersistentLights is called to define the ambient and directional light the team should use to light the players. RpTeam only supports a custom light mode of a single directional and a single ambient light.

These two lights are used for the entire team and the rendering pipelines have been optimized to reflect this.

Any lights added to a world will be ignored whilst rendering the team.

The team should be locked with rpTEAMLOCKLIGHTS before changing the lights.

Parameters:
team  Pointer to the team to define the lights.
directional  Pointer to the directional light.
ambient  Pointer to the ambient light.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamRender , RpTeamLock , RpTeamGetPersistentLights
RpTeam* RpTeamSetShadows RpTeam   team,
RpTeamShadows   shadows
 

RpTeamSetShadows is used to set the shadow data for a team. Each team object requires it's own shadow data, although teams may share shadow data.

The team should be locked before it's shadow data is attached with RpTeamLockMode rpTEAMLOCKSHADOWS.

Parameters:
team  Pointer to the team.
shadows 
Returns:
Returns a pointer to the atomic if successful or NULL if there is an error.
See also:
RpTeamRender , RpTeamLock , RpTeamUnlock , RpTeamGetShadows
RwUInt32 RpTeamStreamGetSize const RpTeam   team
 

RpTeamStreamGetSize is used to determine the size in bytes of the binary representation of the specified team. This is used in the binary chunk header to indicate the size of the team chunk. The size does not include the size of the chunk header.

Parameters:
team  Pointer to the team whose binary size is required.
Returns:
The chunk size of the patch mesh if successful, or zero otherwise.
See also:
RwStreamOpen , RwStreamClose , RpTeamStreamRead , RpTeamStreamWrite
RpTeam* RpTeamStreamRead RwStream   stream,
RpTeamDictionary   dictionary
 

RpTeamStreamRead is used to read a team from the specified binary stream. Prior to this function call, a binary team chunk must have been found in the stream.

The team's dictionary should be passed to the stream reading function. This allows the team to reattach the team and player specific textures setup for the dictionary element geometry materials.

The sequence to locate and read a team from a binary stream where a team dictionary already exists, is as follows:

   RwStream *stream;
   RpTeam *newTeam;
   RpTeamDictionary *teamDictionary;
  
   stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx");
   if( stream )
   {
       if( RwStreamFindChunk(stream, rwID_TEAM, NULL, NULL) )
       {
           newTeam = RpTeamStreamRead(stream, teamDictionary);
       }
  
       RwStreamClose(stream, NULL);
   }
Parameters:
stream  Pointer to the binary stream.
dictionary  Pointer to the dictionary to attach the team specific extensions.
Returns:
Returns a pointer to the team if successful, or NULL if there is an error.
See also:
RpTeamStreamWrite , RpTeamStreamGetSize , RwStreamOpen , RwStreamClose , RwStreamFindChunk , RpTeamPluginAttach
const RpTeam* RpTeamStreamWrite const RpTeam   team,
RwStream   stream
 

RpTeamStreamWrite is used to write the specified team to the given binary stream. The stream must have been opened prior to this function call.

Parameters:
team  Pointer to the team.
stream  Pointer to the binary stream.
Returns:
Returns a pointer to the team if successful, or NULL if there is an error.
See also:
RwStreamOpen , RwStreamClose , RpTeamStreamRead , RpTeamStreamGetSize
RpTeam* RpTeamUnlock RpTeam   team
 

RpTeamUnlock is used to unlock the specified team. This function is typically used to release the team's internal data structures after modification so that the team's rendering data can be optimized.

A newly created team is always locked and should be unlocked before it can be used in any rendering.

Parameters:
team  Pointer to the team to unlock.
Returns:
Returns a pointer to the team if successful or NULL if there is an error.
See also:
RpTeamCreate , RpTeamDestroy , RpTeamRender , RpTeamLock

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