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

2D line between two points with intersection methods. More...

#include <Line2d.h>

List of all members.

Public Member Functions

f32 getAngleWith (const line2d &l)
f32 getLength () const
vector2d getUnitVector ()
vector2d getVector () const
 line2d (const line2d &other)
 line2d (f32 xa, f32 ya, f32 xb, f32 yb)
 line2d (const vector2d &nstart, const vector2d &nend)
 line2d ()
bool operator!= (const line2d &other) const
line2d operator+ (const vector2d &point) const
line2doperator+= (const vector2d &point)
line2d operator- (const vector2d &point) const
line2doperator-= (const vector2d &point)
bool operator== (const line2d &other) const
void set (const vector2d &nstart, const vector2d &nend)
void set (const line2d &other)
void set (const f32 &xa, const f32 &ya, const f32 &xb, const f32 &yb)

Public Attributes

vector2d end
vector2d start

Detailed Description

2D line between two points with intersection methods.


Constructor & Destructor Documentation

core::line2d::line2d ( )

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

core::line2d::line2d ( f32  xa,
f32  ya,
f32  xb,
f32  yb 
)
core::line2d::line2d ( const vector2d nstart,
const vector2d nend 
)
core::line2d::line2d ( const line2d other)

Member Function Documentation

f32 core::line2d::getAngleWith ( const line2d l)
f32 core::line2d::getLength ( ) const

Returns length of line

Returns:
Returns length of line.

References end, core::vector2d::getDistanceFrom(), and start.

Referenced by getUnitVector().

vector2d core::line2d::getUnitVector ( )

Returns unit vector of the line.

Returns:
Returns unit vector of this line.

References end, getLength(), start, core::vector2d::X, and core::vector2d::Y.

vector2d core::line2d::getVector ( ) const

Returns the vector of the line.

Returns:
Returns the vector of the line.

References end, start, core::vector2d::X, and core::vector2d::Y.

Referenced by getAngleWith().

bool core::line2d::operator!= ( const line2d other) const

References end, and start.

line2d core::line2d::operator+ ( const vector2d point) const

References end, line2d(), and start.

line2d & core::line2d::operator+= ( const vector2d point)

References end, and start.

line2d core::line2d::operator- ( const vector2d point) const

References end, line2d(), and start.

line2d & core::line2d::operator-= ( const vector2d point)

References end, and start.

bool core::line2d::operator== ( const line2d other) const

References end, and start.

void core::line2d::set ( const vector2d nstart,
const vector2d nend 
)

References end, core::vector2d::set(), and start.

void core::line2d::set ( const f32 xa,
const f32 ya,
const f32 xb,
const f32 yb 
)

References end, core::vector2d::set(), and start.

void core::line2d::set ( const line2d other)

References end, core::vector2d::set(), and start.


Member Data Documentation


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)