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>

Inheritance diagram for Vector3< V >:

Inheritance graph
[legend]
Collaboration diagram for Vector3< V >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void serialize (In *in, Out *out)
 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 16 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>
virtual void Vector3< V >::serialize In in,
Out out
[inline, virtual]
 

Implements Streamable.

Definition at line 18 of file Vector3.h.

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 43 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 60 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 72 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 84 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 96 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 109 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 116 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 123 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 132 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 140 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 147 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 156 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 165 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 173 of file Vector3.h.

Referenced by SlamSelfLocator::execute(), and Vector3< int >::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 180 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 189 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 196 of file Vector3.h.

Referenced by GT2005TeamBallLocator::calcRepresentativeParticleContainer().

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

normalize this vector.

Returns:
the normalized vector.

Definition at line 206 of file Vector3.h.


Member Data Documentation

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

The vector values.

Definition at line 27 of file Vector3.h.

Referenced by BallPercept::addHighRes(), GT2005SensorDataProcessor::buildPSDPercept(), GT2005TeamBallLocator::calcRepresentativeParticleContainer(), Geometry::calculateAnglesForPoint(), GT2005Polygon::calculateCenterOfMass(), GT2005WalkingEngine::calculateData(), GT2005HeadPathPlanner::calculateHeadTiming(), GT2005BallLocator::calculatePanningVelocityValue(), Geometry::calculatePointByAngles(), Geometry::calculatePointOnField(), GT2005HeadControl::calibrateHeadSpeed(), GT2005Polygon::copy(), VLCImageProcessor::execute(), SlamImageProcessor::execute(), GT2005ImageProcessor::execute(), ColorTable64::getBoxAroundColorClass(), ColorTable32K::getBoxAroundColorClass(), VLCFlagSpecialist::getFlagPercept(), SlamFlagSpecialist::getFlagPercept(), GT2005FlagSpecialist::getFlagPercept(), GT2005HeadControl::getSensorHeadAngles(), GT2005HeadPathPlanner::headPositionReached(), GT2005Polygon::mirrorY(), GTWalkParametersIndividual::mutate(), Vector3< int >::operator *(), Matrix3x3< int >::operator *(), Vector3< int >::operator+=(), Vector3< int >::operator-=(), Vector3< int >::operator=(), LA::Vector::operator=(), Vector3< int >::operator==(), operator>>(), Vector3< int >::operator^(), GT2005ImageProcessor::pixelBelowHorizon(), GT2005WalkingEngine::readDebugData(), GT2005WalkingEngine::readResampleData(), GT2005Polygon::rotateX(), GT2005Polygon::rotateXP(), GT2005Polygon::rotateY(), GT2005Polygon::rotateYP(), GT2005Polygon::rotateZ(), GT2005Polygon::rotateZC(), GT2005Polygon::rotateZP(), GT2005Polygon::scaleX(), GT2005Polygon::scaleY(), GT2005Parameters::setBasicPolygons(), and GT2005HeadControl::simpleLookAtPointOnField().

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

The vector values.

Definition at line 27 of file Vector3.h.

