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

Vector3< V > Class Template Reference

This class represents a 3-vector. More...

#include <Vector3.h>

Collaboration diagram for Vector3< V >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Vector3 ()
 Default constructor 4 gcc.

 Vector3 (V x, V y, V z)
 Default constructor.

Vector3< V > & operator= (const Vector3< V > &other)
 Assignment operator.

 Vector3 (const Vector3< V > &other)
 Copy constructor.

Vector3< V > & operator+= (const Vector3< V > &other)
 Addition of another vector to this one.

Vector3< V > & operator-= (const Vector3< V > &other)
 Substraction of this vector from another one.

Vector3< V > & operator *= (const V &factor)
 Multiplication of this vector by a factor.

Vector3< V > & operator/= (const V &factor)
 Division of this vector by a factor.

Vector3< V > operator+ (const Vector3< V > &other) const
 Addition of another vector to this one.

Vector3< V > operator- (const Vector3< V > &other) const
 Subtraction of another vector to this one.

operator * (const Vector3< V > &other) const
 Inner product of this vector and another one.

Vector3< V > operator * (const V &factor) const
 Multiplication of this vector by a factor.

Vector3< V > operator/ (const V &factor) const
 Division of this vector by a factor.

bool operator== (const Vector3< V > &other) const
 Comparison of another vector with this one.

bool operator!= (const Vector3< V > &other) const
 Comparison of another vector with this one.

V & operator[] (int i)
 array-like member access.

abs () const
 Calculation of the length of this vector.

Vector3< V > operator^ (const Vector3< V > &other)
 Crossproduct of this vector and another vector.

Vector3< V > & operator^= (const Vector3< V > &other)
 Crossproduct of this vector and another vector.

Vector3< V > normalize (V len)
 normalize this vector.

Vector3< V > normalize ()
 normalize this vector.


Public Attributes

x
 The vector values.

y
 The vector values.

z
 The vector values.


Detailed Description

template<class V>
class Vector3< V >

This class represents a 3-vector.

Definition at line 15 of file Vector3.h.


Constructor & Destructor Documentation

template<class V>
Vector3< V >::Vector3  )  [inline]
 

Default constructor 4 gcc.

template<class V>
Vector3< V >::Vector3 x,
y,
z
[inline]
 

Default constructor.

template<class V>
Vector3< V >::Vector3 const Vector3< V > &  other  )  [inline]
 

Copy constructor.

Parameters:
other The other vector that is copied to this one


Member Function Documentation

template<class V>
Vector3<V>& Vector3< V >::operator= const Vector3< V > &  other  )  [inline]
 

Assignment operator.

Parameters:
other The other vector that is assigned to this one
Returns:
A reference to this object after the assignment.

Definition at line 34 of file Vector3.h.

template<class V>
Vector3<V>& Vector3< V >::operator+= const Vector3< V > &  other  )  [inline]
 

Addition of another vector to this one.

Parameters:
other The other vector that will be added to this one
Returns:
A reference to this object after the calculation.

Definition at line 51 of file Vector3.h.

template<class V>
Vector3<V>& Vector3< V >::operator-= const Vector3< V > &  other  )  [inline]
 

Substraction of this vector from another one.

Parameters:
other The other vector this one will be substracted from
Returns:
A reference to this object after the calculation.

Definition at line 63 of file Vector3.h.

template<class V>
Vector3<V>& Vector3< V >::operator *= const V &  factor  )  [inline]
 

Multiplication of this vector by a factor.

Parameters:
factor The factor this vector is multiplied by
Returns:
A reference to this object after the calculation.

Definition at line 75 of file Vector3.h.

template<class V>
Vector3<V>& Vector3< V >::operator/= const V &  factor  )  [inline]
 

Division of this vector by a factor.

Parameters:
factor The factor this vector is divided by
Returns:
A reference to this object after the calculation.

Definition at line 87 of file Vector3.h.

