1 #ifndef INPUT_PROCESSOR_H 2 #define INPUT_PROCESSOR_H 5 #include <Klampt/Planning/PlannerObjective.h> 6 #include <KrisLibrary/utils/AsyncIO.h> 7 #include <KrisLibrary/Timer.h> 22 virtual string Instructions()
const {
return ""; }
23 virtual void Activate(
bool enabled) {}
24 virtual bool HasUpdate() {
return true; }
25 virtual void Hover(
int mx,
int my) {}
26 virtual void Drag(
float dx,
float dy) {}
27 virtual void Spaceball(
const RigidTransform& T) {}
28 virtual void SetGlobalTime(Real time) { currentTime = time; }
29 virtual void SetPredictionTime(Real splitTime) {}
31 virtual void DrawGL() {}
35 void GetClickRay(
int mx,
int my, Ray3D& ray)
const;
38 Camera::Viewport* viewport;
49 virtual string Instructions()
const {
return "Click and drag to pose points on the robot"; }
50 virtual void Activate(
bool enabled);
51 virtual bool HasUpdate() {
return changed; }
52 virtual void Hover(
int mx,
int my);
53 virtual void Drag(
float dx,
float dy);
54 virtual void Spaceball(
const RigidTransform& T);
56 virtual void DrawGL();
61 Vector3 currentDestination;
63 RigidTransform currentDesiredTransform;
75 virtual void Activate(
bool enabled);
76 virtual bool HasUpdate() {
return true; }
77 virtual void Hover(
int mx,
int my);
78 virtual void Drag(
float mx,
float my);
79 virtual void SetPredictionTime(Real splitTime);
81 virtual void DrawGL();
83 Real currentInputTime;
87 Real weightDecay,speedDecay;
88 Real predictionOffset;
105 virtual void Activate(
bool enabled);
106 virtual bool HasUpdate();
109 AsyncReaderThread* reader;
124 virtual string Instructions() {
return "Reading objectives over socket..."; }
125 SocketReadWorker socketReader;
Defines the WorldModel class.
A base class for objective functionals in time/config/velocity space.
Definition: PlannerObjective.h:17
The main robot type used in RobotSim.
Definition: Robot.h:83
Reads an objective function from a reader thread.
Definition: InputProcessor.h:100
Reads an objective function from a socket.
Definition: InputProcessor.h:117
Definition: ContactDistance.h:6
The main world class containing multiple robots, objects, and static geometries (terrains). Lights and other viewport information may also be stored here.
Definition: World.h:24