Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Public Attributes | Static Public Attributes
core::position2d Class Reference

Simple class for holding 2d coordinates. More...

#include <Position2d.h>

List of all members.

Public Member Functions

f32 getDistanceFrom (const position2d &other) const
 Returns distance from an other point.
f32 getDistanceFromSQ (const position2d &other) const
 Returns distance from an other point.
bool operator!= (const position2d &other) const
position2d operator+ (const position2d &other) const
position2doperator+= (const position2d &other)
position2d operator- (const position2d &other) const
position2doperator-= (const position2d &other)
position2doperator= (const position2d &other)
bool operator== (const position2d &other) const
 position2d (s32 x, s32 y)
 position2d ()
 position2d (const position2d &other)

Public Attributes

s32 X
s32 Y

Static Public Attributes

static const position2d ORIGIN_2D = position2d(0, 0)
 ORIGIN_2D is a const position2d that defines the 2d origin position for the 2d space.

Detailed Description

Simple class for holding 2d coordinates.


Constructor & Destructor Documentation

core::position2d::position2d ( )

Referenced by operator+(), and operator-().

core::position2d::position2d ( s32  x,
s32  y 
)
core::position2d::position2d ( const position2d other)

Member Function Documentation

f32 core::position2d::getDistanceFrom ( const position2d other) const

Returns distance from an other point.

References core::sqrt(), X, and Y.

f32 core::position2d::getDistanceFromSQ ( const position2d other) const

Returns distance from an other point.

References X, and Y.

bool core::position2d::operator!= ( const position2d other) const [inline]

References X, and Y.

position2d core::position2d::operator+ ( const position2d other) const [inline]

References position2d(), X, and Y.

position2d & core::position2d::operator+= ( const position2d other) [inline]

References X, and Y.

position2d core::position2d::operator- ( const position2d other) const [inline]

References position2d(), X, and Y.

position2d & core::position2d::operator-= ( const position2d other) [inline]

References X, and Y.

position2d & core::position2d::operator= ( const position2d other) [inline]

References X, and Y.

bool core::position2d::operator== ( const position2d other) const [inline]

References X, and Y.


Member Data Documentation

ORIGIN_2D is a const position2d that defines the 2d origin position for the 2d space.

Referenced by input::Cursor::Cursor().


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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:07 by Doxygen (1.7.4)