CollisionContext Struct Reference
[Scene Mangement]

Inherits Service.

Inherited by CCImpl.

List of all members.

Public Methods

virtual void prepare ()=0
virtual void finish ()=0
virtual bool isQuery () const=0
virtual void setEntity (Entity *ent)=0
virtual void setPhysics (PhysicsObject *physics)=0
virtual void test (Surface *surface)=0
virtual EntitygetEntity ()=0
virtual SurfacegetSurface ()=0


Detailed Description

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

    cc = Scene.RenderContext()

    function MyApp:onTimeEvent(event)
        cc:prepare()
        rootEntity:collide(cc)
        cc:finish()
    end


Member Function Documentation

virtual void CollisionContext::finish   [pure virtual]
 

Complete a collision detection pass.

virtual Entity* CollisionContext::getEntity   [pure virtual]
 

Retrieve the entity currently being tested.

virtual Surface* CollisionContext::getSurface   [pure virtual]
 

Retrieve the surface currently being tested.

virtual bool CollisionContext::isQuery   const [pure virtual]
 

Collision detection operates in two modes. In "query" mode, the entity tree is searched for a shell that needs collision testing. Once a shell is found, "test" mode looks for an intersection with other shells. Use this method to determine what mode the detection pass is currently in.

virtual void CollisionContext::prepare   [pure virtual]
 

Prepare the context for a new collision detection pass.

virtual void CollisionContext::setEntity Entity   ent [pure virtual]
 

Makes the specified entity "active" for testing. This method will be called automatically by Entity::collide() as appropriate.

virtual void CollisionContext::setPhysics PhysicsObject   physics [pure virtual]
 

Set the physical properties of the entity being tested.

virtual void CollisionContext::test Surface   surface [pure virtual]
 

Specify a surface for collision testing.


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