GLbody.h
Go to the documentation of this file.
1 #ifndef __GLBODY_H__
2 #define __GLBODY_H__
3 
4 #include <vector>
5 #include <boost/function.hpp>
6 #include <hrpModel/Body.h>
7 #include "GLlink.h"
8 
9 class GLcamera;
10 
11 class GLbody : virtual public hrp::Body
12 {
13 public:
14  GLbody();
15  ~GLbody();
16  void setPosture(const double *i_angles);
17  void setPosition(double x, double y, double z);
18  template<class T>
19  void setPosition(const T &p){
20  ((GLlink *)rootLink())->setPosition(p);
21  }
22  void setRotation(const double *R);
23  void setRotation(double r, double p, double y);
24  void setPosture(const double *i_angles, double *i_pos, double *i_rpy);
25  void setPosture(const hrp::dvector& i_q, const hrp::Vector3& i_p,
26  const hrp::Matrix33& i_R);
27  size_t draw();
28  void drawSensor(hrp::Sensor *i_sensor);
29  GLcamera *findCamera(const char *i_name);
30  void setSensorDrawCallback(boost::function2<void, hrp::Body *, hrp::Sensor *> f);
31  boost::function2<void, hrp::Body *, hrp::Sensor *> getSensorDrawCallback();
32  void divideLargeTriangles(double maxEdgeLen);
33  void computeAABB(hrp::Vector3& o_min, hrp::Vector3& o_max);
34  static void useAbsTransformToDraw();
35 
36 private:
38  boost::function2<void, hrp::Body *, hrp::Sensor *> m_sensorDrawCallback;
39 };
40 
41 #endif
size_t draw()
Definition: GLbody.cpp:59
Link * rootLink() const
void setPosition(const T &p)
Definition: GLbody.h:19
void divideLargeTriangles(double maxEdgeLen)
Definition: GLbody.cpp:94
void setPosition(double x, double y, double z)
Definition: GLbody.cpp:27
boost::function2< void, hrp::Body *, hrp::Sensor * > m_sensorDrawCallback
Definition: GLbody.h:38
~GLbody()
Definition: GLbody.cpp:18
boost::function2< void, hrp::Body *, hrp::Sensor * > getSensorDrawCallback()
Definition: GLbody.cpp:89
static bool m_useAbsTransformToDraw
Definition: GLbody.h:37
Eigen::VectorXd dvector
void computeAABB(hrp::Vector3 &o_min, hrp::Vector3 &o_max)
Definition: GLbody.cpp:102
Definition: GLbody.h:11
Eigen::Vector3d Vector3
void setRotation(const double *R)
Definition: GLbody.cpp:37
Eigen::Matrix3d Matrix33
GLcamera * findCamera(const char *i_name)
Definition: GLbody.cpp:71
static void useAbsTransformToDraw()
Definition: GLbody.cpp:9
void setPosture(const double *i_angles)
Definition: GLbody.cpp:21
void setSensorDrawCallback(boost::function2< void, hrp::Body *, hrp::Sensor *> f)
Definition: GLbody.cpp:84
void drawSensor(hrp::Sensor *i_sensor)
Definition: GLbody.cpp:79
GLbody()
Definition: GLbody.cpp:14


hrpsys
Author(s): AIST, Fumio Kanehiro
autogenerated on Sat Dec 17 2022 03:52:20