Klamp't  0.8.1
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 
15 {
16  ViewPolytope();
17  void Draw();
18  void Draw(const Geometry::UnboundedPolytope2D& _poly) { poly=&_poly; Draw(); }
19 
20  const Geometry::UnboundedPolytope2D* poly;
21  GLDraw::GLColor color;
22  bool wireframe;
23  Real h;
24 };
25 
29 struct ViewStance
30 {
31  ViewStance();
32  void DrawHolds();
33  void DrawForces(const Vector& f,Real scale=One);
34  void DrawHolds(const Stance& _s)
35  { s=&_s; DrawHolds(); }
36  void DrawForces(const Stance& _s,const Vector& f,Real scale=One)
37  { s=&_s; DrawForces(f,scale); }
38 
39  const Stance* s;
40  ViewHold viewHold;
41  GLDraw::GLColor forceColor;
42 };
43 
44 
45 
46 #endif
Displays a stance using OpenGL.
Definition: ViewStance.h:29
A collection of holds.
Definition: Stance.h:19
Displays a support polygon using OpenGL.
Definition: ViewStance.h:14
Displays a hold using OpenGL.
Definition: ViewHold.h:30