Ignition Rendering

API Reference

0.1.0
OgreRayQuery.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 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 #ifndef IGNITION_RENDERING_OGRE_OGRERAYQUERY_HH_
18 #define IGNITION_RENDERING_OGRE_OGRERAYQUERY_HH_
19 
20 #include <memory>
21 
26 
27 namespace ignition
28 {
29  namespace rendering
30  {
31  // forward declaration
32  class OgreRayQueryPrivate;
33 
37  class IGNITION_RENDERING_OGRE_VISIBLE OgreRayQuery :
38  public BaseRayQuery<OgreObject>
39  {
41  protected: OgreRayQuery();
42 
44  public: virtual ~OgreRayQuery();
45 
46  // Documentation inherited
47  public: virtual void SetFromCamera(const CameraPtr &_camera,
48  const math::Vector2d &_coord);
49 
50  // Documentation inherited
51  public: virtual RayQueryResult ClosestPoint();
52 
62  // Code found in Wiki: www.ogre3d.org/wiki/index.php/RetrieveVertexData
63  private: void MeshInformation(const Ogre::Mesh *_mesh,
64  size_t &_vertexCount,
65  Ogre::Vector3* &_vertices,
66  size_t &_indexCount,
67  uint64_t* &_indices,
68  const math::Vector3d &_position,
69  const math::Quaterniond &_orient,
70  const math::Vector3d &_scale);
71 
73  private: std::unique_ptr<OgreRayQueryPrivate> dataPtr;
74 
76  private: friend class OgreScene;
77  };
78  }
79 }
80 #endif
A Ray Query class used for computing ray object intersections.
Definition: BaseRayQuery.hh:34
A Ray Query class used for computing ray object intersections.
Definition: OgreRayQuery.hh:37
A class that stores ray query intersection results.
Definition: RayQuery.hh:31
Definition: OgreScene.hh:34
Definition: ArrowVisual.hh:22