ModelMaker.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_MODEL_MAKER_HH_
18 #define _GAZEBO_MODEL_MAKER_HH_
19 
20 #include <list>
21 #include <string>
22 #include <sdf/sdf.hh>
23 
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
29  namespace gui
30  {
31  class ModelMakerPrivate;
32 
35  {
38  public: enum SimpleShapes {
40  BOX,
44  CYLINDER
45  };
46 
48  public: ModelMaker();
49 
51  public: ~ModelMaker();
52 
53  // Documentation inherited
54  public: virtual void Stop();
55 
59  public: bool InitFromModel(const std::string &_modelName);
60 
64  public: bool InitFromFile(const std::string &_filename);
65 
70  public: bool InitSimpleShape(SimpleShapes _shape);
71 
72  // Documentation inherited
73  public: virtual ignition::math::Vector3d EntityPosition() const;
74 
75  // Documentation inherited
76  protected: virtual void SetEntityPosition(
77  const ignition::math::Vector3d &_pos);
78 
80  private: bool Init();
81 
84  private: void CreateModelFromSDF(sdf::ElementPtr _modelElem);
85 
87  private: virtual void CreateTheEntity();
88  };
89  }
90 }
91 #endif
Box.
Definition: ModelMaker.hh:40
#define GZ_GUI_VISIBLE
Definition: system.hh:284
SimpleShapes
Unique identifiers for each simple shape supported.
Definition: ModelMaker.hh:38
Used to insert new models into the scene.
Definition: ModelMaker.hh:34
Sphere.
Definition: ModelMaker.hh:42
To make an entity, base class.
Definition: EntityMaker.hh:37
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.