MCPcopy Create free account
hub / github.com/Illation/ETEngine / Pick

Method Pick

Engine/source/EtEditor/SceneEditor/SceneSelection.cpp:130–144  ·  view source on GitHub ↗

---------------------------------------------------- SceneSelection::Pick try picking an entity from within the viewport

Source from the content-addressed store, hash-verified

128// try picking an entity from within the viewport
129//
130void SceneSelection::Pick(ivec2 const pos, render::Viewport* const viewport, bool const add)
131{
132 if (!add)
133 {
134 ClearSelection(true);
135 }
136
137 m_IdRenderer.Pick(pos, viewport, std::function<void(fw::T_EntityId const)>([this](fw::T_EntityId const pickResult)
138 {
139 if (pickResult != fw::INVALID_ENTITY_ID)
140 {
141 ToggleEntitySelected(pickResult, true);
142 }
143 }));
144}
145
146//----------------------------------------------------
147// SceneSelection::UpdateOutliners

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected