Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

RpCrowdAnimation Struct Reference
[RpCrowd]


Data Fields

RwReal  duration
RwInt32  numSteps
RwInt32  sequences [rpCROWDANIMATIONMAXSTEPS][rpCROWDANIMATIONNUMSEQ]

Detailed Description

An RpCrowdAnimation specifies which rows should be selected from an RpCrowdTexture as time advances (each row of the texture corresponds to the same spectators but in a different pose).

Four independent looping animation sequences are available, with a maximum of 16 steps in each. A particular billboard of the crowd will be randomly assigned to one of the sequences and started off at a random point in that sequence.

When a crowd is created with RpCrowdCreate, any number of animations can be registered, and the application may switch between them as required using RpCrowdSetCurrentAnim. This might happen simultaneously with a switch to another texture when certain events take place, such as goal scores.

The crowd animation state is updated using RpCrowdAddAnimTime.

An example of an animation is shown below. The 1st sequence (first column) shows a ping-pong animation loop. The 4th sequence uses the same loop but at a different speed. The 2nd and 3rd sequences represent a cycling animation at different speeds.

    RpCrowdAnimation CrowdAnim1 =
        { 2.0f,
          16,    
          { {0, 4, 4, 0},   
            {1, 4, 4, 0},
            {2, 5, 4, 1},
            {3, 5, 5, 1},
            {3, 6, 5, 2},
            {2, 6, 5, 2},
            {1, 7, 5, 3},
            {0, 7, 5, 3},
            {0, 7, 6, 3},
            {1, 4, 6, 3},
            {2, 5, 6, 2},
            {3, 6, 6, 1},
            {3, 6, 6, 1},
            {2, 6, 7, 1},
            {1, 7, 7, 0},
            {0, 7, 7, 0} } }; 
   
See also:
RpCrowd Plugin Overview

Field Documentation

RwReal duration
 

Duration of the animation (arbitrary units)

RwInt32 numSteps
 

Number of steps in the animation sequences (maximum 16).

RwInt32 sequences[rpCROWDANIMATIONMAXSTEPS][rpCROWDANIMATIONNUMSEQ]
 

Table of 4 looping animation sequences. Each sequence is an array of numSteps indices specifying the rows of the crowd texture to use in the animation.


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