internal void correctCameraPositionForIncludingTextLabels(ViewPort viewport) { _cam.SetViewPort(viewport); _cam.shoot(_cameraMode); _axe.Draw(_cam); Clear(); AxeBox abox = (AxeBox)_axe; BoundingBox3d newBounds = abox.WholeBounds.scale(_scaling); if (_viewmode == Modes.ViewPositionMode.TOP) { float radius = (float)Math.Max(newBounds.xmax - newBounds.xmin, newBounds.ymax - newBounds.ymin); radius += radius * STRETCH_RATIO; _cam.RenderingSphereRadius = radius; } else { _cam.RenderingSphereRadius = (float)newBounds.getRadius(); Coord3d target = newBounds.getCenter(); Coord3d eye = _viewpoint.cartesian().@add(target); _cam.Target = target; _cam.Eye = eye; } }
public void UpdateCamera(ViewPort viewport, BoundingBox3d boundsScaled) { UpdateCamera(viewport, boundsScaled, (float)boundsScaled.getRadius()); }