SphereMaker.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2015 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 _SPHEREMAKER_HH_
18 #define _SPHEREMAKER_HH_
19 
20 #include <string>
21 
22 #include "gazebo/math/Vector2i.hh"
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  namespace msgs
29  {
30  class Visual;
31  }
32 
33  namespace gui
34  {
36  {
37  public: SphereMaker();
38  public: virtual ~SphereMaker();
39 
40  public: virtual void Start(const rendering::UserCameraPtr _camera);
41 
42  public: virtual void Stop();
43  public: virtual bool IsActive() const;
44 
45  public: virtual void OnMousePush(const common::MouseEvent &_event);
46  public: virtual void OnMouseRelease(const common::MouseEvent &_event);
47  public: virtual void OnMouseDrag(const common::MouseEvent &_event);
48 
51  public: std::string GetSDFString();
52 
53  protected: virtual void CreateTheEntity();
54 
55  private: int state;
56  private: bool leftMousePressed;
57  private: math::Vector2i mousePushPos;
58  private: msgs::Visual *visualMsg;
59 
60  private: static unsigned int counter;
61  };
62  }
63 }
64 #endif
65 
66 
Generic description of a mouse event.
Definition: MouseEvent.hh:35
Generic integer x, y vector.
Definition: Vector2i.hh:36
Definition: SphereMaker.hh:35
to make an entity base class
Definition: EntityMaker.hh:41
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:91
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66