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

cavewriting::Scene Class Reference

#include <Scene.H>

Inherited by cavewriting::DenouementScene, cavewriting::FadeScene, cavewriting::PeelScene, and cavewriting::TotalCollapse.

List of all members.

Public Member Functions

 Scene (Story *story, xercesc::DOMNode *node, int id)
virtual ~Scene ()
virtual void start ()
const double getStartTime ()
void setStartTime (double time)
const double getDuration ()
const bool getPaused ()
const string & getName ()
virtual void animate ()
Array< Section * > getSections ()
void playSound ()

Static Public Member Functions

static ScenefromXML (Story *story, xercesc::DOMNode *node, int id)

Protected Member Functions

void addFragment (xercesc::DOMNode *node, Story *story)
void checkAndDoGrab ()

Protected Attributes

string _name
bool _paused
double _startTime
double _duration
int _id
Array< Section * > _sections
string _soundName
Vector3 _soundLocation
double _soundTime
double _lastGrabTime
 Information for screen grabs: what time did we last grab the screen?
double _grabPeriod
 Information for screen grabs: how long between grabs.
bool _doGrabs
 Information for screen grabs: should we grab at all?


Detailed Description

Scenes are about timing. A scene is associated with one or more sections, by section-name. A scene is essentially a grouping of sections. The point is to let times be specifed locally, on a per-scene timeline, rather than on a global, linear timeline.

When the scene is started, by calling start() on it, it starts all of the sections it contains, starting at the current time. Scenes start off paused. Subclasses of Scene should do something interesting with the animate() method.

Scenes are managed by a Story object. The Story object tells each Scene when to play. A non-linear structure can be created by having a subclass of Story do something interesting when deciding which scene to play when.

Example: If you have sections defined the following way:

For a basic scene, which just plays one effect after another, set type="basic" To get a peeling effect, set type=peel and peel-effect=peel. To get a fading effect, set type=peel and peel-effect=fade Yes, this is a little ugly. TODO: clean this up so you don't have to say type and effect.


Constructor & Destructor Documentation

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

virtual cavewriting::Scene::~Scene  )  [virtual]
 


Member Function Documentation

void cavewriting::Scene::addFragment xercesc::DOMNode *  node,
Story story
[protected]
 

virtual void cavewriting::Scene::animate  )  [inline, virtual]
 

Reimplemented in cavewriting::DenouementScene, cavewriting::FadeScene, cavewriting::PeelScene, and cavewriting::TotalCollapse.

void cavewriting::Scene::checkAndDoGrab  )  [protected]
 

static Scene* cavewriting::Scene::fromXML Story story,
xercesc::DOMNode *  node,
int  id
[static]
 

const double cavewriting::Scene::getDuration  )  [inline]
 

const string& cavewriting::Scene::getName  )  [inline]
 

const bool cavewriting::Scene::getPaused  )  [inline]
 

Array<Section*> cavewriting::Scene::getSections  )  [inline]
 

const double cavewriting::Scene::getStartTime  )  [inline]
 

void cavewriting::Scene::playSound  ) 
 

void cavewriting::Scene::setStartTime double  time  )  [inline]
 

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

Reimplemented in cavewriting::DenouementScene, cavewriting::FadeScene, cavewriting::PeelScene, and cavewriting::TotalCollapse.


Member Data Documentation

bool cavewriting::Scene::_doGrabs [protected]
 

Information for screen grabs: should we grab at all?

double cavewriting::Scene::_duration [protected]
 

double cavewriting::Scene::_grabPeriod [protected]
 

Information for screen grabs: how long between grabs.

int cavewriting::Scene::_id [protected]
 

double cavewriting::Scene::_lastGrabTime [protected]
 

Information for screen grabs: what time did we last grab the screen?

string cavewriting::Scene::_name [protected]
 

bool cavewriting::Scene::_paused [protected]
 

Array<Section*> cavewriting::Scene::_sections [protected]
 

Vector3 cavewriting::Scene::_soundLocation [protected]
 

string cavewriting::Scene::_soundName [protected]
 

double cavewriting::Scene::_soundTime [protected]
 

double cavewriting::Scene::_startTime [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