Files
lity3d/Engine/Rendering/frustum.h
T

9 lines
382 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#include "../ASM/math_c_fallback.h"
// 从视图*投影矩阵提取 6 个视锥平面(行主序,planes[0..5] = left, right, bottom, top, near, far)
void frustum_from_matrix(const Mat4* vp, Vec4 planes[6]);
// 判断球体是否与视锥相交(1=可见/相交,0=完全在外)
int frustum_intersects_sphere(const Vec4 planes[6], Vec3 center, float radius);