##

ODERayShape.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_ODE_ODERAYSHAPE_HH_
#define GAZEBO_PHYSICS_ODE_ODERAYSHAPE_HH_
#include <string>
#include "gazebo/physics/RayShape.hh"
#include "gazebo/physics/Shape.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace physics
{
class GZ_PHYSICS_VISIBLE ODERayShape : public RayShape
{
public: explicit ODERayShape(PhysicsEnginePtr _physicsEngine);
public: ODERayShape(PhysicsEnginePtr _physicsEngine, dSpaceID _spaceId);
public: explicit ODERayShape(CollisionPtr _collision);
public: virtual ~ODERayShape();
public: virtual void Update();
public: virtual void GetIntersection(double &_dist, std::string &_entity);
public: virtual void SetPoints(const ignition::math::Vector3d &_posStart,
const ignition::math::Vector3d &_posEnd);
public: dGeomID ODEGeomId() const;
private: static void UpdateCallback(void *_data, dGeomID _o1,
dGeomID _o2);
private: dGeomID geomId;
private: ODEPhysicsPtr physicsEngine;
private: class Intersection
{
public: double depth;
public: std::string name;
};
};
}
}
#endif
gazebo::physics::ODERayShape::Update
virtual void Update()
Update the ray collision.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::physics::ODERayShape::GetIntersection
virtual void GetIntersection(double &_dist, std::string &_entity)
Get the nearest intersection.
system.hh
gazebo::physics::ODEPhysicsPtr
boost::shared_ptr< ODEPhysics > ODEPhysicsPtr
Definition: ODETypes.hh:59
gazebo::physics::RayShape
Base class for Ray collision geometry.
Definition: RayShape.hh:35
gazebo::physics::ODERayShape::SetPoints
virtual void SetPoints(const ignition::math::Vector3d &_posStart, const ignition::math::Vector3d &_posEnd)
Set the ray based on starting and ending points relative to the body.
gazebo::physics::ODERayShape::~ODERayShape
virtual ~ODERayShape()
Destructor.
gazebo::physics::ODERayShape::ODERayShape
ODERayShape(PhysicsEnginePtr _physicsEngine)
Constructor for a global ray.
Shape.hh
RayShape.hh
gazebo::physics::ODERayShape::ODEGeomId
dGeomID ODEGeomId() const
Get the ODE Geom ID.
gazebo::physics::PhysicsEnginePtr
boost::shared_ptr< PhysicsEngine > PhysicsEnginePtr
Definition: PhysicsTypes.hh:125
gazebo::physics::CollisionPtr
boost::shared_ptr< Collision > CollisionPtr
Definition: PhysicsTypes.hh:113
gazebo::physics::ODERayShape
Ray collision.
Definition: ODERayShape.hh:34