param.cpp
Go to the documentation of this file.
1 #include "param.hpp"
2 
3 using namespace quori_face;
4 using namespace quori_face_node;
5 
6 std::uint32_t quori_face_node::param(ros::NodeHandle &nh, const std::string &name, const std::uint32_t value)
7 {
8  int res = 0;
9  return nh.getParam(name, res) ? static_cast<std::uint32_t>(res) : value;
10 }
11 
12 double quori_face_node::param(ros::NodeHandle &nh, const std::string &name, const double value)
13 {
14  double res = 0;
15  return nh.getParam(name, res) ? res : value;
16 }
17 
19 {
20  bool res = false;
21  return nh.getParam(name, res) ? res : value;
22 }
23 
25 {
26  std::string res;
27  return nh.getParam(name, res) ? res : value;
28 }
29 
31 {
32  return SphericalCoordinate(
33  param(nh, name + "/theta", value.theta),
34  param(nh, name + "/psi", value.psi)
35  );
36 }
37 
39 {
41  ret.R = param(nh, name + "/R", value.R);
42  ret.r_m = param(nh, name + "/r_m", value.r_m);
43  ret.r_o = param(nh, name + "/r_o", value.r_o);
44  ret.h = param(nh, name + "/h", value.h);
45  ret.L = param(nh, name + "/L", value.L);
46  ret.epsilon = param(nh, name + "/epsilon", value.epsilon);
47  ret.delta = param(nh, name + "/delta", value.delta);
48  ret.screen_size = param(nh, name + "/screen_size", value.screen_size);
49  return ret;
50 }
quori_face::TransformStaticParameters::r_m
double r_m
Definition: transform.hpp:25
quori_face::TransformStaticParameters::epsilon
double epsilon
Definition: transform.hpp:45
ros::NodeHandle::getParam
bool getParam(const std::string &key, bool &b) const
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:790
quori_face::TransformStaticParameters::delta
Vector2< double > delta
Definition: transform.hpp:50
param.hpp
param
GLenum GLfloat param
Definition: glcorearb.h:252
value
GLsizei const GLfloat * value
Definition: glcorearb.h:800
quori_face
Definition: Cache.hpp:9
name
GLuint const GLchar * name
Definition: glcorearb.h:762
quori_face::SphericalCoordinate
Definition: transform.hpp:68
quori_face_node::param
std::uint32_t param(ros::NodeHandle &nh, const std::string &name, const std::uint32_t value)
Definition: param.cpp:6
quori_face::TransformStaticParameters::screen_size
Vector2< std::uint32_t > screen_size
Definition: transform.hpp:55
quori_face::TransformStaticParameters::h
double h
Definition: transform.hpp:35
quori_face_node
Definition: param.hpp:11
quori_face::TransformStaticParameters::L
double L
Definition: transform.hpp:40
quori_face::TransformStaticParameters
Definition: transform.hpp:15
quori_face::TransformStaticParameters::r_o
double r_o
Definition: transform.hpp:30
quori_face::TransformStaticParameters::R
double R
Definition: transform.hpp:20
ros::NodeHandle


quori_face
Author(s):
autogenerated on Wed Mar 2 2022 00:53:20