All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PolylineShape.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 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 _GAZEBO_POLYLINESHAPE_HH_
18 #define _GAZEBO_POLYLINESHAPE_HH_
19 
20 #include <vector>
21 #include "gazebo/physics/Shape.hh"
22 
23 namespace gazebo
24 {
25  namespace physics
26  {
29 
33  {
36  public: explicit PolylineShape(CollisionPtr _parent);
37 
39  public: virtual ~PolylineShape();
40 
42  public: virtual void Init();
43 
46  public: std::vector<math::Vector2d> GetVertices() const;
47 
50  public: double GetHeight() const;
51 
54  public: void FillMsg(msgs::Geometry &_msg);
55 
58  public: virtual void ProcessMsg(const msgs::Geometry &_msg);
59 
62  private: virtual void SetScale(const math::Vector3 &_scale);
63 
67  private: virtual void SetVertices(
68  const std::vector<math::Vector2d> &_vertices);
69 
72  private: virtual void SetVertices(const msgs::Geometry &_msg);
73 
78  private: void SetPolylineShape(const double &_height,
79  const std::vector<math::Vector2d> &_vertices);
80 
83  private: virtual void SetHeight(const double &_height);
84 
86  protected: const common::Mesh *mesh;
87  };
89  }
90 }
91 #endif
A 3D mesh.
Definition: Mesh.hh:40
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:43
Base class for all shapes.
Definition: Shape.hh:40
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:94
const common::Mesh * mesh
Pointer to the mesh data.
Definition: PolylineShape.hh:86
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Polyline geometry primitive.
Definition: PolylineShape.hh:32
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48