ProtoZed  awesome branch
A simple but powerful game framework
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
PZ::Position2D Class Reference
Inheritance diagram for PZ::Position2D:
PZ::Component PZ::NonCopyable PZ::PropertyList PZ::EventHandler

Public Member Functions

 Position2D ()
 
 ~Position2D ()
 
virtual void Init ()
 Initializes the component.
 
const Vector2f GetPosition (Scope::Level scope=Scope::LOCAL) const
 
void SetPosition (const Vector2f &newPos, Scope::Level scope=Scope::LOCAL)
 
void SetPosition (float newX, float newY, Scope::Level scope=Scope::LOCAL)
 
void SetX (float newX, Scope::Level scope=Scope::LOCAL)
 
void SetY (float newY, Scope::Level scope=Scope::LOCAL)
 
void Move (const Vector2f &dPos, Scope::Level scope=Scope::LOCAL)
 
void Move (float dX, float dY, Scope::Level scope=Scope::LOCAL)
 
float GetDepth () const
 
void SetDepth (float newDepth)
 
void MoveDepth (float dDepth)
 
Angle::Degrees GetRotation (Scope::Level scope=Scope::LOCAL) const
 
void SetRotation (Angle::Degrees newRotation, Scope::Level scope=Scope::LOCAL)
 
void Rotate (Angle::Degrees angle, Scope::Level scope=Scope::LOCAL)
 
const Vector2f GetScale (Scope::Level scope=Scope::LOCAL) const
 
void SetScale (const Vector2f &newScale, Scope::Level scope=Scope::LOCAL)
 
void SetScale (float scaleX, float scaleY, Scope::Level scope=Scope::LOCAL)
 
void SetScaleX (float scaleX, Scope::Level scope=Scope::LOCAL)
 
void SetScaleY (float scaleY, Scope::Level scope=Scope::LOCAL)
 
void Scale (const Vector2f &dScale, Scope::Level scope=Scope::LOCAL)
 
void Scale (float dX, float dY, Scope::Level scope=Scope::LOCAL)
 
bool GetInheritAxes () const
 
void SetInheritAxes (bool inherit)
 
bool GetInheritPosition () const
 
void SetInheritPosition (bool inherit)
 
bool GetInheritRotation () const
 
void SetInheritRotation (bool inherit)
 
bool GetInheritScale () const
 
void SetInheritScale (bool inherit)
 
Vector2f ConvertGlobalToLocal (const Vector2f &position) const
 
Vector2f ConvertLocalToGlobal (const Vector2f &position) const
 
- Public Member Functions inherited from PZ::Component
virtual ~Component ()
 
virtual void Destroy ()
 Destroys the component.
 
virtual void Update (float deltaTime)
 Runs an update.
 
ApplicationGetApplication () const
 
EntityID GetOwnerID () const
 
MetaEntity GetOwnerEntity () const
 
EntityManagerGetManager () const
 
const TimestampGetTimestamp () const
 Gets the timestamp for when this component was last updated.
 
- Public Member Functions inherited from PZ::PropertyList
 PropertyList ()
 
virtual ~PropertyList ()
 
bool AddProperty (PropertyBase &prop)
 
bool RemoveProperty (const std::string &name)
 
void ClearProperties ()
 
bool HasProperty (const std::string &name) const
 
PropertyBaseGetProperty (const std::string &name)
 
const PropertyBaseGetProperty (const std::string &name) const
 
template<typename T >
Property< T > & GetProperty (const std::string &name)
 
template<typename T >
const Property< T > & GetProperty (const std::string &name) const
 
const PropertyMapGetAllProperties () const
 
- Public Member Functions inherited from PZ::EventHandler
 EventHandler ()
 
virtual ~EventHandler ()
 
bool SubscribeTo (EventHandler &handler)
 
bool UnsubscribeTo (EventHandler &handler)
 
template<class T , class EventT >
bool RegisterEvent (T *obj, void(T::*memFn)(EventT &))
 
template<class T , class EventT >
bool UnregisterEvent (T *obj, void(T::*memFn)(EventT &))
 
void HandleEvent (const Event &e)
 
void EmitEvent (const Event &e) const
 

Static Public Attributes

static const HashString Family
 

Protected Member Functions

virtual void PropertyUpdated (const PropertyBase &prop)
 
- Protected Member Functions inherited from PZ::Component
 Component ()
 Default constructor.
 
void UpdateTimestamp ()
 
- Protected Member Functions inherited from PZ::NonCopyable
 NonCopyable ()
 

Constructor & Destructor Documentation

PZ::Position2D::Position2D ( )
PZ::Position2D::~Position2D ( )

Member Function Documentation

Vector2f PZ::Position2D::ConvertGlobalToLocal ( const Vector2f position) const
Vector2f PZ::Position2D::ConvertLocalToGlobal ( const Vector2f position) const
float PZ::Position2D::GetDepth ( ) const
inline
bool PZ::Position2D::GetInheritAxes ( ) const
inline
bool PZ::Position2D::GetInheritPosition ( ) const
inline
bool PZ::Position2D::GetInheritRotation ( ) const
inline
bool PZ::Position2D::GetInheritScale ( ) const
inline
const Vector2f PZ::Position2D::GetPosition ( Scope::Level  scope = Scope::LOCAL) const
Angle::Degrees PZ::Position2D::GetRotation ( Scope::Level  scope = Scope::LOCAL) const
const Vector2f PZ::Position2D::GetScale ( Scope::Level  scope = Scope::LOCAL) const
virtual void PZ::Position2D::Init ( )
virtual

Initializes the component.

You should not call this method. It will be called by EntityManager.

Reimplemented from PZ::Component.

void PZ::Position2D::Move ( const Vector2f dPos,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::Move ( float  dX,
float  dY,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::MoveDepth ( float  dDepth)
inline
virtual void PZ::Position2D::PropertyUpdated ( const PropertyBase prop)
protectedvirtual

Reimplemented from PZ::Component.

void PZ::Position2D::Rotate ( Angle::Degrees  angle,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::Scale ( const Vector2f dScale,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::Scale ( float  dX,
float  dY,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::SetDepth ( float  newDepth)
inline
void PZ::Position2D::SetInheritAxes ( bool  inherit)
inline
void PZ::Position2D::SetInheritPosition ( bool  inherit)
inline
void PZ::Position2D::SetInheritRotation ( bool  inherit)
inline
void PZ::Position2D::SetInheritScale ( bool  inherit)
inline
void PZ::Position2D::SetPosition ( const Vector2f newPos,
Scope::Level  scope = Scope::LOCAL 
)
void PZ::Position2D::SetPosition ( float  newX,
float  newY,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::SetRotation ( Angle::Degrees  newRotation,
Scope::Level  scope = Scope::LOCAL 
)
void PZ::Position2D::SetScale ( const Vector2f newScale,
Scope::Level  scope = Scope::LOCAL 
)
void PZ::Position2D::SetScale ( float  scaleX,
float  scaleY,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::SetScaleX ( float  scaleX,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::SetScaleY ( float  scaleY,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::SetX ( float  newX,
Scope::Level  scope = Scope::LOCAL 
)
inline
void PZ::Position2D::SetY ( float  newY,
Scope::Level  scope = Scope::LOCAL 
)
inline

Member Data Documentation

const HashString PZ::Position2D::Family
static

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