NDEVR
API Documentation
SelectionInfo::ClosestModelInfo

Stores information about the closest model element found during a selection operation, tracking the nearest geometry, model, material, and layer for a given primitive type. More...

Collaboration diagram for SelectionInfo::ClosestModelInfo:
[legend]

Public Member Functions

 ClosestModelInfo ()
 Constructs a default ClosestModelInfo with invalid/default values.
void clear ()
 Resets all tracked closest-model data to default/invalid values.
void setMaxDistance (fltp08 distance)
 Sets the maximum screen-space distance threshold for considering a hit.
void update (const SelectionArea< 3, fltp08 > &new_selection, const SelectionArea< 3, fltp08 > &old_selection)
 Updates internal state when the selection area changes, adjusting tracked distances and positions relative to the new selection.

Public Attributes

Matrix< fltp08geometry_transform
 The world transform of the nearest geometry.
bool is_smooth = false
 Whether the nearest hit lies on a smooth (interpolated) surface.
UUID nearest_geometry
 The UUID of the nearest geometry object.
uint04 nearest_index
 The primitive index of the nearest hit.
UUID nearest_layer
 The UUID of the nearest layer.
UUID nearest_material
 The UUID of the nearest material.
UUID nearest_model
 The UUID of the nearest model object.
uint04 nearest_vertex
 The vertex index of the nearest hit.
fltp08 screen_distance
 The screen-space distance to the nearest hit.
Vertex< 3, fltp08screen_location
 The screen-space position of the nearest hit.

Detailed Description

Stores information about the closest model element found during a selection operation, tracking the nearest geometry, model, material, and layer for a given primitive type.


Definition at line 58 of file Selector.h.

Member Function Documentation

◆ setMaxDistance()

void SelectionInfo::ClosestModelInfo::setMaxDistance ( fltp08 distance)

Sets the maximum screen-space distance threshold for considering a hit.

Parameters
[in]distanceThe maximum distance in screen coordinates.

◆ update()

void SelectionInfo::ClosestModelInfo::update ( const SelectionArea< 3, fltp08 > & new_selection,
const SelectionArea< 3, fltp08 > & old_selection )

Updates internal state when the selection area changes, adjusting tracked distances and positions relative to the new selection.

Parameters
[in]new_selectionThe current selection area.
[in]old_selectionThe previous selection area.

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