Insanely huge initial commit

This commit is contained in:
2026-02-21 17:04:05 -08:00
parent 9cdd36191a
commit 613d75914a
22525 changed files with 4035207 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
namespace MoreMountains.Tools
{
/// <summary>
/// Renderer extensions
/// </summary>
public static class RendererExtensions
{
/// <summary>
/// Returns true if a renderer is visible from a camera
/// </summary>
/// <param name="renderer"></param>
/// <param name="camera"></param>
/// <returns></returns>
public static bool MMIsVisibleFrom(this Renderer renderer, Camera camera)
{
Plane[] frustumPlanes = GeometryUtility.CalculateFrustumPlanes(camera);
return GeometryUtility.TestPlanesAABB(frustumPlanes, renderer.bounds);
}
}
}