MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / DrawObjectGUI

Method DrawObjectGUI

samples/luxcoreui/acceleratorwindow.cpp:59–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59bool AcceleratorWindow::DrawObjectGUI(Properties &props, bool &modifiedProps) {
60 //------------------------------------------------------------------
61 // accelerator.type
62 //------------------------------------------------------------------
63
64 const string currentSamplerType = props.Get(Property("accelerator.type")(typeTable.GetDefaultTag())).Get<string>();
65 int typeIndex = typeTable.GetVal(currentSamplerType);
66
67 if (ImGui::Combo("Ray/triangle intersection accelerator type", &typeIndex, typeTable.GetTagList())) {
68 props.Clear();
69
70 props << Property("accelerator.type")(typeTable.GetTag(typeIndex));
71
72 return true;
73 }
74 ImGui::SameLine();
75 ImGui::TextDisabled("(?)");
76 if (ImGui::IsItemHovered())
77 ImGui::SetTooltip("accelerator.type");
78
79 bool bval = props.Get("accelerator.instances.enable").Get<float>();
80 if (ImGui::Checkbox("Instances support", &bval)) {
81 props.Set(Property("accelerator.instances.enable")(bval));
82 modifiedProps = true;
83 }
84 LuxCoreApp::HelpMarker("accelerator.instances.enable");
85
86 return false;
87}

Callers

nothing calls this directly

Calls 9

Get<string>Method · 0.80
GetMethod · 0.80
GetDefaultTagMethod · 0.80
GetValMethod · 0.80
GetTagListMethod · 0.80
Get<float>Method · 0.80
SetMethod · 0.80
ClearMethod · 0.45
GetTagMethod · 0.45

Tested by

no test coverage detected