YAPOG  0.0.1
Yet Another Pokemon Online Game
yap::WorldObject Class Reference

#include <WorldObject.hpp>

Inheritance diagram for yap::WorldObject:
Collaboration diagram for yap::WorldObject:

List of all members.

Public Member Functions

virtual ~WorldObject ()
const IDGetID () const
void SetID (const ID &id)
void SetCollidableArea (CollidableArea *collidableArea)
void AddPhysicsBoundingBox (BoundingBox *boundingBox)
void RemovePhysicsBoundingBox (BoundingBox *boundingBox)
bool CollidesWith (const CollidableArea &collidableArea, const Vector2 &offset) const
void AdjustCollidablePosition (ICollidable &collidable) const
 Moves the ICollidable collidable to this WorldObject position. To call once when adding the ICollidable to this WorldObject.
ISpatial members.
virtual const Vector2GetPosition () const
 Gets the coordinates in pixels of the origin of this ISpatial from the global origin.
virtual const Vector2GetSize () const
 Gets the size in pixels of this ISpatial.
virtual const Vector2GetTopLeft () const
virtual const Vector2GetBottomRight () const
virtual const Vector2GetCenter () const
virtual const FloatRectGetRectangle () const
virtual void Move (const Vector2 &offset)
virtual void Scale (const Vector2 &factor)
virtual void SetPosition (const Vector2 &position)
virtual void SetSize (const Vector2 &size)
ISpatial3 members.
virtual const int & GetZ () const
 Gets the highness of this ISpatial3.
virtual void SetZ (int z)
 Sets the highness of this ISpatial3.
virtual const int & GetH () const
 Gets the height of this ISpatial3.
virtual void SetH (int h)
 Sets the height of this ISpatial3.
ICollidable members.
virtual bool CollidesWith (const ICollidable &other) const
virtual bool CollidesWith (const ICollidable &other, const Vector2 &offset) const
ICloneable members.
virtual WorldObjectClone () const
- Public Member Functions inherited from yap::ICollidable
virtual ~ICollidable ()
- Public Member Functions inherited from yap::ISpatial3
virtual ~ISpatial3 ()
- Public Member Functions inherited from yap::ISpatial
virtual ~ISpatial ()
- Public Member Functions inherited from yap::IIDLoadable
virtual ~IIDLoadable ()
- Public Member Functions inherited from yap::ICloneable
virtual ~ICloneable ()

Protected Member Functions

 WorldObject (const ID &id)
 WorldObject (const WorldObject &copy)
const
PhysicsBoundingBoxCollection
GetPhysicsBoundingBoxes () const
virtual void HandleSetCollidableArea (CollidableArea *collidableArea)
virtual Vector2 HandleGetSize () const
virtual void HandleMove (const Vector2 &offset)
virtual void HandleScale (const Vector2 &factor)
virtual void HandleSetZ (int z)
virtual void HandleSetH (int h)

Private Member Functions

 DISALLOW_ASSIGN (WorldObject)

Private Attributes

ID id_
Spatial3Info spatial3Info_
PhysicsBoundingBoxCollection physicsBoundingBoxes_

Detailed Description

Definition at line 17 of file WorldObject.hpp.


Constructor & Destructor Documentation

yap::WorldObject::~WorldObject ( )
virtual

Definition at line 14 of file WorldObject.cpp.

yap::WorldObject::WorldObject ( const ID id)
explicitprotected

Definition at line 7 of file WorldObject.cpp.

yap::WorldObject::WorldObject ( const WorldObject copy)
protected

Definition at line 18 of file WorldObject.cpp.


Member Function Documentation

void yap::WorldObject::AddPhysicsBoundingBox ( BoundingBox boundingBox)

Definition at line 42 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::AdjustCollidablePosition ( ICollidable collidable) const

Moves the ICollidable collidable to this WorldObject position. To call once when adding the ICollidable to this WorldObject.

Parameters:
collidableThe ICollidable whose to adjust the position.

Definition at line 177 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool yap::WorldObject::CollidesWith ( const CollidableArea collidableArea,
const Vector2 offset 
) const

Definition at line 54 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool yap::WorldObject::CollidesWith ( const ICollidable other) const
virtual

Implements yap::ICollidable.

Definition at line 159 of file WorldObject.cpp.

Here is the call graph for this function:

bool yap::WorldObject::CollidesWith ( const ICollidable other,
const Vector2 offset 
) const
virtual

Implements yap::ICollidable.

Definition at line 164 of file WorldObject.cpp.

Here is the call graph for this function:

yap::WorldObject::DISALLOW_ASSIGN ( WorldObject  )
private
const Vector2 & yap::WorldObject::GetBottomRight ( ) const
virtual
Warning:
Temporary.

Implements yap::ISpatial.

Definition at line 78 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const Vector2 & yap::WorldObject::GetCenter ( ) const
virtual
Warning:
Temporary.

