##

RayQuery.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_RENDERING_RAYQUERY_HH_
#define GAZEBO_RENDERING_RAYQUERY_HH_
#include <memory>
#include <vector>
#include <ignition/math/Triangle3.hh>
#include <ignition/math/Vector3.hh>
#include "gazebo/rendering/RenderTypes.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace rendering
{
class RayQueryPrivate;
class GZ_RENDERING_VISIBLE RayQuery
{
public: explicit RayQuery(CameraPtr _camera);
public: ~RayQuery();
public: bool SelectMeshTriangle(const int _x, const int _y,
const VisualPtr &_visual,
ignition::math::Vector3d &_intersect,
ignition::math::Triangle3d &_triangle) const;
private: void MeshVisuals(const rendering::VisualPtr _visual,
std::vector<rendering::VisualPtr> &_visuals) const;
private: std::unique_ptr<RayQueryPrivate> dataPtr;
};
}
}
#endif
gazebo::rendering::RayQuery
A Ray Query class used for retrieving mesh data of a visual, adapted from Ogre3D wiki.
Definition: RayQuery.hh:42
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
system.hh
gazebo::rendering::RayQuery::~RayQuery
~RayQuery()
Destructor.
RenderTypes.hh
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::rendering::RayQuery::SelectMeshTriangle
bool SelectMeshTriangle(const int _x, const int _y, const VisualPtr &_visual, ignition::math::Vector3d &_intersect, ignition::math::Triangle3d &_triangle) const
Select a triangle on mesh given screen coordinates.
gazebo::rendering::RayQuery::RayQuery
RayQuery(CameraPtr _camera)
Constructor.
gazebo::rendering::VisualPtr
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
gazebo::rendering::CameraPtr
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:90