CylinderShape.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 /* Desc: Cylinder geometry
18  * Author: Nate Koenig, Andrew Howard
19  * Date: 8 May 2003
20  */
21 
22 #ifndef _CYLINDERSHAPE_HH_
23 #define _CYLINDERSHAPE_HH_
24 
25 #ifdef _WIN32
26  // Ensure that Winsock2.h is included before Windows.h, which can get
27  // pulled in by anybody (e.g., Boost).
28  #include <Winsock2.h>
29 #endif
30 
31 #include "gazebo/physics/Shape.hh"
32 #include "gazebo/util/system.hh"
33 
34 namespace gazebo
35 {
36  namespace physics
37  {
40 
43  class GZ_PHYSICS_VISIBLE CylinderShape : public Shape
44  {
47  public: explicit CylinderShape(CollisionPtr _parent);
48 
50  public: virtual ~CylinderShape();
51 
53  public: void Init();
54 
57  public: void SetRadius(double _radius);
58 
61  public: void SetLength(double _length);
62 
65  public: double GetRadius() const;
66 
69  public: double GetLength() const;
70 
74  public: virtual void SetSize(double _radius, double _length);
75 
78  public: virtual void SetScale(const math::Vector3 &_scale);
79 
82  public: void FillMsg(msgs::Geometry &_msg);
83 
86  public: virtual void ProcessMsg(const msgs::Geometry &_msg);
87 
89  public: virtual double ComputeVolume() const;
90  };
92  }
93 }
94 #endif
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
Cylinder collision.
Definition: CylinderShape.hh:43
Base class for all shapes.
Definition: Shape.hh:46
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113