claw 1.9.0
 
Loading...
Searching...
No Matches
claw::math::vector_2d< T > Class Template Reference

Two dimensional vector. More...

#include <vector_2d.hpp>

Inheritance diagram for claw::math::vector_2d< T >:
Collaboration diagram for claw::math::vector_2d< T >:

Public Types

typedef T value_type
 The type of the values we store.
 
typedef vector_2d< value_typeself_type
 The type of the current class.
 
typedef coordinate_2d< value_typesuper
 The type of the parent class.
 
- Public Types inherited from claw::math::coordinate_2d< T >
typedef T value_type
 The type of the values we store.
 
typedef coordinate_2d< value_typeself_type
 The type of the current class.
 

Public Member Functions

template<class U>
 vector_2d (const coordinate_2d< U > &that)
 
template<class U>
 vector_2d (const coordinate_2d< U > &p1, const coordinate_2d< U > &p2)
 
 vector_2d (const value_type &_x, const value_type &_y)
 
value_type length () const
 
void normalize ()
 
self_type get_orthonormal_clockwise () const
 
self_type get_orthonormal_anticlockwise () const
 
value_type dot_product (const self_type &vect) const
 
- Public Member Functions inherited from claw::math::coordinate_2d< T >
template<typename U>
 coordinate_2d (const coordinate_2d< U > &that)
 
 coordinate_2d (const value_type &_x, const value_type &_y)
 
template<typename U>
coordinate_2d< U > cast_value_type_to () const
 
void set (const value_type &_x, const value_type &_y)
 
value_type distance (const self_type &p) const
 
void rotate (const self_type &center, double angle)
 
double slope_angle (const self_type &to) const
 
bool operator== (const self_type &vect) const
 
bool operator!= (const self_type &vect) const
 
self_type operator+ (const self_type &vect) const
 
self_type operator- (const self_type &vect) const
 
self_typeoperator+= (const self_type &vect)
 
self_typeoperator-= (const self_type &vect)
 
self_type operator* (const value_type &v) const
 
self_type operator/ (const value_type &v) const
 
self_typeoperator*= (const value_type &v)
 
self_typeoperator/= (const value_type &v)
 

Additional Inherited Members

- Public Attributes inherited from claw::math::coordinate_2d< T >
value_type x
 X-coordinate.
 
value_type y
 Y-coordinate.
 

Detailed Description

template<class T>
class claw::math::vector_2d< T >

Two dimensional vector.

Author
Julien Jorge

Definition at line 44 of file vector_2d.hpp.

Member Typedef Documentation

◆ self_type

template<class T>
typedef vector_2d<value_type> claw::math::vector_2d< T >::self_type

The type of the current class.

Definition at line 51 of file vector_2d.hpp.

◆ super

template<class T>
typedef coordinate_2d<value_type> claw::math::vector_2d< T >::super

The type of the parent class.

Definition at line 54 of file vector_2d.hpp.

◆ value_type

template<class T>
typedef T claw::math::vector_2d< T >::value_type

The type of the values we store.

Definition at line 48 of file vector_2d.hpp.


The documentation for this class was generated from the following file: