17 #ifndef _MODEL_CREATOR_HH_
18 #define _MODEL_CREATOR_HH_
20 #include <boost/unordered/unordered_map.hpp>
78 public:
void SetModelName(
const std::string &_modelName);
82 public: std::string GetModelName()
const;
85 public:
void FinishModel();
91 public: std::string AddBox(
99 public: std::string AddSphere(
double _radius = 0.5,
107 public: std::string AddCylinder(
double _radius = 0.5,
115 public: std::string AddCustom(
const std::string &_name,
121 public:
void AddJoint(
const std::string &_type);
125 public:
void RemovePart(
const std::string &_partName);
129 public:
void SetStatic(
bool _static);
133 public:
void SetAutoDisable(
bool _auto);
137 public:
void SaveToSDF(
const std::string &_savePath);
140 public:
void Reset();
151 public:
void AddPart(PartType _type);
154 public:
void GenerateSDF();
158 private slots:
void OnEdit(
bool _checked);
161 private slots:
void OnCopy();
164 private slots:
void OnPaste();
193 private:
void OnManipMode(
const std::string &_mode);
198 private:
void OnSetSelectedEntity(
const std::string &_name,
199 const std::string &_mode);
207 private:
void OpenInspector(
const std::string &_name);
210 private:
virtual void CreateTheEntity();
213 private:
bool Init();
217 private: std::string CreateModel();
221 private: std::string GetTemplateSDFString();
229 private:
void OnAlignMode(
const std::string &_axis,
230 const std::string &_config,
const std::string &_target,
234 private:
void DeselectAll();
238 private slots:
void OnDelete(
const std::string &_name=
"");
241 Q_SIGNALS:
void PartAdded();
244 private: sdf::SDFPtr modelSDF;
247 private: sdf::SDFPtr modelTemplateSDF;
250 private: std::string modelName;
262 private:
bool isStatic;
265 private:
bool autoDisable;
268 private: std::vector<event::ConnectionPtr> connections;
271 private:
int boxCounter;
274 private:
int cylinderCounter;
277 private:
int sphereCounter;
280 private:
int customCounter;
283 private:
int modelCounter;
286 private:
double editTransparency;
289 private: PartType addPartType;
292 private: boost::unordered_map<std::string, PartData *> allParts;
312 private: std::vector<rendering::VisualPtr> selectedVisuals;
315 private: std::vector<std::string> copiedPartNames;
324 private:
bool active;
327 private: std::string manipMode;
Box.
Definition: ModelCreator.hh:61
Generic description of a mouse event.
Definition: MouseEvent.hh:32
Encapsulates a position and rotation in three space.
Definition: Pose.hh:40
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
Generic description of a keyboard event.
Definition: KeyEvent.hh:32
Forward declarations for transport.
Sphere.
Definition: ModelCreator.hh:63
PartType
Definition: ModelCreator.hh:56
static const Vector3 One
math::Vector3(1, 1, 1)
Definition: Vector3.hh:49
Create and manage 3D visuals of a model with parts and joints.
Definition: ModelCreator.hh:50
none
Definition: ModelCreator.hh:59
Joint visualization.
Definition: JointMaker.hh:57
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:102
static const Pose Zero
math::Pose(0, 0, 0, 0, 0, 0)
Definition: Pose.hh:43
Cylinder.
Definition: ModelCreator.hh:65
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48