template<class V>
Vector3<V> Vector3< V >::operator+ const Vector3< V > &  other  )  const [inline]
 

Addition of another vector to this one.

Parameters:
other The other vector that will be added to this one
Returns:
A new object that contains the result of the calculation.

Definition at line 100 of file Vector3.h.

template<class V>
Vector3<V> Vector3< V >::operator- const Vector3< V > &  other  )  const [inline]
 

Subtraction of another vector to this one.

Parameters:
other The other vector that will be added to this one
Returns:
A new object that contains the result of the calculation.

Definition at line 107 of file Vector3.h.

template<class V>
V Vector3< V >::operator * const Vector3< V > &  other  )  const [inline]
 

Inner product of this vector and another one.

Parameters:
other The other vector this one will be multiplied by
Returns:
The inner product.

Definition at line 114 of file Vector3.h.

template<class V>
Vector3<V> Vector3< V >::operator * const V &  factor  )  const [inline]
 

Multiplication of this vector by a factor.

Parameters:
factor The factor this vector is multiplied by
Returns:
A new object that contains the result of the calculation.

Definition at line 123 of file Vector3.h.

template<class V>
Vector3<V> Vector3< V >::operator/ const V &  factor  )  const [inline]
 

Division of this vector by a factor.

Parameters:
factor The factor this vector is divided by
Returns:
A new object that contains the result of the calculation.

Definition at line 131 of file Vector3.h.

template<class V>
bool Vector3< V >::operator== const Vector3< V > &  other  )  const [inline]
 

Comparison of another vector with this one.

Parameters:
other The other vector that will be compared to this one
Returns:
Whether the two vectors are equal.

Definition at line 138 of file Vector3.h.

template<class V>
bool Vector3< V >::operator!= const Vector3< V > &  other  )  const [inline]
 

Comparison of another vector with this one.

Parameters:
other The other vector that will be compared to this one
Returns:
Whether the two vectors are unequal.

Definition at line 147 of file Vector3.h.

template<class V>
V& Vector3< V >::operator[] int  i  )  [inline]
 

array-like member access.

Parameters:
i index of coordinate
Returns:
reference to x, y or z

Definition at line 156 of file Vector3.h.

template<class V>
V Vector3< V >::abs  )  const [inline]
 

Calculation of the length of this vector.

Returns:
The length.

Definition at line 164 of file Vector3.h.

Referenced by Vector3< double >::normalize().

template<class V>
Vector3<V> Vector3< V >::operator^ const Vector3< V > &  other  )  [inline]
 

Crossproduct of this vector and another vector.

Parameters:
other The factor this vector is multiplied with.
Returns:
A new object that contains the result of the calculation.

Definition at line 171 of file Vector3.h.

template<class V>
Vector3<V>& Vector3< V >::operator^= const Vector3< V > &  other  )  [inline]
 

Crossproduct of this vector and another vector.

Parameters:
other The factor this vector is multiplied with.
Returns:
A reference to this object after the calculation.

Definition at line 180 of file Vector3.h.

template<class V>
Vector3<V> Vector3< V >::normalize len  )  [inline]
 

normalize this vector.

Parameters:
len The length, the vector should be normalized to, default=1.
Returns:
the normalized vector.

Definition at line 187 of file Vector3.h.

template<class V>
Vector3<V> Vector3< V >::normalize  )  [inline]
 

normalize this vector.

Returns:
the normalized vector.

Definition at line 196 of file Vector3.h.


Member Data Documentation

template<class V>
V Vector3< V >::x
 

The vector values.

Definition at line 18 of file Vector3.h.

