Klamp't  0.9.0
ViewResource.h
1 #ifndef VIEW_RESOURCE_H
2 #define VIEW_RESOURCE_H
3 
5 #include "ViewRobot.h"
6 #include "ViewStance.h"
7 #include "ViewGrasp.h"
8 
9 namespace Klampt {
10 
12 {
13  public:
14  ViewResource(RobotModel* robot=NULL);
15  void SetRobot(RobotModel* robot);
16  void SetAnimTime(Real time);
17  void DrawGL(const ResourcePtr& r);
18 
19  //helpers
20  void RenderLinearPath(const LinearPathResource* rc,Real pathTime);
21  void RenderMultiPath(const MultiPathResource* path,Real pathTime);
22  void GetAnimConfig(const ResourcePtr& r,Config& q);
23  void GetLinearPathConfig(const LinearPathResource* rc,Real pathTime,Config& q);
24  void GetMultiPathConfig(const MultiPathResource* path,Real pathTime,Config& q);
25 
26 
27  ViewRobot configViewer,configsViewer;
28  ViewRobot pathViewer; Real pathTime;
29  Real pathIKResolution;
30  ViewHold holdViewer;
31  ViewStance stanceViewer;
32  ViewGrasp graspViewer;
33  //custom draw
34  vector<const void*> items;
35  vector<shared_ptr<Geometry::AnyGeometry3D> > geometries;
36  vector<GLDraw::GeometryAppearance> appearances;
37 };
38 
39 } //namespace Klampt
40 
41 #endif
42 
Displays a stance using OpenGL.
Definition: ViewStance.h:31
Draws the robot (potentially color-coded)
Definition: ViewRobot.h:14
Definition: ViewResource.h:11
Defines all Klampt Resource types, and packing / unpacking utilities.
Resource for a MultiPath.
Definition: Resources.h:185
Displays a hold using OpenGL.
Definition: ViewHold.h:32
Displays a grasp using OpenGL.
Definition: ViewGrasp.h:14
The main robot type used in RobotSim.
Definition: Robot.h:83
Definition: ContactDistance.h:6
Resource for a LinearPath.
Definition: Resources.h:155