##

PolylineShape.hh
Go to the documentation of this file.
/*
* Copyright (C) 2014 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_POLYLINESHAPE_HH_
#define GAZEBO_PHYSICS_POLYLINESHAPE_HH_
#include <vector>
#include "gazebo/physics/Shape.hh"
namespace gazebo
{
namespace physics
{
class GZ_PHYSICS_VISIBLE PolylineShape : public Shape
{
public: explicit PolylineShape(CollisionPtr _parent);
public: virtual ~PolylineShape();
public: virtual void Init();
public: std::vector<std::vector<ignition::math::Vector2d> >
Vertices() const;
public: double GetHeight() const;
public: void FillMsg(msgs::Geometry &_msg);
public: virtual void ProcessMsg(const msgs::Geometry &_msg);
private: virtual void SetScale(const ignition::math::Vector3d &_scale);
private: virtual void SetVertices(
const std::vector<std::vector<ignition::math::Vector2d> >
&_vertices);
private: virtual void SetVertices(const msgs::Geometry &_msg);
private: void SetPolylineShape(const double &_height,
const std::vector<std::vector<ignition::math::Vector2d> >
&_vertices);
private: virtual void SetHeight(const double &_height);
protected: const common::Mesh *mesh;
};
}
}
#endif
gazebo::physics::PolylineShape::mesh
const common::Mesh * mesh
Pointer to the mesh data.
Definition: PolylineShape.hh:97
gazebo::physics::PolylineShape
Polyline geometry primitive.
Definition: PolylineShape.hh:32
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::physics::PolylineShape::FillMsg
void FillMsg(msgs::Geometry &_msg)
Fill in the values for a geomertry message.
gazebo::physics::PolylineShape::~PolylineShape
virtual ~PolylineShape()
Destructor.
gazebo::physics::PolylineShape::GetHeight
double GetHeight() const
Get the height of the polylines.
gazebo::physics::PolylineShape::PolylineShape
PolylineShape(CollisionPtr _parent)
Constructor.
Shape.hh
gazebo::physics::PolylineShape::Vertices
std::vector< std::vector< ignition::math::Vector2d > > Vertices() const
Get the vertices of the polylines.
gazebo::msgs::Init
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
gazebo::common::Mesh
A 3D mesh.
Definition: Mesh.hh:42
gazebo::physics::CollisionPtr
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113
gazebo::physics::PolylineShape::ProcessMsg
virtual void ProcessMsg(const msgs::Geometry &_msg)
Process a geometry message.
gazebo::physics::PolylineShape::Init
virtual void Init()
Initialize the polyLine.
gazebo::physics::Shape
Base class for all shapes.
Definition: Shape.hh:39