| 368 | } |
| 369 | |
| 370 | void SDFEditor::setupCurrentModes2D() |
| 371 | { |
| 372 | const float minSide = float(std::min(mFrameDim.x, mFrameDim.y)); |
| 373 | const float side = minSide / 6.0f; |
| 374 | const float markerSize = side * 0.5f / kMarkerSizeFactor; |
| 375 | const float roundedRadius = markerSize * 0.15f; |
| 376 | const float cornerOffset = 10.0f; |
| 377 | const float2 center = float2(side * 0.5f, mFrameDim.y - side * 0.5f) + float2(cornerOffset, -cornerOffset); |
| 378 | |
| 379 | // Setup a rounded box as a background where the selected shape and operation will be displayed. |
| 380 | mUI2D.pMarker2DSet->addRoundedBox(center, float2(side, side) * 0.5f, roundedRadius, 0.0f, kCurrentModeBGColor); // Add the background |
| 381 | // box, in which we will |
| 382 | // draw markers. |
| 383 | |
| 384 | // Setup the selected shape and operation markers. |
| 385 | float f = mUI2D.currentEditingOperator == SDFOperationType::SmoothUnion ? kMarkerSizeFactorSmoothUnion : kMarkerSizeFactor; |
| 386 | setupPrimitiveAndOperation(center, markerSize * f, mUI2D.currentEditingShape, mUI2D.currentEditingOperator, kMarkerColor); |
| 387 | } |
| 388 | |
| 389 | void SDFEditor::manipulateGridPlane( |
| 390 | SDFGridPlane& gridPlane, |
nothing calls this directly
no test coverage detected