Klamp't  0.8.1
ViewHold.h
1 #ifndef VIEW_HOLD_H
2 #define VIEW_HOLD_H
3 
4 #include <KrisLibrary/GLdraw/GLColor.h>
5 #include <Klampt/Contact/Hold.h>
6 #include "ViewRobot.h"
7 
14 {
15  ViewContact();
16  void Draw();
17  void Draw(const ContactPoint& _p) { p=&_p; Draw(); }
18 
19  const ContactPoint* p;
20  GLDraw::GLColor pointColor, normalColor, coneColor;
21  Real normalScale;
22 };
23 
30 struct ViewHold
31 {
32  ViewHold();
33  void Draw();
34  void DrawContacts();
35  void DrawOutline();
36  void DrawLabel(const char* label);
37  void Draw(const Hold& _h) { h=&_h; Draw(); }
38  void DrawContacts(const Hold& _h) { h=&_h; DrawContacts(); }
39  void DrawOutline(const Hold& _h) { h=&_h; DrawOutline(); }
40  void DrawLabel(const Hold& _h,const char* label) { h=&_h; DrawLabel(label); }
41 
42  //draws the link of the hold as it should be placed according to the IK constraint
43  void DrawConstraint(const Hold& _h,ViewRobot& robotviewer);
44  void DrawConstraint(const Hold& _h,ViewRobot& robotviewer,const Matrix3& refMatrix);
45 
46  const Hold* h;
47  ViewContact viewContact;
48  bool drawContacts;
49  GLDraw::GLColor outlineColor;
50 };
51 
52 #endif
A single contact between the robot and the environment.
Definition: Hold.h:26
Draws the robot (potentially color-coded)
Definition: ViewRobot.h:12
Displays a contact point using OpenGL.
Definition: ViewHold.h:13
Displays a hold using OpenGL.
Definition: ViewHold.h:30
Structures defining the finalized contacts used in stances.