Radium Engine  1.5.20
Loading...
Searching...
No Matches
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

◆ addIndex()

void Ra::Engine::Rendering::Renderer::PickingResult::addIndex ( const std::tuple< int, int, int > & idx)
inline

Add new ids to the result.

Definition at line 512 of file Renderer.hpp.

+ Here is the call graph for this function:

◆ clear()

void Ra::Engine::Rendering::Renderer::PickingResult::clear ( )
inline

Reset query to default.

Definition at line 525 of file Renderer.hpp.

◆ 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.

◆ getIndices()

const std::vector< std::tuple< int, int, int > > & Ra::Engine::Rendering::Renderer::PickingResult::getIndices ( ) const
inline

Read access to the collected ids.

Definition at line 508 of file Renderer.hpp.

◆ getMode()

Renderer::PickingMode Ra::Engine::Rendering::Renderer::PickingResult::getMode ( ) const
inline

Definition at line 543 of file Renderer.hpp.

◆ getRoIdx()

Core::Utils::Index Ra::Engine::Rendering::Renderer::PickingResult::getRoIdx ( ) const
inline

Definition at line 535 of file Renderer.hpp.

◆ removeDuplicatedIndices()

void Ra::Engine::Rendering::Renderer::PickingResult::removeDuplicatedIndices ( ) const
inline

Remove duplicates in m_indices.

Definition at line 520 of file Renderer.hpp.

+ Here is the call graph for this function:

◆ reserve()

void Ra::Engine::Rendering::Renderer::PickingResult::reserve ( size_t s)
inline

Reserve size of ids container.

Definition at line 516 of file Renderer.hpp.

◆ setDepth()

void Ra::Engine::Rendering::Renderer::PickingResult::setDepth ( Scalar depth)
inline

Definition at line 551 of file Renderer.hpp.

◆ setMode()

void Ra::Engine::Rendering::Renderer::PickingResult::setMode ( Renderer::PickingMode mode)
inline

Definition at line 539 of file Renderer.hpp.

◆ setRoIdx()

void Ra::Engine::Rendering::Renderer::PickingResult::setRoIdx ( Core::Utils::Index idx)
inline

Definition at line 531 of file Renderer.hpp.


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