Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

cavewriting::PeelScene Class Reference

A scene in which all of the words from the member sections peel or fade, in random order. In this example

#include <PeelScene.H>

Inherits cavewriting::Scene.

List of all members.

Public Member Functions

 PeelScene (Story *story, xercesc::DOMNode *node, int id)
virtual ~PeelScene ()
virtual void start ()
virtual void animate ()

Protected Member Functions

WordgetRandomUnpeeledWord ()
WordgetRandomWeightedUnpeeledWord ()
WordgetRandomUnpeeledWordFromSection (int section)
bool readyToCollapse ()

Protected Attributes

int _lastSectionPeeledFrom
double _lastTimePeelStarted
double _peelInterval
double _peelDuration
string _peelEffectType
int _numWordsPeeled
int _totalWords
bool _peeledAllWords

Detailed Description

A scene in which all of the words from the member sections peel or fade, in random order. In this example

<section paused="true" visible="true"> <name>sunlight</name> <translation>(-4, 3, -4)</translation> <word>sunlight</word> <word>on</word> <word>the</word> <word>tree</word> </section>

<section paused="true" visible="true"> <translation>(-4, 2, -4)</translation> <name>gravity</name> <word>sometimes</word> <word>things</word> <word>fall</word> </section>

<section paused="true" visible="false"> <name>rotting</name> <translation>(-4, 1, -4)</translation> <word>fruit</word> <word>on</word> <word>the</word> <word>wet</word> <word>ground</word> </section>

<section paused="true" visible="false"> <translation>(-4, 0, -4)</translation> <name>orchard</name> <word>fragrances</word> <word>of</word> <word>vinegar</word> <word>and</word> <word>cider</word> </section>

<scene name="thefall" start-time="0" duration="8" type="peel" peel-interval="1" peel-duration="1" peel-effect="fade"> <section-name>sunlight</section-name> <section-name>gravity</section-name> </scene>

<scene name="afterthefall" start-time="9" duration="100" type="peel" peel-interval="1" peel-duration="10" peel-effect="peel"> <section-name>rotting</section-name> <section-name>orchard</section-name> </scene> </story>

This shows the first two sections fading out, word by word, randomly, and then the last two sections falling. bug: last two sections should start out invisible, then appear.

Within the PeelScene, you can have the words disappear by peeling or by fading. To get a peeling effect, set type=peel and peel-effect=peel. To get a fading effect, set type=peel and peel-effect=fade

Constructor & Destructor Documentation

cavewriting::PeelScene::PeelScene Story story,
xercesc::DOMNode *  node,
int  id

virtual cavewriting::PeelScene::~PeelScene  )  [virtual]

Member Function Documentation

virtual void cavewriting::PeelScene::animate  )  [virtual]

Reimplemented from cavewriting::Scene.

Word* cavewriting::PeelScene::getRandomUnpeeledWord  )  [protected]

Word* cavewriting::PeelScene::getRandomUnpeeledWordFromSection int  section  )  [protected]

Word* cavewriting::PeelScene::getRandomWeightedUnpeeledWord  )  [protected]

bool cavewriting::PeelScene::readyToCollapse  )  [protected]

virtual void cavewriting::PeelScene::start  )  [virtual]

Reimplemented from cavewriting::Scene.

Member Data Documentation

int cavewriting::PeelScene::_lastSectionPeeledFrom [protected]

double cavewriting::PeelScene::_lastTimePeelStarted [protected]

int cavewriting::PeelScene::_numWordsPeeled [protected]

double cavewriting::PeelScene::_peelDuration [protected]

bool cavewriting::PeelScene::_peeledAllWords [protected]

string cavewriting::PeelScene::_peelEffectType [protected]

double cavewriting::PeelScene::_peelInterval [protected]

Story* cavewriting::PeelScene::_story [protected]

int cavewriting::PeelScene::_totalWords [protected]

The documentation for this class was generated from the following file:
Generated on Sun Apr 17 13:34:28 2005 for cavewriting by  doxygen 1.4.0