##

Shape.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_PHYSICS_SHAPE_HH_
#define GAZEBO_PHYSICS_SHAPE_HH_
#include <string>
#include <ignition/math/Vector3.hh>
#include "gazebo/msgs/msgs.hh"
#include "gazebo/physics/PhysicsTypes.hh"
#include "gazebo/physics/Inertial.hh"
#include "gazebo/physics/Base.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
class GZ_PHYSICS_VISIBLE Shape : public Base
{
public: explicit Shape(CollisionPtr _parent);
public: virtual ~Shape();
public: virtual void Init() = 0;
public: virtual void SetScale(const ignition::math::Vector3d &_scale) = 0;
public: virtual ignition::math::Vector3d Scale() const;
public: virtual void FillMsg(msgs::Geometry &_msg) = 0;
public: virtual void ProcessMsg(const msgs::Geometry &_msg) = 0;
public: virtual double ComputeVolume() const;
protected: CollisionPtr collisionParent;
protected: ignition::math::Vector3d scale = ignition::math::Vector3d::One;
};
}
}
#endif
gazebo::physics::Shape::ProcessMsg
virtual void ProcessMsg(const msgs::Geometry &_msg)=0
Process a geometry message.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::physics::Shape::FillMsg
virtual void FillMsg(msgs::Geometry &_msg)=0
Fill in the values for a geometry message.
system.hh
msgs.hh
PhysicsTypes.hh
default namespace for gazebo
gazebo::physics::Shape::Init
virtual void Init()=0
Initialize the shape.
gazebo::physics::Base
Base class for most physics classes.
Definition: Base.hh:71
gazebo::physics::Shape::SetScale
virtual void SetScale(const ignition::math::Vector3d &_scale)=0
Set the scale of the shape.
Base.hh
gazebo::physics::Shape::~Shape
virtual ~Shape()
Destructor.
gazebo::physics::Shape::collisionParent
CollisionPtr collisionParent
This shape's collision parent.
Definition: Shape.hh:73
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::physics::Shape::Scale
virtual ignition::math::Vector3d Scale() const
Get the scale of the shape.
gazebo::physics::Shape::scale
ignition::math::Vector3d scale
This shape's scale;.
Definition: Shape.hh:76
gazebo::physics::Shape::Shape
Shape(CollisionPtr _parent)
Constructor.
gazebo::physics::CollisionPtr
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113
gazebo::physics::Shape::ComputeVolume
virtual double ComputeVolume() const
Get the volume of this shape.
gazebo::physics::Shape
Base class for all shapes.
Definition: Shape.hh:39
Inertial.hh