iCub-main
Loading...
Searching...
No Matches
bvhnodeend.h
Go to the documentation of this file.
1/*
2 * bvhnodeend.h
3 */
4
5/*
6 * Copyright (C) 2009 RobotCub Consortium
7 * Author: Alessandro Scalzo alessandro.scalzo@iit.it
8 * CopyPolicy: Released under the terms of the GNU GPL v2.0.
9 *
10 * Based on:
11 *
12 * Qavimator
13 * Copyright (C) 2006 by Zi Ree *
14 * Zi Ree @ SecondLife *
15 * Released under the terms of the GNU GPL v2.0.
16 */
17
18#ifndef BVHNODEEND_H
19#define BVHNODEEND_H
20
21#include "bvhnodedh.h"
22
23class BVHNodeEND : public BVHNodeDH
24{
25public:
26
27 BVHNodeEND(const QString& name,int n,double a,double d,double alpha,double theta0,iCubMesh* mesh=0)
28 : BVHNodeDH(name,n,a,d,alpha,theta0,mesh){}
29
30 virtual void drawJoint(){}
31
32 virtual void draw(double* encoders,BVHNode* pSelected)
33 {
34 glPushMatrix();
35
36 glRotated(dTheta0+encoders[nEnc],0.0,0.0,1.0);
37 glTranslated(dA,0.0,dD);
38
39 glColor4f(0.5,0.5,0.5,1.0);
40 glLineWidth(3.0);
41 glBegin(GL_LINES);
42 glVertex3d(0.0,0.0,0.0);
43 glVertex3d(-dA,0.0,-dD);
44 glEnd();
45
46 glRotated(dAlpha,1.0,0.0,0.0);
47
48 if (pMesh)
49 {
50 glColor4f(0.9,0.8,0.7,1.0);
51 pMesh->Draw();
52 }
53
54 drawArrows();
55
56 drawJoint();
57
58 glPopMatrix();
59 }
60};
61
62#endif
double dAlpha
Definition bvhnodedh.h:105
double dTheta0
Definition bvhnodedh.h:105
double dD
Definition bvhnodedh.h:105
double dA
Definition bvhnodedh.h:105
virtual void drawJoint()
Definition bvhnodeend.h:30
virtual void draw(double *encoders, BVHNode *pSelected)
Definition bvhnodeend.h:32
BVHNodeEND(const QString &name, int n, double a, double d, double alpha, double theta0, iCubMesh *mesh=0)
Definition bvhnodeend.h:27
iCubMesh * pMesh
Definition bvhnode.h:286
int nEnc
Definition bvhnode.h:285
const QString & name() const
Definition bvhnode.h:221
void drawArrows()
Definition bvhnode.h:265
void Draw()
Definition mesh.h:187
int n