Referenced by BallPercept::addHighRes(), VLCBeaconDetector::analyzeColorTable(), SlamBeaconDetector::analyzeColorTable(), GT2005BeaconDetector::analyzeColorTable(), GT2005SensorDataProcessor::buildPSDPercept(), GT2005TeamBallLocator::calcRepresentativeParticleContainer(), Geometry::calculateAnglesForPoint(), GT2005Polygon::calculateCenterOfMass(), GT2005WalkingEngine::calculateData(), GT2005HeadPathPlanner::calculateHeadTiming(), GT2005BallLocator::calculatePanningVelocityValue(), Geometry::calculatePointByAngles(), Geometry::calculatePointOnField(), GT2005HeadControl::calibrateHeadSpeed(), GT2005Polygon::copy(), VLCImageProcessor::execute(), SlamImageProcessor::execute(), GT2005ImageProcessor::execute(), ColorTable64::getBoxAroundColorClass(), ColorTable32K::getBoxAroundColorClass(), VLCFlagSpecialist::getFlagPercept(), SlamFlagSpecialist::getFlagPercept(), GT2005FlagSpecialist::getFlagPercept(), GT2005HeadControl::getSensorHeadAngles(), GT2005HeadControl::headPositionDistanceToActualPosition(), GT2005HeadPathPlanner::headPositionReached(), GT2005Polygon::mirrorY(), GTWalkParametersIndividual::mutate(), Vector3< int >::operator *(), Matrix3x3< int >::operator *(), Vector3< int >::operator+=(), Vector3< int >::operator-=(), Vector3< int >::operator=(), LA::Vector::operator=(), Vector3< int >::operator==(), operator>>(), Vector3< int >::operator^(), GT2005ImageProcessor::pixelBelowHorizon(), GT2005WalkingEngine::readDebugData(), GT2005WalkingEngine::readResampleData(), GT2005Polygon::rotateX(), GT2005Polygon::rotateXP(), GT2005Polygon::rotateY(), GT2005Polygon::rotateYP(), GT2005Polygon::rotateZ(), GT2005Polygon::rotateZC(), GT2005Polygon::rotateZP(), GT2005Polygon::scaleX(), GT2005Polygon::scaleY(), GT2005Parameters::setBasicPolygons(), VLCBeaconDetector::setBestColorTable(), GT2005HeadControl::simpleLookAtPointOnField(), and Matrix3x3< int >::transpose().

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

The vector values.

Definition at line 27 of file Vector3.h.

Referenced by VLCBallSpecialist::addBallPercept(), GT2005BallSpecialist::addBallPercept(), BallPercept::addHighRes(), GT2005SensorDataProcessor::buildPSDPercept(), GT2005TeamBallLocator::calcRepresentativeParticleContainer(), Geometry::calculateAnglesForPoint(), GT2005Polygon::calculateCenterOfMass(), GT2005WalkingEngine::calculateData(), GT2005HeadPathPlanner::calculateHeadTiming(), Geometry::calculatePointByAngles(), Geometry::calculatePointOnField(), GT2005HeadControl::calibrateHeadSpeed(), GT2005Polygon::copy(), VLCImageProcessor::execute(), SlamImageProcessor::execute(), GT2005ImageProcessor::execute(), ColorTable64::getBoxAroundColorClass(), ColorTable32K::getBoxAroundColorClass(), GT2005HeadControl::getSensorHeadAngles(), GT2005HeadPathPlanner::headPositionReached(), GT2005Polygon::mirrorY(), GTWalkParametersIndividual::mutate(), Vector3< int >::operator *(), Matrix3x3< int >::operator *(), Vector3< int >::operator+=(), Vector3< int >::operator-=(), Vector3< int >::operator=(), LA::Vector::operator=(), Vector3< int >::operator==(), operator>>(), Vector3< int >::operator^(), GT2005WalkingEngine::readDebugData(), GT2005WalkingEngine::readResampleData(), GT2005Polygon::rotateX(), GT2005Polygon::rotateXP(), GT2005Polygon::rotateY(), GT2005Polygon::rotateYP(), GT2005Polygon::rotateZ(), GT2005Polygon::rotateZC(), GT2005Polygon::rotateZP(), GT2005Polygon::scaleX(), GT2005Polygon::scaleY(), GT2005Parameters::setBasicPolygons(), GT2005HeadControl::simpleLookAtPointFixNeckTilt(), GT2005HeadControl::simpleLookAtPointRelativeToRobot(), Matrix3x3< int >::transpose(), and Parcour::update().


The documentation for this class was generated from the following file:
Generated on Mon Mar 20 22:22:20 2006 for GT2005 by doxygen 1.3.6