MCPcopy Create free account
hub / github.com/ddiakopoulos/polymer / delete_selected_entity

Function delete_selected_entity

apps/editor/editor-app.cpp:5–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "editor-app.hpp"
4
5inline void delete_selected_entity(gizmo_controller * gizmo, scene & scene)
6{
7 const auto selection_list = gizmo->get_selection();
8 if (!selection_list.empty() && selection_list[0] != kInvalidEntity)
9 {
10 scene.destroy(selection_list[0]);
11 }
12 gizmo->clear();
13}
14
15scene_editor_app::scene_editor_app() : polymer_app(1920, 1080, "Polymer Scene Editor")
16{

Callers 2

on_inputMethod · 0.85
on_drawMethod · 0.85

Calls 4

get_selectionMethod · 0.80
emptyMethod · 0.45
destroyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected