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 
48  public: virtual void SetSize(const ignition::math::Vector3d &_size);
49 
50  // Documentation inherited
51  public: virtual void SetScale(const ignition::math::Vector3d &_scale);
52 
55  public: ignition::math::Vector3d Size() const;
56 
59  public: void FillMsg(msgs::Geometry &_msg);
60 
63  public: virtual void ProcessMsg(const msgs::Geometry &_msg);
64 
66  public: virtual double ComputeVolume() const;
67  };
69  }
70 }
71 #endif
Base class for all shapes.
Definition: Shape.hh:45
Box geometry primitive.
Definition: BoxShape.hh:34
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113