LibreCAD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lc::HelperMethods Class Reference

#include <helpermethods.h>

Static Public Member Functions

template<typename T >
static std::vector< T > transform2d (const std::vector< T > &in, double xx, double yx, double xy, double yy, double x0, double y0)
 

Detailed Description

Temporary class to do work on std::vector of Coordinates I expect this to be replaced at some stage to something better

Definition at line 18 of file helpermethods.h.

Member Function Documentation

template<typename T >
static std::vector<T> lc::HelperMethods::transform2d ( const std::vector< T > &  in,
double  xx,
double  yx,
double  xy,
double  yy,
double  x0,
double  y0 
)
inlinestatic

Definition at line 21 of file helpermethods.h.

27  {
28  // TODO
29  // you can transform all points at once, essentially by using a Eigen::Map<const Eigen::Matrix<double, 2, Eigen::Dynamic> >,
30  // initialized with the address of the first coordinate of the first element of the vector
31 
32  std::vector<T> out;
33  for (auto c : in) {
34  out.emplace_back(c.transform2d(xx, yx, xy, yy, x0, y0));
35  }
36  return out;
37  }

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