[CAM SIMULATOR] Bug fixes for Issues #16073 and #16052 (#16118)

* Bug fixes for Issues #16073 and #16052

* Fix tool rendering when tool position is not reset. Issue #16180

* Fix some lint warnings
This commit is contained in:
Shai Seger
2024-09-02 19:31:08 +03:00
committed by GitHub
parent 5a1275ad60
commit 3067946b4d
9 changed files with 85 additions and 82 deletions

View File

@@ -363,10 +363,10 @@ void SimDisplay::RenderLightObject()
void SimDisplay::ScaleViewToStock(StockObject* obj)
{
mMaxStockDim = fmaxf(obj->size[0], obj->size[1]);
maxFar = mMaxStockDim * 4;
maxFar = mMaxStockDim * 16;
UpdateProjection();
vec3_set(eye, 0, 0, 0);
UpdateEyeFactor(0.4f);
UpdateEyeFactor(0.1f);
vec3_set(lightPos, obj->position[0], obj->position[1], obj->position[2] + mMaxStockDim / 3);
mlightObject.SetPosition(lightPos);
}