ORTS

SimpleTerrain::Vec_2D Class Reference

Two Dimensional Vector. More...

#include <ST_ForceField.H>

List of all members.

Public Member Functions

 Vec_2D (sint4 x_=0, sint4 y_=0)
 y-coord
 Vec_2D (const Vec_2D &other)
 Vec_2D (const Loc &a, const Loc &b)
Vec_2D operator+ (const Vec_2D &other) const
Vec_2D operator- (const Vec_2D &other) const
 Vector addition.
Vec_2D project_onto (const Vec_2D &other) const
 Vector subtraction.
sint4 dot_prod (const Vec_2D &other) const
 Project the vector onto the line defined by the given vector.
real8 length () const
Vec_2D multiply (real8 k) const
bool operator== (const Vec_2D &other) const
bool operator!= (const Vec_2D &other) const

Static Public Member Functions

static sint4 round (real8 real)

Public Attributes

sint4 x
sint4 y
 x-coord

Detailed Description

Two Dimensional Vector.

Definition at line 71 of file ST_ForceField.H.


Constructor & Destructor Documentation

SimpleTerrain::Vec_2D::Vec_2D ( sint4  x_ = 0,
sint4  y_ = 0 
) [inline]

y-coord

Definition at line 75 of file ST_ForceField.H.

SimpleTerrain::Vec_2D::Vec_2D ( const Vec_2D other) [inline]

Definition at line 76 of file ST_ForceField.H.

SimpleTerrain::Vec_2D::Vec_2D ( const Loc a,
const Loc b 
) [inline]

Definition at line 77 of file ST_ForceField.H.


Member Function Documentation

sint4 Vec_2D::dot_prod ( const Vec_2D other) const

Project the vector onto the line defined by the given vector.

Definition at line 1562 of file ST_ForceField.C.

References x, and y.

Referenced by SimpleTerrain::ST_ForceField::get_line_repulsion(), project_onto(), and SimpleTerrain::ST_ForceField::restrict_vector().

bool Vec_2D::operator!= ( const Vec_2D other) const

Definition at line 1584 of file ST_ForceField.C.

Vec_2D Vec_2D::operator+ ( const Vec_2D other) const

Definition at line 1554 of file ST_ForceField.C.

References x, and y.

Vec_2D Vec_2D::operator- ( const Vec_2D other) const

Vector addition.

Definition at line 1558 of file ST_ForceField.C.

References x, and y.

bool Vec_2D::operator== ( const Vec_2D other) const

Definition at line 1580 of file ST_ForceField.C.

References x, and y.

Vec_2D Vec_2D::project_onto ( const Vec_2D other) const

Vector subtraction.

Definition at line 1571 of file ST_ForceField.C.

References dot_prod(), and multiply().

Referenced by SimpleTerrain::ST_ForceField::restrict_vector().

static sint4 SimpleTerrain::Vec_2D::round ( real8  real) [inline, static]

Definition at line 87 of file ST_ForceField.H.


Member Data Documentation


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


Generated on Fri May 18 2012 03:03:14 for ORTS by Doxygen1.7.3