Skeletal Animation Multithread Face
utils.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <sstream>
5#include <vector>
6#include <algorithm>
7#include <math.h>
8#include <fstream>
9#include <eigen3/Eigen/Dense>
10
12
16class Utils
17{
18public:
21
23 template <typename T>
24 struct Range
25 {
26 T min, max;
27 };
28
30 inline static double deg2rad(double deg) { return (deg * (M_PI / 180.0)); }
31
33 static std::vector<int> analog_str_buf_to_int_vec(const std::string& str);
34
36 static std::vector<double> analog_str_buf_to_double_vec(const std::string& str);
37
39 static Eigen::MatrixXd load_matrix_data(std::string filename);
40};
Class Utils.
Definition: utils.h:17
static Eigen::MatrixXd load_matrix_data(std::string filename)
Load Eigen double matrix from csv file.
Definition: utils.cpp:59
Utils()
Constructor.
static std::vector< double > analog_str_buf_to_double_vec(const std::string &str)
Convert comma-delimited string to double vector of analog values.
Definition: utils.cpp:34
static std::vector< int > analog_str_buf_to_int_vec(const std::string &str)
Convert comma-delimited string to int vector of analog values.
Definition: utils.cpp:9
static double deg2rad(double deg)
Convert degrees to rad.
Definition: utils.h:30
Range stucture.
Definition: utils.h:25