PlaneShape.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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_PHYSICS_PLANESHAPE_HH_
18 #define GAZEBO_PHYSICS_PLANESHAPE_HH_
19 
20 #include <ignition/math/Vector2.hh>
21 
22 #include "gazebo/math/Vector2d.hh"
23 #include "gazebo/physics/Shape.hh"
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  namespace physics
29  {
32 
38  class GZ_PHYSICS_VISIBLE PlaneShape : public Shape
39  {
42  public: explicit PlaneShape(CollisionPtr _parent);
43 
45  public: virtual ~PlaneShape();
46 
48  public: virtual void Init();
49 
51  public: virtual void CreatePlane();
52 
56  public: virtual void SetAltitude(const math::Vector3 &_pos)
57  GAZEBO_DEPRECATED(8.0);
58 
61  public: virtual void SetAltitude(const ignition::math::Vector3d &_pos);
62 
66  public: void SetNormal(const math::Vector3 &_norm) GAZEBO_DEPRECATED(8.0);
67 
70  public: void SetNormal(const ignition::math::Vector3d &_norm);
71 
75  public: math::Vector3 GetNormal() const GAZEBO_DEPRECATED(8.0);
76 
79  public: ignition::math::Vector3d Normal() const;
80 
84  public: void SetSize(const math::Vector2d &_size)
85  GAZEBO_DEPRECATED(8.0);
86 
89  public: void SetSize(const ignition::math::Vector2d &_size);
90 
94  public: math::Vector2d GetSize() const GAZEBO_DEPRECATED(8.0);
95 
98  public: ignition::math::Vector2d Size() const;
99 
102  public: virtual void SetScale(const ignition::math::Vector3d &_scale);
103 
106  public: void FillMsg(msgs::Geometry &_msg);
107 
111  public: virtual void ProcessMsg(const msgs::Geometry &_msg);
112 
114  public: virtual double ComputeVolume() const;
115  };
117  }
118 }
119 #endif
Forward declarations for the common classes.
Definition: Animation.hh:33
Generic double x, y vector.
Definition: Vector2d.hh:36
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
Base class for all shapes.
Definition: Shape.hh:45
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Collision for an infinite plane.
Definition: PlaneShape.hh:38
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113