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

base::Vector4 Class Reference

Collaboration diagram for base::Vector4:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Coords {
  X = 1, Y = 2, Z = 3, W = 4,
  Coords3D = 5
}

Public Member Functions

 Vector4 ()
 Vector4 (Real xc, Real yc, Real zc, Real wc=Real(1))
 Vector4 (const Vector3 &v, Real w=Real(1))
 Vector4 (const Vector4 &v)
 ~Vector4 ()
void setZero () throw ()
Real & e (Int i) throw ()
const Real & e (Int i) const throw ()
Real & operator[] (Int i) throw ()
const Real & operator[] (Int i) const throw ()
Real & at (Int i) throw (std::out_of_range)
const Real & at (Int i) const throw (std::out_of_range)
Vector4 & operator= (const Vector4 &src) throw ()
bool operator== (const Vector4 &v) const throw ()
bool equals (const Vector4 &v) const throw ()
Real norm () const throw ()
Real magnitude () const throw ()
Real length () const throw ()
Vector4 & negate () throw ()
Vector4 & operator+= (const Vector4 &v2) throw ()
Vector4 & operator-= (const Vector4 &v2) throw ()
Vector4 & operator *= (const Real &s) throw ()
Vector4 & operator/= (const Real &s)
Real * c_array ()
Vector3 toVector3 () const

Public Attributes

Real x
Real y
Real z
Real w

Member Enumeration Documentation

enum base::Vector4::Coords
 

Enumeration values:
X 
Y 
Z 
W 
Coords3D 

Definition at line 48 of file Vector4.


Constructor & Destructor Documentation

base::Vector4::Vector4 (   )  [inline]
 

Definition at line 42 of file Vector4.

References base::Real.

base::Vector4::Vector4 (  Real  xc,
Real  yc,
Real  zc,
Real  wc = Real(1)
)  [inline]
 

Definition at line 43 of file Vector4.

References base::Real.

base::Vector4::Vector4 (  const Vector3 &  v,
Real  w = Real(1)
)  [inline]
 

Definition at line 44 of file Vector4.

References base::Real, base::Vector3::x, base::Vector3::y, and base::Vector3::z.

base::Vector4::Vector4 (  const Vector4 &  v  )  [inline]
 

Definition at line 45 of file Vector4.

References operator=().

base::Vector4::~Vector4 (   )  [inline]
 

Definition at line 46 of file Vector4.


Member Function Documentation

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

Definition at line 73 of file Vector4.

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

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

Definition at line 65 of file Vector4.

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

Real* base::Vector4::c_array (   )  [inline]
 

Definition at line 132 of file Vector4.

References base::Real.

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

Definition at line 56 of file Vector4.

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

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

Definition at line 53 of file Vector4.

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

bool base::Vector4::equals (  const Vector4 &  v  )  const throw () [inline]
 

Definition at line 99 of file Vector4.

References base::equals(), base::Vector3::x, base::Vector3::y, and base::Vector3::z.

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

Definition at line 113 of file Vector4.

References magnitude(), and base::Real.

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

Definition at line 110 of file Vector4.

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

Referenced by length().

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

Definition at line 117 of file Vector4.

Referenced by base::operator-().

Real base::Vector4::norm (   )  const throw () [inline]
 

Definition at line 107 of file Vector4.

References base::Real.

Referenced by magnitude().

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

Definition at line 126 of file Vector4.

References base::Real.

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

Definition at line 120 of file Vector4.

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

Definition at line 123 of file Vector4.

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

Definition at line 129 of file Vector4.

References base::Real.

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

Definition at line 82 of file Vector4.

Referenced by Vector4().

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

Definition at line 91 of file Vector4.

References base::Vector3::x, base::Vector3::y, and base::Vector3::z.

const Real& base::Vector4::operator[] (  Int  i  )  const throw () [inline]
 

Definition at line 62 of file Vector4.

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

Real& base::Vector4::operator[] (  Int  i  )  throw () [inline]
 

Definition at line 59 of file Vector4.

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

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

Definition at line 50 of file Vector4.

References base::Real.

Vector3 base::Vector4::toVector3 (   )  const [inline]
 

Definition at line 136 of file Vector4.

Referenced by robot::operator<<().


Member Data Documentation

Real base::Vector4::w
 

Definition at line 138 of file Vector4.

Referenced by base::operator<<(), and base::Quat4::rotatePoint().

Real base::Vector4::x
 

Definition at line 138 of file Vector4.

Referenced by base::operator *(), base::operator<<(), base::Quat4::rotate(), and base::Quat4::rotatePoint().

Real base::Vector4::y
 

Definition at line 138 of file Vector4.

Referenced by base::operator *(), base::operator<<(), base::Quat4::rotate(), and base::Quat4::rotatePoint().

Real base::Vector4::z
 

Definition at line 138 of file Vector4.

Referenced by base::operator *(), base::operator<<(), base::Quat4::rotate(), and base::Quat4::rotatePoint().


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