MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / renderUI

Method renderUI

Source/RenderPasses/SDFEditor/SDFEditor.cpp:1266–1392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1264}
1265
1266void SDFEditor::renderUI(RenderContext* pRenderContext, Gui::Widgets& widget)
1267{
1268 widget.text("Help:");
1269 widget.tooltip(
1270 "Abbreviations: Prim=Primitive, Op=Operation, MB = mouse button, LMB = left MB, RMB = right MB, MMB = middle MB\n"
1271 "\n"
1272 "To create an SDF from an empty grid, use either the grid plane to place the SDF on, or intersect the grid instance with other "
1273 "geometry and toggle Editing on Other surfaces by pressing 'C'.\n"
1274 "\n"
1275 "* Bring up prim type / op selection: Hold Tab\n"
1276 "* Select prim type / op in selection : LMB\n"
1277 "* Rotate prim: CTRL+R, move mouse, LMB to confirm\n"
1278 "* Scale prim: Ctrl+S, move mouse, LMB to confirm\n"
1279 "* During scaling of prim: \n"
1280 " Key 1: scale only X\n"
1281 " Key 2: scale only Y\n"
1282 " Key 3: scale only Z\n"
1283 " Key 4: change op smoothing (no visualization).\n"
1284 " Pressing the same key again goes back to scaling all (except Operator Smoothing).\n"
1285 "\n"
1286 "Show true primitive preview : Hold Alt + move mouse\n"
1287 "Add Primitive : Hold Alt + LMB\n"
1288 "Undo added prim : Ctrl + Z\n"
1289 "Redo added prim : Ctrl + Y\n"
1290 "\n"
1291 "Translate instance : Shift + T, then move mouse or scroll wheel\n"
1292 "Rotate instance : Shift + R, then move mouse\n"
1293 "Scale instance : Shift + S, then move mouse\n"
1294 "\n"
1295 "Toggle Gridplane : G\n"
1296 "Toggle Symmetry : H\n"
1297 "Toggle Primitive Preview : X\n"
1298 "Toggle Editing on Other Surfaces : C\n"
1299 "Change Bounding Box Vis : B\n"
1300 "\n"
1301 "Rotate grid plane : Hold RMB + move mouse\n"
1302 "Rotate grid plane around primary axis : Hold CTRL + RMB + move mouse\n"
1303 "Translate grid plane : Hold Shift + RMB + move mouse\n"
1304 "\n"
1305 "Rotate symmetry plane : Hold MMB + move mouse\n"
1306 "Rotate symmetry plane around primary axis : Hold CTRL + MMB + move mouse\n"
1307 "Translate symmetry plane : Hold Shift + MMB + move mouse"
1308 );
1309
1310 if (auto group = widget.group("IO", true))
1311 {
1312 // TODO: Make the button gray (disabled) instead of removing it.
1313 if (mCurrentEdit.pSDFGrid->wasInitializedWithPrimitives())
1314 {
1315 if (group.button("Save SDF primitives", false))
1316 {
1317 std::filesystem::path filePath = "sdfGrid.sdf";
1318 if (saveFileDialog(kSDFFileExtensionFilters, filePath))
1319 {
1320 mCurrentEdit.pSDFGrid->writePrimitivesToFile(filePath);
1321 }
1322 }
1323 }

Callers

nothing calls this directly

Calls 15

textMethod · 0.80
tooltipMethod · 0.80
groupMethod · 0.80
buttonMethod · 0.80
writePrimitivesToFileMethod · 0.80
checkboxMethod · 0.80
varMethod · 0.80
directionMethod · 0.80
sliderMethod · 0.80
rgbaColorMethod · 0.80
dropdownMethod · 0.80

Tested by

no test coverage detected