Implements yap::ISpatial.

Definition at line 86 of file WorldObject.cpp.

Here is the call graph for this function:

const int & yap::WorldObject::GetH ( ) const
virtual

Gets the height of this ISpatial3.

Returns:
The height of this ISpatial3.

Implements yap::ISpatial3.

Definition at line 147 of file WorldObject.cpp.

Here is the call graph for this function:

const ID & yap::WorldObject::GetID ( ) const

Definition at line 25 of file WorldObject.cpp.

const PhysicsBoundingBoxCollection & yap::WorldObject::GetPhysicsBoundingBoxes ( ) const
protected

Definition at line 172 of file WorldObject.cpp.

const Vector2 & yap::WorldObject::GetPosition ( ) const
virtual

Gets the coordinates in pixels of the origin of this ISpatial from the global origin.

Returns:
The coordinates in pixels of the origin of this ISpatial from the global origin.

Implements yap::ISpatial.

Definition at line 61 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const sf::FloatRect & yap::WorldObject::GetRectangle ( ) const
virtual
Warning:
Temporary.

Implements yap::ISpatial.

Definition at line 94 of file WorldObject.cpp.

Here is the call graph for this function:

const Vector2 & yap::WorldObject::GetSize ( ) const
virtual

Gets the size in pixels of this ISpatial.

Returns:
The size in pixels of this ISpatial.

Implements yap::ISpatial.

Definition at line 66 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const Vector2 & yap::WorldObject::GetTopLeft ( ) const
virtual

Implements yap::ISpatial.

Definition at line 73 of file WorldObject.cpp.

Here is the call graph for this function:

const int & yap::WorldObject::GetZ ( ) const
virtual

Gets the highness of this ISpatial3.

Returns:
The highness of this ISpatial3.

Implements yap::ISpatial3.

Definition at line 135 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Vector2 yap::WorldObject::HandleGetSize ( ) const
protectedvirtual

Reimplemented in ycl::DestructibleObject, ycl::Character, and ycl::MapElement.

Definition at line 186 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::HandleMove ( const Vector2 offset)
protectedvirtual

Reimplemented in yap::DynamicWorldObject, ycl::DestructibleObject, ycl::OpenBattleSpawnerArea, ycl::Character, and ycl::MapElement.

Definition at line 191 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::HandleScale ( const Vector2 factor)
protectedvirtual

Reimplemented in yap::DynamicWorldObject.

Definition at line 196 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::HandleSetCollidableArea ( CollidableArea collidableArea)
protectedvirtual

Reimplemented in yap::DynamicWorldObject.

Definition at line 182 of file WorldObject.cpp.

Here is the caller graph for this function:

void yap::WorldObject::HandleSetH ( int  h)
protectedvirtual

Reimplemented in yap::DynamicWorldObject.

Definition at line 206 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::HandleSetZ ( int  z)
protectedvirtual

Reimplemented in yap::DynamicWorldObject.

Definition at line 201 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::Move ( const Vector2 offset)
virtual

Implements yap::ISpatial.

Definition at line 102 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::RemovePhysicsBoundingBox ( BoundingBox boundingBox)

Definition at line 49 of file WorldObject.cpp.

Here is the call graph for this function:

void yap::WorldObject::Scale ( const Vector2 factor)
virtual

Implements yap::ISpatial.

Definition at line 112 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::SetCollidableArea ( CollidableArea collidableArea)

Definition at line 35 of file WorldObject.cpp.

Here is the call graph for this function:

void yap::WorldObject::SetH ( int  h)
virtual

Sets the height of this ISpatial3.

Parameters:
hHeight of this ISpatial3.

Implements yap::ISpatial3.

Definition at line 152 of file WorldObject.cpp.

Here is the call graph for this function:

void yap::WorldObject::SetID ( const ID id)

Definition at line 30 of file WorldObject.cpp.

void yap::WorldObject::SetPosition ( const Vector2 position)
virtual

Implements yap::ISpatial.

Definition at line 122 of file WorldObject.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void yap::WorldObject::SetSize ( const Vector2 size)
virtual

Implements yap::ISpatial.

Definition at line 127 of file WorldObject.cpp.

Here is the call graph for this function:

void yap::WorldObject::SetZ ( int  z)
virtual

Sets the highness of this ISpatial3.

Parameters:
zHighness of this ISpatial3.

Implements yap::ISpatial3.

Definition at line 140 of file WorldObject.cpp.

Here is the call graph for this function:


Member Data Documentation

ID yap::WorldObject::id_
private

Definition at line 100 of file WorldObject.hpp.

PhysicsBoundingBoxCollection yap::WorldObject::physicsBoundingBoxes_
private

Definition at line 104 of file WorldObject.hpp.

Spatial3Info yap::WorldObject::spatial3Info_
mutableprivate

Definition at line 102 of file WorldObject.hpp.


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