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
23#include "gazebo/util/system.hh"
24
25namespace 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
Box geometry primitive.
Definition BoxShape.hh:35
virtual void SetScale(const ignition::math::Vector3d &_scale)
Set the scale of the shape.
virtual double ComputeVolume() const
Documentation inherited.
virtual void Init()
Initialize the box.
virtual ~BoxShape()
Destructor.
ignition::math::Vector3d Size() const
Get the size of the box.
BoxShape(CollisionPtr _parent)
Constructor.
virtual void SetSize(const ignition::math::Vector3d &_size)
Set the size of the box.
virtual void ProcessMsg(const msgs::Geometry &_msg)
Process a geometry message.
void FillMsg(msgs::Geometry &_msg)
Fill in the values for a geomertry message.
Base class for all shapes.
Definition Shape.hh:40
boost::shared_ptr< Collision > CollisionPtr
Definition PhysicsTypes.hh:113
Forward declarations for the common classes.
Definition Animation.hh:27