Klamp't  0.9.0
ViewStance.h
1 #ifndef VIEW_STANCE_H
2 #define VIEW_STANCE_H
3 
4 #include <Klampt/Contact/Stance.h>
5 #include <KrisLibrary/robotics/Stability.h>
6 #include <KrisLibrary/GLdraw/GLColor.h>
7 #include "ViewHold.h"
8 
9 namespace Klampt {
10 
17 {
18  ViewPolytope();
19  void Draw();
20  void Draw(const Geometry::UnboundedPolytope2D& _poly) { poly=&_poly; Draw(); }
21 
22  const Geometry::UnboundedPolytope2D* poly;
23  GLDraw::GLColor color;
24  bool wireframe;
25  Real h;
26 };
27 
31 struct ViewStance
32 {
33  ViewStance();
34  void DrawHolds();
35  void DrawForces(const Vector& f,Real scale=One);
36  void DrawHolds(const Stance& _s)
37  { s=&_s; DrawHolds(); }
38  void DrawForces(const Stance& _s,const Vector& f,Real scale=One)
39  { s=&_s; DrawForces(f,scale); }
40 
41  const Stance* s;
42  ViewHold viewHold;
43  GLDraw::GLColor forceColor;
44 };
45 
46 } //namespace Klampt
47 
48 #endif
Displays a stance using OpenGL.
Definition: ViewStance.h:31
A collection of holds.
Definition: Stance.h:20
Displays a support polygon using OpenGL.
Definition: ViewStance.h:16
Displays a hold using OpenGL.
Definition: ViewHold.h:32
Definition: ContactDistance.h:6