LibreCAD
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
helpermethods.h
Go to the documentation of this file.
1
//
2
// Created by R. van Twisk on 4/27/16.
3
//
4
5
#pragma once
6
7
#include <
cad/geometry/geocoordinate.h
>
8
#include <vector>
9
10
#include <Eigen/Core>
11
#include <Eigen/Dense>
12
13
namespace
lc
{
18
class
HelperMethods
{
19
public
:
20
template
<
typename
T>
21
static
std::vector<T>
transform2d
(
const
std::vector<T> &in,
22
double
xx,
23
double
yx,
24
double
xy,
25
double
yy,
26
double
x0,
27
double
y0) {
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
}
38
39
};
40
}
lc::HelperMethods::transform2d
static std::vector< T > transform2d(const std::vector< T > &in, double xx, double yx, double xy, double yy, double x0, double y0)
Definition:
helpermethods.h:21
lc
Definition:
cadentity.h:12
lc::HelperMethods
Definition:
helpermethods.h:18
geocoordinate.h
lckernel
cad
math
helpermethods.h
Generated on Mon Jun 18 2018 14:02:07 for LibreCAD by
1.8.8