26 #include "../../range.h"
34 template < std::
size_t N >
43 for ( std::size_t
const i :
range(
N ) )
44 ( *this )[i] += other[i];
52 for ( std::size_t
const i :
range(
N ) )
53 ( *this )[i] -= other[i];
60 template < std::
size_t N >
66 template < std::
size_t N >
73 template < std::
size_t N >
76 for ( std::size_t
const i :
range(
N ) )
83 template < std::
size_t N >
92 template < std::
size_t N >
101 template < std::
size_t N >
110 template < std::
size_t N >
113 auto tmp =
sum(
range(
N ), [&]( std::size_t i ) {
119 template < std::
size_t N >
125 template < std::
size_t N >
126 inline std::vector< point< N > >
129 std::vector< point< N > >
res;
132 for ( std::size_t i :
range( ipath.size() - 1 ) ) {
136 std::size_t
const seg_steps = std::size_t{
distance_of( from, to ) / d_step };
137 for ( std::size_t
const j :
range( seg_steps ) )
138 res.push_back(
lin_interp( from, to,
float( j ) /
float( seg_steps ) ) );
140 res.push_back( ipath.back() );
148 template < std::
size_t N >
Class implementing multidimensional point in coordinate system of dimension N.
Definition: point.h:36
constexpr point< N > & operator-=(vector< N > const &other)
-= operator subtracts value of 'i'th coordinate of 'other' from 'this', for all 0 <= i < N
Definition: point.h:50
constexpr point< N > & operator+=(vector< N > const &other)
+= operator adds value of 'i'th coordinate from 'other' to 'this', for all 0 <= i < N
Definition: point.h:41
Definition: vec_point_base.h:35
std::vector< T, allocator< T > > vector
Definition: aliases.h:54
MIT License.
Definition: impl.h:31
constexpr point< N > point_cast(vector< N > const &v)
Definition: point.h:61
constexpr float dot(quaternion const &q, quaternion const &s)
Definition: quaternion.h:101
constexpr point< N > operator+(point< N > a, vector< N > const &b)
Returns a result of addition a to b, viz += operator.
Definition: point.h:93
constexpr T sum(Container &&cont, UnaryCallable &&f=std::identity(), T init={})
Applies f(x) to each item of container 'cont', returns the sum of all the return values of each call ...
Definition: algorithm.h:250
constexpr auto sqrt(physical_quantity< Len, Mass, Time, Current, Temp, Mol, Li, Angle, Byte > val)
Square root of physical quantity is square root of it's value and the exponents are divided in half.
Definition: physical_quantity.h:215
constexpr point< N > operator*(point< N > a, point< N > const &b)
Multiplication of points multiplies each coordinate of A by coordinate of B on same dimension.
Definition: point.h:74
constexpr float point_angle(point< N > const &a, point< N > const &b)
Definition: point.h:120
constexpr pose lin_interp(pose const &from, pose const &goal, float factor)
linear interpolation between base se and goal pose, with factor 0 'base' is returned,...
Definition: pose.h:114
constexpr auto pow(physical_quantity< Len, Mass, Time, Current, Temp, Mol, Li, Angle, Byte > val)
Power of physical quantity is power of root of it's value and the exponents are multiplied by the val...
Definition: physical_quantity.h:247
T res
Definition: algorithm.h:505
std::vector< point< N > > lineary_interpolate_path(std::vector< point< N > > const &ipath, float d_step)
Definition: point.h:127
constexpr float vector_angle(vector< N > const &a, vector< N > const &b)
Definition: vector.h:80
constexpr vector< N > vector_cast(point< N > const &p)
Definition: point.h:67
constexpr vector< N > operator-(point< N > a, point< N > const &b)
Returns a result of subtraction of A from B, viz -= operator.
Definition: point.h:84
constexpr float axis_projection_distance(point< N > const &a, vector< N > const &axis_direction)
Function to calculate distance of projection of point A.
Definition: point.h:149
constexpr float distance_of(line< N > const &l, point< N > const &p)
Definition: line.h:41
constexpr view< iterators::numeric_iterator< Numeric > > range(Numeric from, Numeric to)
Builds numeric view over interval [from, to)
Definition: range.h:34
N
Definition: static_storage.h:97