Radium Engine  1.5.0
Ra::Engine::Rendering::Renderer::PickingResult Class Reference

Result of a PickingQuery. More...

#include <Engine/Rendering/Renderer.hpp>

+ Collaboration diagram for Ra::Engine::Rendering::Renderer::PickingResult:

Public Member Functions

const std::vector< std::tuple< int, int, int > > & getIndices () const
 Read access to the collected ids.
 
void addIndex (const std::tuple< int, int, int > &idx)
 Add new ids to the result.
 
void reserve (size_t s)
 Reserve size of ids container.
 
void removeDuplicatedIndices () const
 Remove duplicates in m_indices.
 
void clear ()
 Reset query to default.
 
void setRoIdx (Core::Utils::Index idx)
 
Core::Utils::Index getRoIdx () const
 
void setMode (PickingMode mode)
 
PickingMode getMode () const
 
Scalar getDepth () const
 
void setDepth (Scalar depth)
 

Detailed Description

Result of a PickingQuery.

For each selected pixel, store the following indices: <elementIdx, vertexIdx, edgeIdx>

  • elementIdx: Index of the selected face or edge (for mesh and line mesh respectively). Set to -1 for point clouds.
  • vertexIdx: On meshes/lines: index of the closest vertex on the selected face/edge. On point-clouds: index of the selected vertex
  • edgeIdx: On meshes/lines: index of the closest edge on the selected face/edge. In meshes, edgeIdx is defined using the index of the opposite vertex. Set to -1 for point clouds.

For performance reasons, there is no duplicate check when filling PickingResult. When required, call removeDuplicatedIndices() before processing indices().

See also
getPickingResults

Definition at line 108 of file Renderer.hpp.

Member Function Documentation

◆ getDepth()

Scalar Ra::Engine::Rendering::Renderer::PickingResult::getDepth ( ) const
inline

return depth read during picking query (only done during doPickinNow())

Todo:

fixup for all picking query,

improve picking.

Definition at line 547 of file Renderer.hpp.


The documentation for this class was generated from the following file: