BoxShape.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_BOXSHAPE_HH_
18 #define GAZEBO_PHYSICS_BOXSHAPE_HH_
19 
20 #include <ignition/math/Vector3.hh>
21 
22 #include "gazebo/physics/Shape.hh"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace physics
28  {
31 
34  class GZ_PHYSICS_VISIBLE BoxShape : public Shape
35  {
38  public: explicit BoxShape(CollisionPtr _parent);
39 
41  public: virtual ~BoxShape();
42 
44  public: virtual void Init();
45 
49  public: virtual void SetSize(const math::Vector3 &_size)
50  GAZEBO_DEPRECATED(8.0);
51 
54  public: virtual void SetSize(const ignition::math::Vector3d &_size);
55 
56  // Documentation inherited
57  public: virtual void SetScale(const ignition::math::Vector3d &_scale);
58 
62  public: math::Vector3 GetSize() const GAZEBO_DEPRECATED(8.0);
63 
66  public: ignition::math::Vector3d Size() const;
67 
70  public: void FillMsg(msgs::Geometry &_msg);
71 
74  public: virtual void ProcessMsg(const msgs::Geometry &_msg);
75 
77  public: virtual double ComputeVolume() const;
78  };
80  }
81 }
82 #endif
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
Base class for all shapes.
Definition: Shape.hh:45
Box geometry primitive.
Definition: BoxShape.hh:34
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113