QSDK 1.1 Documentation
Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

Q::EntityBase Struct Reference
[QGamedev Helpers]

#include <gamedev_helpers.h>

Inheritance diagram for Q::EntityBase:

Q::Entity Q::MessagePeerBase Com::Unknown Q::MessagePeer Com::ComObject< MessagePeer, MessagePeerBase > Com::Unknown Com::ComObjectBase List of all members.

Public Types

typedef Com::Ptr< EntityBasePTR

Public Member Functions

Q::Text name () const
Q::Group group () const
Q::Concept type () const
EntityInstance::PTR instance () const
bool persistent () const
void setPersistent (bool)
void destroy ()
bool ticking () const
void setTicking (bool enabled)
float tickDelay () const
void setTickDelay (float)
virtual void tick (float dt)=0
virtual bool embody (EntityInstance *)
virtual void disembody (bool destroyed)
virtual void entered (unsigned int yourType, EntityInstance *them, unsigned int theirType)=0
virtual void exited (unsigned int yourType, EntityInstance *them, unsigned int theirType)=0
Utils::Result internalQueryInterface_ (const Com::UUID &, void **)

Public Attributes

 QCOM_DECLARE_COMPONENT

Detailed Description

Base implementation for Entity (with MessagePeer capabilities). This helper class gathers the Entity interface and the EntityInstance class in one single class so that the user can both define the behaviour of the entity and control it. This class also inherits from MessagePeerBase so that it can send/receive messages and easily communicate with other EntityBase objects. Therefore the EntityBase class can be regarded as the generic base class the client should inherit from to write his own entity sub-classes.

Note:
This class is not part of the COM API


Member Typedef Documentation

typedef Com::Ptr<EntityBase> Q::EntityBase::PTR
 

A COM pointer to an object of this class

Reimplemented from Q::Entity.


Member Function Documentation

void Q::EntityBase::destroy  ) 
 

Destroy the entity

virtual void Q::EntityBase::disembody bool  destroyed  )  [virtual]
 

Called when object gets deactivated

Implements Q::Entity.

virtual bool Q::EntityBase::embody EntityInstance  )  [virtual]
 

Called when object gets activated Return true if and only if the activation has succeeded

Implements Q::Entity.

virtual void Q::EntityBase::entered unsigned int  yourType,
EntityInstance them,
unsigned int  theirType
[pure virtual]
 

Called when some tagged geometry of an entity enters is some tagged geometry of another geometry

Implements Q::Entity.

virtual void Q::EntityBase::exited unsigned int  yourType,
EntityInstance them,
unsigned int  theirType
[pure virtual]
 

Called when some tagged geometry of an entity exits is some tagged geometry of another geometry

Implements Q::Entity.

Q::Group Q::EntityBase::group  )  const
 

The group

EntityInstance::PTR Q::EntityBase::instance  )  const
 

The entity instance

Utils::Result Q::EntityBase::internalQueryInterface_ const Com::UUID ,
void ** 
 

Implement Unknown::queryInterface().

Q::Text Q::EntityBase::name  )  const
 

The name

bool Q::EntityBase::persistent  )  const
 

Indicates whether the entity is persistent or not (a persistent entity cannot be deactivated)

void Q::EntityBase::setPersistent bool   ) 
 

Set the persistence flag (a persistent entity cannot be deactivated)

void Q::EntityBase::setTickDelay float   ) 
 

The ticking delay

void Q::EntityBase::setTicking bool  enabled  ) 
 

The ticking flag

virtual void Q::EntityBase::tick float  dt  )  [pure virtual]
 

Called when entity is ticked

Implements Q::Entity.

float Q::EntityBase::tickDelay  )  const
 

The ticking delay

bool Q::EntityBase::ticking  )  const
 

The ticking flag

Q::Concept Q::EntityBase::type  )  const
 

The type


Member Data Documentation

Q::EntityBase::QCOM_DECLARE_COMPONENT
 

COM Object Declaration

Reimplemented from Q::MessagePeerBase.

Return to QSDK documentation Contents page. Contact details for support, information and fault-reporting.
Qube Software Limited © 2000-2004