Tiny refactoring for simplify code

pull/3/head
Hleb Valoshka 2019-11-08 00:56:26 +03:00
parent 0d5e867219
commit 08907c5883
1 changed files with 2 additions and 5 deletions

View File

@ -2500,16 +2500,13 @@ void Renderer::draw(const Observer& observer,
m_cameraOrientation = observer.getOrientationf();
// Get the view frustum used for culling in camera space.
float viewAspectRatio = (float) windowWidth / (float) windowHeight;
Frustum frustum(degToRad(fov),
viewAspectRatio,
getAspectRatio(),
MinNearPlaneDistance);
// Get the transformed frustum, used for culling in the astrocentric coordinate
// system.
Frustum xfrustum(degToRad(fov),
viewAspectRatio,
MinNearPlaneDistance);
Frustum xfrustum(frustum);
xfrustum.transform(observer.getOrientationf().conjugate().toRotationMatrix());
// Set up the camera for star rendering; the units of this phase