Choreonoid  1.8
GLVisionSimulatorItem.h
Go to the documentation of this file.
1 
6 #ifndef CNOID_BODY_PLUGIN_GL_VISION_SIMULATOR_ITEM_H
7 #define CNOID_BODY_PLUGIN_GL_VISION_SIMULATOR_ITEM_H
8 
9 #include "SubSimulatorItem.h"
10 #include "exportdecl.h"
11 
12 namespace cnoid {
13 
14 class GLVisionSimulatorItemImpl;
15 
16 class CNOID_EXPORT GLVisionSimulatorItem : public SubSimulatorItem
17 {
18 public:
19  static void initializeClass(ExtensionManager* ext);
20 
24 
25  enum ThreadMode { SINGLE_THREAD_MODE, SENSOR_THREAD_MODE, SCREEN_THREAD_MODE, N_THREAD_MODES };
26 
27  void setTargetBodies(const std::string& bodyNames);
28  void setTargetSensors(const std::string& sensorNames);
29  void setMaxFrameRate(double rate);
30  void setMaxLatency(double latency);
31  void setVisionDataRecordingEnabled(bool on);
32  void setThreadMode(int mode);
33  void setBestEffortMode(bool on);
34  void setRangeSensorPrecisionRatio(double r);
35  void setAllSceneObjectsEnabled(bool on);
36  void setHeadLightEnabled(bool on);
37  void setAdditionalLightsEnabled(bool on);
38 
39  virtual bool initializeSimulation(SimulatorItem* simulatorItem);
40  virtual void finalizeSimulation();
41 
42  // deprecated
43  void setDedicatedSensorThreadsEnabled(bool on); // setThreadMode(SENSOR_THREAD_MODE);
44 
45 protected:
46  virtual Item* doDuplicate() const;
47  virtual void doPutProperties(PutPropertyFunction& putProperty);
48  virtual bool store(Archive& archive);
49  virtual bool restore(const Archive& archive);
50 
51 private:
52  GLVisionSimulatorItemImpl* impl;
53 };
54 
56 
57 }
58 
59 #endif
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::PutPropertyFunction
Definition: PutPropertyFunction.h:51
cnoid::Archive
Definition: Archive.h:22
SubSimulatorItem.h
cnoid::SubSimulatorItem
Definition: SubSimulatorItem.h:16
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid::GLVisionSimulatorItem
Definition: GLVisionSimulatorItem.h:16
cnoid::GLVisionSimulatorItem::ThreadMode
ThreadMode
Definition: GLVisionSimulatorItem.h:25
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::Item
Definition: Item.h:29
cnoid::GLVisionSimulatorItemPtr
ref_ptr< GLVisionSimulatorItem > GLVisionSimulatorItemPtr
Definition: GLVisionSimulatorItem.h:55
cnoid::SimulatorItem
Definition: SimulatorItem.h:81