11 m_useAbsTransformToDraw =
true;
22 for (
unsigned int i=0;
i<numLinks();
i++){
23 ((
GLlink *)link(
i))->setQ(i_angles[
i]);
29 ((
GLlink *)rootLink())->setPosition(x,y,z);
34 ((
GLlink *)rootLink())->setRotation(r,p,y);
39 ((
GLlink *)rootLink())->setRotation(R);
43 setPosition(i_pos[0], i_pos[1], i_pos[2]);
44 setRotation(i_rpy[0], i_rpy[1], i_rpy[2]);
51 double *tform = ((
GLlink *)rootLink())->getTransform();
52 tform[ 0]=i_R(0,0);tform[ 1]=i_R(1,0);tform[ 2]=i_R(2,0);tform[ 3]=0;
53 tform[ 4]=i_R(0,1);tform[ 5]=i_R(1,1);tform[ 6]=i_R(2,1);tform[ 7]=0;
54 tform[ 8]=i_R(0,2);tform[ 9]=i_R(1,2);tform[10]=i_R(2,2);tform[11]=0;
55 tform[12]=i_p[0];tform[13]=i_p[1];tform[14]=i_p[2];tform[15]=1;
56 setPosture(i_q.data());
61 if (m_useAbsTransformToDraw){
62 for (
unsigned int i=0;
i<numLinks();
i++){
63 ntri += ((
GLlink *)link(
i))->draw();
66 ntri = ((
GLlink *)rootLink())->draw();
72 for (
unsigned int i=0;
i<numLinks();
i++){
74 if (camera)
return camera;
81 if (m_sensorDrawCallback) m_sensorDrawCallback(
this, sensor);
86 m_sensorDrawCallback =
f;
91 return m_sensorDrawCallback;
96 for (
unsigned int i=0;
i<numLinks();
i++){
104 if (m_useAbsTransformToDraw){
106 for (
unsigned int i=0;
i<numLinks();
i++){
107 ((
GLlink *)link(
i))->computeAABB(mi,ma);
109 o_min = mi; o_max = ma;
111 for (
int j=0;
j<3;
j++){
112 if (o_min[
j] > mi[
j]) o_min[j] = mi[j];
113 if (o_max[j] < ma[j]) o_max[j] = ma[j];
void divideLargeTriangles(double maxEdgeLen)
void setPosition(double x, double y, double z)
void divideLargeTriangles(double maxEdgeLen)
boost::function2< void, hrp::Body *, hrp::Sensor * > getSensorDrawCallback()
static bool m_useAbsTransformToDraw
OpenHRP::matrix33 Matrix33
void computeAABB(hrp::Vector3 &o_min, hrp::Vector3 &o_max)
void setRotation(const double *R)
def j(str, encoding="cp932")
GLcamera * findCamera(const char *i_name)
static void useAbsTransformToDraw()
void setPosture(const double *i_angles)
void drawSensor(hrp::Sensor *i_sensor)
void setSensorDrawCallback(boost::function2< void, hrp::Body *, hrp::Sensor * > f)