UpdateContext Struct Reference
[Scene Mangement]

Inherits Service.

Inherited by UCImpl.

List of all members.

Public Methods

virtual void prepare (Float elapsedTime)=0
virtual void finish ()=0
virtual void setPhysicsRate (Float rate)=0
virtual void pushState ()=0
virtual void popState ()=0
virtual void setPose (Pose *pose)=0
virtual const Matrix44getWorldMatrix () const=0


Detailed Description

Provides a context for the update pass of the entity tree. Use the context like this:

    uc = Scene.UpdateContext()

    function MyApp:onTimeEvent(event)
        uc:prepare(event.elapsed)
        rootEntity:update(uc)
        uc:finish()
    end


Member Function Documentation

virtual void UpdateContext::finish   [pure virtual]
 

Complete an update pass.

virtual const Matrix44& UpdateContext::getWorldMatrix   const [pure virtual]
 

Get the current local->world space matrix.

virtual void UpdateContext::popState   [pure virtual]
 

After processing all of it's attributes, each entity will pop the context state before returning. This method will be called automatically by Entity::update() as appropriate.

virtual void UpdateContext::prepare Float    elapsedTime [pure virtual]
 

Prepare the context for a new update pass.

Parameters:
elapsedTime  the elapsed time since the last update, measured in seconds.

virtual void UpdateContext::pushState   [pure virtual]
 

As the entity tree is traversed, each entity will push the context state before processing it's attributes. This method will be called automatically by Entity::update() as appropriate.

virtual void UpdateContext::setPhysicsRate Float    rate [pure virtual]
 

In order to maintain stability and predictability, the physics system is run at a fixed rate, usually higher than the frame rate. This method sets the physics rate. The default is 0.01 (100Hz).

Parameters:
rate  The time between physics updates, measured in seconds.

virtual void UpdateContext::setPose Pose   pose [pure virtual]
 

Makes the specified pose "active". The world matrix of the Pose is cached and becomes accessible via getWorldMatrix(). The context will store a reference to the world matrix and make sure it gets applied to the appropriate parts of the entity tree.


The documentation for this struct was generated from the following file:


Flat Four Engine
Copyright (C) 2001 by 379, Inc.
This page generated by Doxygen