WeatherMakerGeometryUtilityBoxIntersectsFrustum Method |
Exact frustum box intersect, unlike Unity frustum culling this does not sometimes fail on objects that are not in the frustum
All credit goes to https://www.iquilezles.org/www/articles/frustumcorrect/frustumcorrect.htm, very smart person :)
Also http://www.flipcode.com/archives/Frustum_Culling.shtml was helpful
Namespace:
DigitalRuby.WeatherMaker
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public static bool BoxIntersectsFrustum(
Camera camera,
Plane[] frustumPlanes,
Vector3[] frustumCorners,
Bounds box
)
Public Shared Function BoxIntersectsFrustum (
camera As Camera,
frustumPlanes As Plane(),
frustumCorners As Vector3(),
box As Bounds
) As Boolean
public:
static bool BoxIntersectsFrustum(
Camera^ camera,
array<Plane>^ frustumPlanes,
array<Vector3>^ frustumCorners,
Bounds box
)
static member BoxIntersectsFrustum :
camera : Camera *
frustumPlanes : Plane[] *
frustumCorners : Vector3[] *
box : Bounds -> bool
Parameters
- camera
- Type: Camera
Camera - frustumPlanes
- Type: Plane
Frustum planes - frustumCorners
- Type: Vector3
Frustum corners - box
- Type: Bounds
AABB box
Return Value
Type:
BooleanTrue if intersect or contained in frustum, false otherwise. Returns true if camera is null.
See Also