All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CylinderMaker.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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 _CYLINDERMAKER_HH_
18 #define _CYLINDERMAKER_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  namespace gui
33  {
36 
40  {
42  public: CylinderMaker();
44  public: virtual ~CylinderMaker();
45 
47  public: virtual void Start(const rendering::UserCameraPtr _camera);
49  public: virtual void Stop();
51  public: virtual bool IsActive() const;
52 
54  public: virtual void OnMousePush(const common::MouseEvent &_event);
56  public: virtual void OnMouseRelease(const common::MouseEvent &_event);
58  public: virtual void OnMouseDrag(const common::MouseEvent &_event);
60  public: virtual void OnMouseMove(const common::MouseEvent &_event);
61 
64  public: std::string GetSDFString();
65 
67  private: virtual void CreateTheEntity();
68  private: int state;
69  private: bool leftMousePressed;
70  private: math::Vector2i mousePushPos, mouseReleasePos;
71  private: msgs::Visual *visualMsg;
72 
73  private: static unsigned int counter;
74  };
75  }
76 }
77 
78 #endif
79 
80 
Generic description of a mouse event.
Definition: MouseEvent.hh:32
Generic integer x, y vector.
Definition: Vector2i.hh:39
to make a cylinder
Definition: CylinderMaker.hh:39
to make an entity base class
Definition: EntityMaker.hh:41
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:84
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48