RayQuery.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2016 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 
18 #ifndef _GAZEBO_RAYQUERY_HH_
19 #define _GAZEBO_RAYQUERY_HH_
20 
21 #include <vector>
22 
23 #include "gazebo/math/Vector3.hh"
26 #include "gazebo/util/system.hh"
27 
28 namespace gazebo
29 {
32  namespace rendering
33  {
34  class RayQueryPrivate;
35 
38 
43  {
46  public: RayQuery(CameraPtr _camera);
47 
49  public: ~RayQuery();
50 
57  public: bool SelectMeshTriangle(int _x, int _y, VisualPtr _visual,
58  math::Vector3 &_intersect, std::vector<math::Vector3> &_vertices);
59 
63  private: void GetMeshVisuals(rendering::VisualPtr _visual,
64  std::vector<rendering::VisualPtr> &_visuals);
65 
68  private: RayQueryPrivate *dataPtr;
69  };
71  }
72 }
73 #endif
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
A Ray Query class used for retrieving mesh data of a visual, adapted from Ogre3D wiki.
Definition: RayQuery.hh:42
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:112
boost::shared_ptr< Camera > CameraPtr
Definition: RenderTypes.hh:88
#define GZ_RENDERING_VISIBLE
Definition: system.hh:209
Private data for the Ray Query class.
Definition: RayQueryPrivate.hh:30