All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MeshMaker.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 _MESHMAKER_HH_
18 #define _MESHMAKER_HH_
19 
20 #include <string>
22 #include "gazebo/util/system.hh"
23 
24 namespace gazebo
25 {
26  namespace msgs
27  {
28  class Visual;
29  }
30 
31  namespace gui
32  {
34  {
35  public: MeshMaker();
36  public: virtual ~MeshMaker();
37 
38  public: void Init(const std::string &_filename);
39  public: virtual void Start(const rendering::UserCameraPtr _camera);
40 
41  public: virtual void Stop();
42  public: virtual bool IsActive() const;
43 
44  public: virtual void OnMousePush(const common::MouseEvent &_event);
45  public: virtual void OnMouseRelease(const common::MouseEvent &_event);
46  public: virtual void OnMouseDrag(const common::MouseEvent &_event);
47  public: virtual void OnMouseMove(const common::MouseEvent &_event);
48 
49  private: virtual void CreateTheEntity();
50  private: int state;
51  private: bool leftMousePressed;
52  private: math::Vector2i mousePushPos, mouseReleasePos;
53  private: msgs::Visual *visualMsg;
54 
55  private: static unsigned int counter;
56  };
57  }
58 }
59 #endif
Generic description of a mouse event.
Definition: MouseEvent.hh:32
Definition: MeshMaker.hh:33
Generic integer x, y vector.
Definition: Vector2i.hh:39
to make an entity base class
Definition: EntityMaker.hh:41
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:84
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48