Referenced by RasterImageProcessor::addFlag(), GT2004SensorDataProcessor::buildPSDPercept(), Geometry::calculateAnglesForPoint(), GT2004HeadPathPlanner::calculateHeadTiming(), Geometry::calculatePointByAngles(), Geometry::calculatePointOnField(), RBridgeSpecialist::calculatePointOnField(), BoxSpecialist::calculatePointOnField(), GT2004HeadControl::calibrateHeadSpeed(), GT2004ImageProcessor::execute(), CheckerboardDetector::execute(), ColorTable64::getBoxAroundColorClass(), ColorTable32K::getBoxAroundColorClass(), GT2004FlagSpecialist::getFlagPercept(), MotionRecognition::getPixelFlow(), GT2004HeadControl::getSensorHeadAngles(), GT2004BallLocator::handleSeenBall(), GT2004HeadPathPlanner::headPositionReached(), Vector3< double >::operator *(), Matrix3x3< double >::operator *(), Vector3< double >::operator+=(), Vector3< double >::operator-=(), Vector3< double >::operator=(), Vector3< double >::operator==(), operator>>(), Vector3< double >::operator^(), GT2004HeadControl::simpleLookAtPointOnField(), and BB2004InvKinWalkingEngine::updateOdometry().

template<class V>
V Vector3< V >::y
 

The vector values.

Definition at line 18 of file Vector3.h.

Referenced by RasterImageProcessor::addFlag(), GT2004BeaconDetector::analyzeColorTable(), GT2004SensorDataProcessor::buildPSDPercept(), Geometry::calculateAnglesForPoint(), GT2004HeadPathPlanner::calculateHeadTiming(), Geometry::calculatePointByAngles(), Geometry::calculatePointOnField(), RBridgeSpecialist::calculatePointOnField(), BoxSpecialist::calculatePointOnField(), GT2004HeadControl::calibrateHeadSpeed(), GT2004ImageProcessor::execute(), CheckerboardDetector::execute(), ColorTable64::getBoxAroundColorClass(), ColorTable32K::getBoxAroundColorClass(), GT2004FlagSpecialist::getFlagPercept(), MotionRecognition::getPixelFlow(), GT2004HeadControl::getSensorHeadAngles(), GT2004BallLocator::handleSeenBall(), GT2004HeadControl::headPositionDistanceToActualPosition(), GT2004HeadPathPlanner::headPositionReached(), Vector3< double >::operator *(), Matrix3x3< double >::operator *(), Vector3< double >::operator+=(), Vector3< double >::operator-=(), Vector3< double >::operator=(), Vector3< double >::operator==(), operator>>(), Vector3< double >::operator^(), GT2004HeadControl::simpleLookAtPointOnField(), Matrix3x3< double >::transpose(), and BB2004InvKinWalkingEngine::updateOdometry().

template<class V>
V Vector3< V >::z
 

The vector values.

Definition at line 18 of file Vector3.h.

Referenced by GT2004BallSpecialist::addBallPercept(), GT2004SensorDataProcessor::buildPSDPercept(), Geometry::calculateAnglesForPoint(), GT2004HeadPathPlanner::calculateHeadTiming(), Geometry::calculatePointByAngles(), Geometry::calculatePointOnField(), RBridgeSpecialist::calculatePointOnField(), BoxSpecialist::calculatePointOnField(), GT2004HeadControl::calibrateHeadSpeed(), GT2004ImageProcessor::execute(), ColorTable64::getBoxAroundColorClass(), ColorTable32K::getBoxAroundColorClass(), MotionRecognition::getPixelFlow(), GT2004HeadControl::getSensorHeadAngles(), GT2004HeadPathPlanner::headPositionReached(), Vector3< double >::operator *(), Matrix3x3< double >::operator *(), Vector3< double >::operator+=(), Vector3< double >::operator-=(), Vector3< double >::operator=(), Vector3< double >::operator==(), operator>>(), Vector3< double >::operator^(), GT2004HeadControl::simpleLookAtPointFixNeckTilt(), GT2004HeadControl::simpleLookAtPointRelativeToRobot(), Matrix3x3< double >::transpose(), and Parcour::update().


The documentation for this class was generated from the following file:
Generated on Thu Sep 23 20:12:11 2004 for GT2004 by doxygen 1.3.6