Skip to content

Commit 419dd32

Browse files
committed
Add class description on CameraCache
1 parent cb709a0 commit 419dd32

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Assets/HoloToolkit/Utilities/Scripts/CameraCache.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
namespace HoloToolkit.Unity
77
{
8+
/// <summary>
9+
/// The purpose of this class is to provide a cached reference to the main camera. Calling Camera.main
10+
/// executes a FindByTag on the scene, which will get worse and worse with more tagged objects.
11+
/// </summary>
812
public static class CameraCache
913
{
1014
private static Camera cachedCamera;
@@ -24,7 +28,6 @@ public static Camera Main
2428
/// Set the cached camera to a new reference and return it
2529
/// </summary>
2630
/// <param name="newMain">New main camera to cache</param>
27-
/// <returns></returns>
2831
public static Camera Refresh(Camera newMain)
2932
{
3033
return cachedCamera = newMain;

Assets/HoloToolkit/Utilities/Scripts/Extensions/CameraExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public static float GetHorizontalFieldOfViewRadians(this Camera camera)
2020
/// <summary>
2121
/// Returns if a point will be rendered on the screen in either eye
2222
/// </summary>
23+
/// <param name="camera">The camera to check the point against</param>
2324
/// <param name="position"></param>
2425
/// <returns></returns>
2526
public static bool IsInFOV(this Camera camera, Vector3 position)

0 commit comments

Comments
 (0)