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

Common implementation of an ICamera. More...

#include <Camera.hpp>

Inheritance diagram for yap::Camera:
Collaboration diagram for yap::Camera:

List of all members.

Public Member Functions

 Camera (const Vector2 &position, const Vector2 &size)
virtual ~Camera ()
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 sf::FloatRect & GetRectangle () 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)
ICamera members.
virtual bool IsInView (const Vector2 &point) const
virtual bool IsInView (const Vector2 &point, const Vector2 &size) const
virtual Vector2 ToLocal (const Vector2 &globalPoint) const
virtual Vector2 ToGlobal (const Vector2 &localPoint) const
virtual const sf::View & GetInnerView () const
virtual Event< ICamera
&, const Vector2 & > & 
OnMovedEvent () const
- Public Member Functions inherited from yap::ICamera
virtual ~ICamera ()
- Public Member Functions inherited from yap::ISpatial
virtual ~ISpatial ()

Public Attributes

Event< ICamera &, const Vector2 & > OnMoved

Protected Member Functions

virtual bool HandleIsInView (const Vector2 &point, const Vector2 &size) const
virtual Vector2 HandleToLocal (const Vector2 &globalPoint) const
virtual Vector2 HandleToGlobal (const Vector2 &localPoint) const

Private Member Functions

 DISALLOW_COPY (Camera)

Private Attributes

SpatialInfo spatialInfo_
sf::View view_

Detailed Description

Common implementation of an ICamera.

Definition at line 13 of file Camera.hpp.


Constructor & Destructor Documentation

yap::Camera::Camera ( const Vector2 position,
const Vector2 size 
)

Definition at line 5 of file Camera.cpp.

yap::Camera::~Camera ( )
virtual

Definition at line 11 of file Camera.cpp.


Member Function Documentation

yap::Camera::DISALLOW_COPY ( Camera  )
private
const Vector2 & yap::Camera::GetBottomRight ( ) const
virtual

Implements yap::ISpatial.

Definition at line 30 of file Camera.cpp.

Here is the call graph for this function:

const Vector2 & yap::Camera::GetCenter ( ) const
virtual

Implements yap::ISpatial.

Definition at line 35 of file Camera.cpp.

Here is the call graph for this function:

const sf::View & yap::Camera::GetInnerView ( ) const
virtual

Implements yap::ICamera.

Definition at line 97 of file Camera.cpp.

const Vector2 & yap::Camera::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 15 of file Camera.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const sf::FloatRect & yap::Camera::GetRectangle ( ) const
virtual

Implements yap::ISpatial.

Definition at line 40 of file Camera.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const Vector2 & yap::Camera::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 20 of file Camera.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements yap::ISpatial.

Definition at line 25 of file Camera.cpp.

Here is the call graph for this function:

bool yap::Camera::HandleIsInView ( const Vector2 point,
const Vector2 size 
) const
protectedvirtual

Definition at line 107 of file Camera.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Vector2 yap::Camera::HandleToGlobal ( const Vector2 localPoint) const
protectedvirtual

Definition at line 117 of file Camera.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Vector2 yap::Camera::HandleToLocal ( const Vector2 globalPoint) const
protectedvirtual

Definition at line 112 of file Camera.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool yap::Camera::IsInView ( const Vector2 point) const
virtual

Implements yap::ICamera.

Definition at line 77 of file Camera.cpp.

bool yap::Camera::IsInView ( const Vector2 point,
const Vector2 size 
) const
virtual

Implements yap::ICamera.

Definition at line 82 of file Camera.cpp.

Here is the call graph for this function:

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

Implements yap::ISpatial.

Definition at line 45 of file Camera.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Event< ICamera &, const Vector2 & > & yap::Camera::OnMovedEvent ( ) const
virtual

Implements yap::ICamera.

Definition at line 102 of file Camera.cpp.

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

Implements yap::ISpatial.

Definition at line 54 of file Camera.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements yap::ISpatial.

Definition at line 64 of file Camera.cpp.

Here is the call graph for this function:

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

Implements yap::ISpatial.

Definition at line 69 of file Camera.cpp.

Here is the call graph for this function:

Vector2 yap::Camera::ToGlobal ( const Vector2 localPoint) const
virtual

Implements yap::ICamera.

Definition at line 92 of file Camera.cpp.

Here is the call graph for this function:

Vector2 yap::Camera::ToLocal ( const Vector2 globalPoint) const
virtual

Implements yap::ICamera.

Definition at line 87 of file Camera.cpp.

Here is the call graph for this function:


Member Data Documentation

Event<ICamera&, const Vector2&> yap::Camera::OnMoved
mutable

Definition at line 53 of file Camera.hpp.

SpatialInfo yap::Camera::spatialInfo_
private

Definition at line 66 of file Camera.hpp.

sf::View yap::Camera::view_
private

Definition at line 67 of file Camera.hpp.


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