RobWorkProject  24.5.15-
Vector2D.hpp File Reference
#include <rw/common/Serializable.hpp>
#include <Eigen/Core>

## Classes

class  Vector2D< T >
A 2D vector $$\mathbf{v}\in \mathbb{R}^2$$. More...

## Namespaces

rw
Deprecated namespace since 16/4-2020 for this class.

rw::math
Matrices, vectors, configurations, and more.

rw::common
Various utilities and definitions of general use.

rw::common::serialization
provide generic handler interface for serialization purposes. To enable serialization of some class MyClass one could either inherit from Serializable or provide overloaded methods to

## Typedefs

using Vector2Dd = Vector2D< double >

using Vector2Df = Vector2D< float >

## Functions

template<class T >
cross (const Vector2D< T > &v1, const Vector2D< T > &v2)
Calculates the 2D vector cross product $$\mathbf{v1} \times \mathbf{v2}$$. More...

template<class T >
double dot (const Vector2D< T > &v1, const Vector2D< T > &v2)
Calculates the dot product $$\mathbf{v1} . \mathbf{v2}$$. More...

template<class T >
double angle (const Vector2D< T > &v1, const Vector2D< T > &v2)
calculates the counter clock-wise angle from v1 to v2. the value returned will be in the interval [-2Pi,2Pi]

template<class T >
const Vector2D< T > normalize (const Vector2D< T > &v)
Returns the normalized vector $$\mathbf{n}=\frac{\mathbf{v}}{\|\mathbf{v}\|}$$. More...

template<class Q , class T >
const Vector2D< Q > cast (const Vector2D< T > &v)
Casts Vector2D<T> to Vector2D<Q> More...

template<>
void write (const rw::math::Vector2D< double > &sobject, rw::common::OutputArchive &oarchive, const std::string &id)

template<>
void write (const rw::math::Vector2D< float > &sobject, rw::common::OutputArchive &oarchive, const std::string &id)

template<>
void read (rw::math::Vector2D< double > &sobject, rw::common::InputArchive &iarchive, const std::string &id)

template<>
void read (rw::math::Vector2D< float > &sobject, rw::common::InputArchive &iarchive, const std::string &id)

template<class Archive , class T >
void serialize (Archive &archive, rw::math::Vector2D< T > &vector, const unsigned int version)
Boost serialization. More...

## ◆ serialize()

 void serialize ( Archive & archive, rw::math::Vector2D< T > & vector, const unsigned int version )

Boost serialization.

Parameters
 archive [in] the boost archive to read from or write to. vector [in/out] the vector to read/write. version [in] class version (currently version 0).