claw 1.9.0
 
Loading...
Searching...
No Matches
claw::math::coordinate_traits< claw::math::coordinate_2d< T > > Struct Template Reference

Specialization of the coordinate_traits for claw::math::coordinate_2d. More...

#include <coordinate_traits.hpp>

Public Types

typedef claw::math::coordinate_2d< T > coordinate_type
 The type of the coordinate.
 
typedef coordinate_type::value_type value_type
 The type of the components of the coordinate.
 

Static Public Member Functions

static value_type get_x (const coordinate_type &c)
 Get the component of a coordinate on the x-axis.
 
static value_type get_y (const coordinate_type &c)
 Get the component of a coordinate on the y-axis.
 
static coordinate_type make_coordinate (value_type x, value_type y)
 Create a new coordinate from with the components sets to the provided values.
 

Detailed Description

template<typename T>
struct claw::math::coordinate_traits< claw::math::coordinate_2d< T > >

Specialization of the coordinate_traits for claw::math::coordinate_2d.

Author
Julien Jorge

Definition at line 55 of file coordinate_traits.hpp.

Member Typedef Documentation

◆ coordinate_type

template<typename T>
typedef claw::math::coordinate_2d<T> claw::math::coordinate_traits< claw::math::coordinate_2d< T > >::coordinate_type

The type of the coordinate.

Definition at line 58 of file coordinate_traits.hpp.

◆ value_type

The type of the components of the coordinate.

Definition at line 61 of file coordinate_traits.hpp.

Member Function Documentation

◆ get_x()

template<typename T>
static value_type claw::math::coordinate_traits< claw::math::coordinate_2d< T > >::get_x ( const coordinate_type & c)
inlinestatic

Get the component of a coordinate on the x-axis.

Parameters
cThe coordinate from which the component is taken.

Definition at line 67 of file coordinate_traits.hpp.

◆ get_y()

template<typename T>
static value_type claw::math::coordinate_traits< claw::math::coordinate_2d< T > >::get_y ( const coordinate_type & c)
inlinestatic

Get the component of a coordinate on the y-axis.

Parameters
cThe coordinate from which the component is taken.

Definition at line 76 of file coordinate_traits.hpp.

◆ make_coordinate()

template<typename T>
static coordinate_type claw::math::coordinate_traits< claw::math::coordinate_2d< T > >::make_coordinate ( value_type x,
value_type y )
inlinestatic

Create a new coordinate from with the components sets to the provided values.

Parameters
xThe position on the x axis.
yThe position on the y axis.

Definition at line 87 of file coordinate_traits.hpp.


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