Entity Struct Reference
[Scene Mangement]

Inherits Service.

Inherited by EntityImpl.

List of all members.

Public Methods

virtual bool initialize (const Char *name)=0
virtual void setName (const Char *name)=0
virtual const ChargetName () const=0
virtual void addAttribute (Attribute *a)=0
virtual void removeAttribute (Attribute *a)=0
virtual void insertAttribute (Attribute *a, Attribute *before)=0
virtual void replaceAttribute (Attribute *aOld, Attribute *aNew)=0
virtual AttributequeryAttribute (const Char *type)=0
virtual void update (UpdateContext *uc)=0
virtual void render (RenderContext *rc)=0
virtual void collide (CollisionContext *cc)=0
virtual void touch (CollisionContext *cc)=0


Detailed Description

An entity represents an object in the scene. Entities are generic and consistent: you don't create new implementations of the Entity interface. Instead, you create a generic entity, and then specialize it by adding Attributes to it. Each attribute contributes to the final behavior of the entity.

Note that attributes are always processed in order, and the first one added will be the first one processed. This can have some effect on the final behavior of the entity. Also important: in general, entities must be singular, that is they cannot appear in the hierarchy more than once.


Member Function Documentation

virtual void Entity::addAttribute Attribute   a [pure virtual]
 

Add a new attribute to the end of the attribute list.

virtual void Entity::collide CollisionContext   cc [pure virtual]
 

Detect collisions with other entities. This call is hierarchical, if the entity has children, they will be tested as well.

virtual const Char* Entity::getName   const [pure virtual]
 

Retrieve an entity's name.

Scripted as:
[r/w string] name

virtual bool Entity::initialize const Char   name [pure virtual]
 

Every entity is identified by a text name.

virtual void Entity::insertAttribute Attribute   a,
Attribute   before
[pure virtual]
 

Insert a new attribute into the list. If the attribute before is not part of this entity, this method will behave the same as addAttribute().

virtual Attribute* Entity::queryAttribute const Char   type [pure virtual]
 

Locate an attribute of an entity.

virtual void Entity::removeAttribute Attribute   a [pure virtual]
 

Remove an attribute from the entity.

virtual void Entity::render RenderContext   rc [pure virtual]
 

Render the entity. This call is hierarchical; if the entity has children, they will get rendered as well.

virtual void Entity::replaceAttribute Attribute   aOld,
Attribute   aNew
[pure virtual]
 

Replace one attribute with another, without changing the order of the attributes. If the target attribute does not exist, this method will behave the same as addAttribute().

virtual void Entity::setName const Char   name [pure virtual]
 

Change the entity's name.

Scripted as:
[r/w string] name

virtual void Entity::touch CollisionContext   cc [pure virtual]
 

Respond to a collision with another entity. Unlike the update() and render(), this method is not propogated to the entity's children.

virtual void Entity::update UpdateContext   uc [pure virtual]
 

Update the entity. This call is hierarchical; if the entity has children, they will get updated as well.


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