A Ray Query class used for computing ray object intersections.
More...
#include <BaseRayQuery.hh>
|
virtual | ~BaseRayQuery () override |
| Destructor.
|
|
virtual RayQueryResult | ClosestPoint (bool _forceSceneUpdate=true) override |
| Compute intersections.
|
|
virtual math::Vector3d | Direction () const override |
| Get ray direction.
|
|
virtual math::Vector3d | Origin () const override |
| Get ray origin.
|
|
virtual void | SetDirection (const math::Vector3d &_dir) override |
| Set ray direction.
|
|
virtual void | SetFromCamera (const CameraPtr &_camera, const math::Vector2d &_coord) override |
| Create the ray query from camera.
|
|
virtual void | SetOrigin (const math::Vector3d &_origin) override |
| Set ray origin.
|
|
void | SetPreferGpu (bool _preferGpu) override |
| If possible & supported (and user called SetFromCamera()) will use the GPU to perform the ray query. Triangle-level accurate.
|
|
bool | UsesGpu () const override |
| Returns true if the GPU will be used for the next ClosestPoint() call.
|
|
virtual | ~RayQuery () |
| Destructor.
|
|
virtual void | SetFromCamera (const WideAngleCameraPtr &_camera, uint32_t _faceIdx, const math::Vector2d &_coord)=0 |
| Create the ray query from WideAngleCamera.
|
|
virtual | ~Object () |
| Destructor.
|
|
virtual void | Destroy ()=0 |
| Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior.
|
|
virtual unsigned int | Id () const =0 |
| Get the object ID. This ID will be unique across all objects inside a given scene, but necessarily true for objects across different scenes.
|
|
virtual std::string | Name () const =0 |
| Get the object name. This name will be unique across all objects inside a given scene, but necessarily true for objects across different scenes.
|
|
virtual void | PostRender ()=0 |
| Post process this object and any of its children after rendering.
|
|
virtual void | PreRender ()=0 |
| Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender.
|
|
virtual ScenePtr | Scene () const =0 |
| Get the Scene that created this object.
|
|
template<class T>
class gz::rendering::BaseRayQuery< T >
A Ray Query class used for computing ray object intersections.
gz/rendering/base/BaseRayQuery.hh
◆ BaseRayQuery()
◆ ~BaseRayQuery()
◆ ClosestPoint()
Compute intersections.
- Parameters
-
[in] | _forceSceneUpdate | Performance optimization hint When true Ogre2 will update all derived transforms to their latest to get correct results. |
When false, that step is skipped. It is only safe to set it to false when nothing has changed since the last update (i.e. nothing moved, no new objects created).
Ogre will assert if built in Debug mode if this value is set to false when it shouldn't be.
See https://ogrecave.github.io/ogre-next/api/2.2/ _ogre20_changes.html::AssersionCachedOutOfDate for more info
- Returns
- A vector of intersection results
Implements RayQuery.
Reimplemented in OgreRayQuery, and Ogre2RayQuery.
References RayQueryResult::distance.
◆ Direction()
Get ray direction.
- Returns
- Ray direction.
Implements RayQuery.
◆ Origin()
Get ray origin.
- Returns
- Ray origin
Implements RayQuery.
◆ SetDirection()
Set ray direction.
- Parameters
-
Implements RayQuery.
◆ SetFromCamera()
◆ SetOrigin()
Set ray origin.
- Parameters
-
Implements RayQuery.
◆ SetPreferGpu()
template<class T >
void SetPreferGpu |
( |
bool |
_preferGpu | ) |
|
|
overridevirtual |
If possible & supported (and user called SetFromCamera()) will use the GPU to perform the ray query. Triangle-level accurate.
- Parameters
-
[in] | _preferGpu | True to use the GPU if available & possible. False to never use the GPU. |
Implements RayQuery.
Reimplemented in Ogre2RayQuery.
◆ UsesGpu()
◆ direction
◆ origin
The documentation for this class was generated from the following file: