1234567891011121314151617181920212223 |
- #ifndef CORE_FRUSTUM_H
- #define CORE_FRUSTUM_H
- #include "core/Matrix.h"
- #include "core/Plane.h"
- typedef struct {
- Matrix projection;
- Plane planes[6];
- float tan;
- float nearClip;
- float farClip;
- } Frustum;
- void initFrustum(Frustum* f, float fieldOfView, float nearClip, float farClip);
- const Matrix* updateProjection(Frustum* f, const IntVector2* size);
- void updateFrustumPlanes(Frustum* f, const Vector3* pos, const Vector3* right,
- const Vector3* up, const Vector3* front,
- const IntVector2* size);
- bool isInsideFrustum(const Frustum* f, const Vector3* pos);
- bool isInsideFrustumRadius(const Frustum* f, const Vector3* pos, float radius);
- #endif
|