Skip to content

Commit

Permalink
make it possible to change far clip plane of scene cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
rms80 committed Jun 20, 2018
1 parent 6611f52 commit 314631d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions platform/fCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ public float HorzFieldOfViewDeg
get { return camera.aspect * camera.fieldOfView; }
}

public float FarClipPlane {
get { return camera.farClipPlane; }
set { camera.farClipPlane = value; }
}


public Vector3f GetTarget()
{
Expand Down
16 changes: 16 additions & 0 deletions view/CameraTracking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,22 @@ public void UpdateMainCamOrthoSize()

}


/// <summary>
/// Set the far clipping plane of all the 3D-view cameras
/// </summary>
public void UpdateMainCamFarDistance(float distance)
{
if (mainCamera != null)
mainCamera.FarClipPlane = distance;
if (widgetCamera != null)
widgetCamera.FarClipPlane = distance;
if (hudCamera != null)
hudCamera.FarClipPlane = distance;
if (cursorCamera != null)
cursorCamera.FarClipPlane = distance;
}

}

}

0 comments on commit 314631d

Please sign in to comment.