|
ORTS
|
Two Dimensional Vector. More...
#include <ST_ForceField.H>
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 | |
Two Dimensional Vector.
Definition at line 71 of file ST_ForceField.H.
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.
Definition at line 77 of file ST_ForceField.H.
Project the vector onto the line defined by the given vector.
Definition at line 1562 of file ST_ForceField.C.
Referenced by SimpleTerrain::ST_ForceField::get_line_repulsion(), project_onto(), and SimpleTerrain::ST_ForceField::restrict_vector().
| real8 Vec_2D::length | ( | void | ) | const |
Definition at line 1566 of file ST_ForceField.C.
Referenced by SimpleTerrain::ST_ForceField::add_move_command(), SimpleTerrain::ST_ForceField::get_attractor(), SimpleTerrain::ST_ForceField::get_forcefield_target(), SimpleTerrain::ST_ForceField::get_line_repulsion(), SimpleTerrain::ST_ForceField::get_point_repulsion(), and SimpleTerrain::ST_ForceField::get_push_target().
Definition at line 1576 of file ST_ForceField.C.
References round().
Referenced by SimpleTerrain::ST_ForceField::add_move_command(), SimpleTerrain::ST_ForceField::get_attractor(), SimpleTerrain::ST_ForceField::get_forcefield_target(), SimpleTerrain::ST_ForceField::get_line_repulsion(), SimpleTerrain::ST_ForceField::get_point_repulsion(), and project_onto().
| bool Vec_2D::operator!= | ( | const Vec_2D & | other | ) | const |
Definition at line 1584 of file ST_ForceField.C.
Definition at line 1554 of file ST_ForceField.C.
| bool Vec_2D::operator== | ( | const Vec_2D & | other | ) | const |
Definition at line 1580 of file ST_ForceField.C.
Vector subtraction.
Definition at line 1571 of file ST_ForceField.C.
References dot_prod(), and multiply().
Referenced by SimpleTerrain::ST_ForceField::restrict_vector().
Definition at line 87 of file ST_ForceField.H.
Definition at line 73 of file ST_ForceField.H.
Referenced by SimpleTerrain::ST_ForceField::add_move_command(), dot_prod(), SimpleTerrain::ST_ForceField::get_attractor(), SimpleTerrain::ST_ForceField::get_forcefield_target(), SimpleTerrain::ST_ForceField::get_point_repulsion(), SimpleTerrain::ST_ForceField::get_push_target(), operator+(), operator-(), operator==(), and SimpleTerrain::ST_ForceField::restrict_vector().
x-coord
Definition at line 74 of file ST_ForceField.H.
Referenced by SimpleTerrain::ST_ForceField::add_move_command(), dot_prod(), SimpleTerrain::ST_ForceField::get_attractor(), SimpleTerrain::ST_ForceField::get_forcefield_target(), SimpleTerrain::ST_ForceField::get_point_repulsion(), SimpleTerrain::ST_ForceField::get_push_target(), operator+(), operator-(), operator==(), and SimpleTerrain::ST_ForceField::restrict_vector().