NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends
Entity Class Reference
Collaboration diagram for Entity:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void SetParent (EntitySPTR newParent)
EntitySPTR GetParent (void) const
int GetId () const
D3DXVECTOR3 GetWorldPosition (void) const
 Get the absolute position of a given object, recursively accounting for all parent positions, rotations, and scales.
void SetWorldPosition (float, float, float)
D3DXQUATERNION GetWorldRotation (void) const
 Get the absolute rotation of a given object, recursively accounting for all parent rotations.
float GetWorldScale (void) const
 Get the absolute scale of a given object, recursively accounting for all parent scales.
void SetRotation (D3DXQUATERNION)
 Rotate this entity, in its parent entity's coordinate space, by rot.
void SetRotation (float, float, float)
 Rotate this entity, in its parent entity's coordinate space, by yaw, pitch, and roll in radians.
void ChangePosition (D3DXVECTOR3)
 Offset this entity, relative to its current location and in its parent entity's coordinate space, by delta.
void ChangeRotation (D3DXQUATERNION)
 Rotate this entity, relative to its current rotation and in its parent entity's coordinate space, by delta.
void ChangeRotation (float, float, float)
 Rotate this entity, relative to its current rotation and in its parent entity's coordinate space, by delta yaw, pitch, and roll in radians.
void ChangeScale (float)
 Scale this entity, relative to its current scale, by delta.
void SetName (const std::string &name)
std::string GetName ()
MutableStringSPTR GetNameSPTR ()

Static Public Member Functions

static EntitySPTR Factory (const std::string &="", const int &=-1)
static void FactoryAtAddress (void *)
 Creates a new Entity at the specified address.
static void FactoryAtAddress (void *, const std::string &)
static void FactoryAtAddress (void *, const std::string &, const int &)

Public Attributes

D3DXVECTOR3 location
 Offset relative to parent entity space.
D3DXQUATERNION rotation
 Rotation relative to parent.
float scale
 Scale relative to parent.
int id
int priority
PropertyMap properties

Protected Member Functions

void RegisterComponent (ComponentInterface *)
void UnregisterComponent (ComponentInterface *)
bool NotifyEntityRemoval (EntitySPTR)

Friends

class ComponentInterface
class EntityList

Detailed Description

Definition at line 35 of file Entity.h.


Member Function Documentation

void Entity::ChangePosition ( D3DXVECTOR3  delta)

Offset this entity, relative to its current location and in its parent entity's coordinate space, by delta.

Definition at line 223 of file Entity.cpp.

void Entity::ChangeRotation ( D3DXQUATERNION  delta)

Rotate this entity, relative to its current rotation and in its parent entity's coordinate space, by delta.

Definition at line 231 of file Entity.cpp.

void Entity::ChangeRotation ( float  deltaYaw,
float  deltaPitch,
float  deltaRoll 
)

Rotate this entity, relative to its current rotation and in its parent entity's coordinate space, by delta yaw, pitch, and roll in radians.

Definition at line 241 of file Entity.cpp.

void Entity::ChangeScale ( float  delta)

Scale this entity, relative to its current scale, by delta.

Definition at line 251 of file Entity.cpp.

void Entity::FactoryAtAddress ( void *  address) [static]

Creates a new Entity at the specified address.

Definition at line 41 of file Entity.cpp.

D3DXVECTOR3 Entity::GetWorldPosition ( void  ) const

Get the absolute position of a given object, recursively accounting for all parent positions, rotations, and scales.

Definition at line 120 of file Entity.cpp.

D3DXQUATERNION Entity::GetWorldRotation ( void  ) const

Get the absolute rotation of a given object, recursively accounting for all parent rotations.

Definition at line 167 of file Entity.cpp.

float Entity::GetWorldScale ( void  ) const

Get the absolute scale of a given object, recursively accounting for all parent scales.

Definition at line 185 of file Entity.cpp.

void Entity::SetRotation ( D3DXQUATERNION  rot)

Rotate this entity, in its parent entity's coordinate space, by rot.

Definition at line 203 of file Entity.cpp.

void Entity::SetRotation ( float  yaw,
float  pitch,
float  roll 
)

Rotate this entity, in its parent entity's coordinate space, by yaw, pitch, and roll in radians.

Definition at line 213 of file Entity.cpp.


Member Data Documentation

D3DXVECTOR3 Entity::location

Offset relative to parent entity space.

Definition at line 116 of file Entity.h.

D3DXQUATERNION Entity::rotation

Rotation relative to parent.

Definition at line 117 of file Entity.h.

Scale relative to parent.

Definition at line 118 of file Entity.h.


The documentation for this class was generated from the following files: