Klamp't  0.9.0
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 
8 namespace Klampt {
9 
16 {
17  ViewContact();
18  void Draw();
19  void Draw(const ContactPoint& _p) { p=&_p; Draw(); }
20 
21  const ContactPoint* p;
22  GLDraw::GLColor pointColor, normalColor, coneColor;
23  Real normalScale;
24 };
25 
32 struct ViewHold
33 {
34  ViewHold();
35  void Draw();
36  void DrawContacts();
37  void DrawOutline();
38  void DrawLabel(const char* label);
39  void Draw(const Hold& _h) { h=&_h; Draw(); }
40  void DrawContacts(const Hold& _h) { h=&_h; DrawContacts(); }
41  void DrawOutline(const Hold& _h) { h=&_h; DrawOutline(); }
42  void DrawLabel(const Hold& _h,const char* label) { h=&_h; DrawLabel(label); }
43 
44  //draws the link of the hold as it should be placed according to the IK constraint
45  void DrawConstraint(const Hold& _h,ViewRobot& robotviewer);
46  void DrawConstraint(const Hold& _h,ViewRobot& robotviewer,const Matrix3& refMatrix);
47 
48  const Hold* h;
49  ViewContact viewContact;
50  bool drawContacts;
51  GLDraw::GLColor outlineColor;
52 };
53 
54 } //namespace Klampt
55 
56 #endif
Draws the robot (potentially color-coded)
Definition: ViewRobot.h:14
Displays a contact point using OpenGL.
Definition: ViewHold.h:15
Displays a hold using OpenGL.
Definition: ViewHold.h:32
A single contact between the robot and the environment.
Definition: Hold.h:28
Structures defining the finalized contacts used in stances.
Definition: ContactDistance.h:6