Robotran C Documentation
Joint3D.hh
Go to the documentation of this file.
1 
6 #ifdef OPEN_GL
7 
8 #ifndef _JOINT_3D_HH_
9 #define _JOINT_3D_HH_
10 
11 #include "AbstractPoint3D.hh"
12 #include "MbsLight.hh"
13 #include "MbsViewPoint.hh"
14 
15 namespace OpenGLMbs{
16 
17 enum {JOINT_T1, JOINT_T2, JOINT_T3, JOINT_R1, JOINT_R2, JOINT_R3, NO_JOINT};
18 
19 // forward declaration
20 class Body3D;
21 
24 class Joint3D: public AbstractPoint3D
25 {
26  public:
27  Joint3D(MbsWorld3D *world_3d, const char* name, int joint_type, float joint_value = 0.0f);
28  virtual ~Joint3D();
29 
30  void UpdateRelMat(float joint_value);
31 
32  Body3D* AddBody(const char* name);
33 
35  void AddLight(MbsLight *new_light) { light_list.push_back(new_light); }
36 
38  void AddViewPoint(MbsViewPoint *new_view) { view_list.push_back(new_view); }
39 
40  void UpdateLights();
41  void UpdateViewPoints();
42 
43  virtual void UpdateAbsMatTree();
44 
45  virtual void PrintTree(int level);
46 
47  protected:
48  int joint_type;
49  float joint_value;
50 
51  Body3D *body_3d_child;
52 
53  std::vector<MbsLight*> light_list;
54  std::vector<MbsViewPoint*> view_list;
55 };
56 
57 }
58 #endif
59 #endif
OpenGLMbs
Definition: MpegFrameCaptureOptions.hh:6
MbsWorld3D.hh
MbsWorld3D class.
Joint3D.hh
Joint3D class.
Body3D.hh
Body3D class.
MbsViewPoint.hh
MbsViewPoint class.
MbsLight.hh
MbsLight class.
AbstractPoint3D.hh
AbstractPoint3D class.