Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

base::Vector2 Class Reference

Collaboration diagram for base::Vector2:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Coords { X = 1, Y = 2, Coords2D = 3 }

Public Member Functions

 Vector2 ()
 Vector2 (Real xc, Real yc)
 Vector2 (const Vector2 &v)
 ~Vector2 ()
void setZero () throw ()
Reale (Int i) throw ()
const Reale (Int i) const throw ()
Realat (Int i) throw (std::out_of_range)
const Realat (Int i) const throw (std::out_of_range)
Vector2operator= (const Vector2 &src) throw ()
bool operator== (const Vector2 &v) const throw ()
bool equals (const Vector2 &v, Real epsilon=consts::epsilon) const throw ()
Real magnitude () const throw ()
Real length () const throw ()
Vector2negate () throw ()
Vector2normalize ()
Real magNormalize ()
Real dot (const Vector2 &p) const throw ()
Vector2operator+= (const Vector2 &v2) throw ()
Vector2operator-= (const Vector2 &v2) throw ()
Vector2operator *= (const Real &s) throw ()
Vector2operator/= (const Real &s)
const Realc_array () const
Realc_array ()

Public Attributes

Real x
Real y

Member Enumeration Documentation

enum base::Vector2::Coords
 

Enumeration values:
X 
Y 
Coords2D 

Definition at line 48 of file Vector2.


Constructor & Destructor Documentation

base::Vector2::Vector2  )  [inline]
 

Definition at line 43 of file Vector2.

References base::Real, and y.

base::Vector2::Vector2 Real  xc,
Real  yc
[inline]
 

Definition at line 44 of file Vector2.

References base::Real, and y.

base::Vector2::Vector2 const Vector2 v  )  [inline]
 

Definition at line 45 of file Vector2.

References operator=().

base::Vector2::~Vector2  )  [inline]
 

Definition at line 46 of file Vector2.


Member Function Documentation

const Real& base::Vector2::at Int  i  )  const throw (std::out_of_range) [inline]
 

Definition at line 67 of file Vector2.

References Exception, base::Int, base::Real, and y.

Real& base::Vector2::at Int  i  )  throw (std::out_of_range) [inline]
 

Definition at line 59 of file Vector2.

References Exception, base::Int, base::Real, and y.

Real* base::Vector2::c_array  )  [inline]
 

Definition at line 132 of file Vector2.

References base::Real.

const Real* base::Vector2::c_array  )  const [inline]
 

Definition at line 131 of file Vector2.

References base::Real.

Real base::Vector2::dot const Vector2 p  )  const throw () [inline]
 

Definition at line 115 of file Vector2.

References base::Real, and y.

Referenced by base::dot().

const Real& base::Vector2::e Int  i  )  const throw () [inline]
 

Definition at line 56 of file Vector2.

References base::Int, base::Real, and y.

Real& base::Vector2::e Int  i  )  throw () [inline]
 

Definition at line 53 of file Vector2.

References base::Int, base::Real, and y.

bool base::Vector2::equals const Vector2 v,
Real  epsilon = consts::epsilon
const throw () [inline]
 

Definition at line 92 of file Vector2.

References base::equals(), base::Real, and y.

Real base::Vector2::length  )  const throw () [inline]
 

Definition at line 103 of file Vector2.

References magnitude(), and base::Real.

Referenced by magNormalize(), and normalize().

Real base::Vector2::magnitude  )  const throw () [inline]
 

Definition at line 100 of file Vector2.

References base::Real, base::sqrt(), and y.

Referenced by length().

Real base::Vector2::magNormalize  )  [inline]
 

Definition at line 112 of file Vector2.

References length(), base::Real, and y.

Vector2& base::Vector2::negate  )  throw () [inline]
 

Definition at line 106 of file Vector2.

References y.

Vector2& base::Vector2::normalize  )  [inline]
 

Definition at line 109 of file Vector2.

References length(), base::Real, and y.

Vector2& base::Vector2::operator *= const Real s  )  throw () [inline]
 

Definition at line 125 of file Vector2.

References base::Real, and y.

Vector2& base::Vector2::operator+= const Vector2 v2  )  throw () [inline]
 

Definition at line 119 of file Vector2.

References y.

Vector2& base::Vector2::operator-= const Vector2 v2  )  throw () [inline]
 

Definition at line 122 of file Vector2.

References y.

Vector2& base::Vector2::operator/= const Real s  )  [inline]
 

Definition at line 128 of file Vector2.

References base::Real, and y.

Vector2& base::Vector2::operator= const Vector2 src  )  throw () [inline]
 

Definition at line 76 of file Vector2.

References y.

Referenced by Vector2().

bool base::Vector2::operator== const Vector2 v  )  const throw () [inline]
 

Definition at line 85 of file Vector2.

References y.

void base::Vector2::setZero  )  throw () [inline]
 

Definition at line 50 of file Vector2.

References base::Real, and y.


Member Data Documentation

Real base::Vector2::x
 

Definition at line 135 of file Vector2.

Referenced by base::operator<<(), and robot::sim::SimulatedRobot::PlatformControlInterface::setOutput().

Real base::Vector2::y
 

Definition at line 135 of file Vector2.

Referenced by at(), dot(), e(), equals(), magnitude(), magNormalize(), negate(), normalize(), operator *=(), operator+=(), operator-=(), operator/=(), base::operator<<(), operator=(), operator==(), robot::sim::SimulatedRobot::PlatformControlInterface::setOutput(), setZero(), and Vector2().


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:39:33 2004 for OpenSim by doxygen 1.3.6