29 #ifndef __BV_FRUSTUM_H__
30 #define __BV_FRUSTUM_H__
59 float GetUp(
void )
const;
144 bool ClipLine(
const idVec3 localPoints[8],
const idVec3 points[8],
int startIndex,
int endIndex,
idVec3 &start,
idVec3 &end,
int &startClip,
int &endClip )
const;
161 assert( dNear >= 0.0
f && dFar > dNear && dLeft > 0.0
f && dUp > 0.0
f );
170 assert( dNear >= 0.0
f && dFar > dNear );
239 invFar = 1.0f /
dFar;
void AxisProjection(const idVec3 &dir, float &min, float &max) const
float PlaneDistance(const idPlane &plane) const
bool CullSphere(const idSphere &sphere) const
bool ConstrainToBox(const idBox &box)
GLsizei const GLfloat * points
idFrustum & RotateSelf(const idMat3 &rotation)
void SetOrigin(const idVec3 &origin)
const idVec3 & GetOrigin(void) const
assert(prefInfo.fullscreenBtn)
void ToIndexPointsAndCornerVecs(idVec3 indexPoints[8], idVec3 cornerVecs[4]) const
bool CullFrustum(const idFrustum &frustum) const
void ToPoints(idVec3 points[8]) const
bool LocalRayIntersection(const idVec3 &start, const idVec3 &dir, float &scale1, float &scale2) const
bool LocalLineIntersection(const idVec3 &start, const idVec3 &end) const
void ClipFrustumToBox(const idBox &box, float clipFractions[4], int clipPlanes[4]) const
void AddLocalLineToProjectionBoundsUseCull(const idVec3 &start, const idVec3 &end, int startCull, int endCull, idBounds &bounds) const
void MoveFarDistance(float dFar)
GLenum GLenum GLenum GLenum GLenum scale
idFrustum Expand(const float d) const
bool IntersectsBounds(const idBounds &bounds) const
bool ConstrainToBounds(const idBounds &bounds)
void SetSize(float dNear, float dFar, float dLeft, float dUp)
void ToPlanes(idPlane planes[6]) const
bool LineIntersection(const idVec3 &start, const idVec3 &end) const
void MoveNearDistance(float dNear)
idFrustum & ExpandSelf(const float d)
bool CullLocalBox(const idVec3 &localOrigin, const idVec3 &extents, const idMat3 &localAxis) const
void AddLocalLineToProjectionBoundsSetCull(const idVec3 &start, const idVec3 &end, int &startCull, int &endCull, idBounds &bounds) const
bool AddLocalCapsToProjectionBounds(const idVec3 endPoints[4], const int endPointCull[4], const idVec3 &point, int pointCull, int pointClip, idBounds &projectionBounds) const
idVec3 GetCenter(void) const
bool ProjectionBounds(const idBounds &bounds, idBounds &projectionBounds) const
float GetNearDistance(void) const
const idMat3 & GetAxis(void) const
bool CullLocalWinding(const idVec3 *points, const int numPoints, int *pointCull) const
bool CullBox(const idBox &box) const
bool ContainsPoint(const idVec3 &point) const
bool ClipLine(const idVec3 localPoints[8], const idVec3 points[8], int startIndex, int endIndex, idVec3 &start, idVec3 &end, int &startClip, int &endClip) const
bool IntersectsBox(const idBox &box) const
bool LocalFrustumIntersectsFrustum(const idVec3 points[8], const bool testFirstSide) const
void SetPyramid(float dNear, float dFar)
int PlaneSide(const idPlane &plane, const float epsilon=ON_EPSILON) const
bool CullWinding(const class idWinding &winding) const
bool IntersectsWinding(const idWinding &winding) const
idFrustum & TranslateSelf(const idVec3 &translation)
idFrustum Translate(const idVec3 &translation) const
idFrustum Rotate(const idMat3 &rotation) const
float GetLeft(void) const
bool LocalFrustumIntersectsBounds(const idVec3 points[8], const idBounds &bounds) const
void SetAxis(const idMat3 &axis)
void ToClippedPoints(const float fractions[4], idVec3 points[8]) const
void ToIndexPoints(idVec3 indexPoints[8]) const
bool ClippedProjectionBounds(const idFrustum &frustum, const idBox &clipBox, idBounds &projectionBounds) const
bool ConstrainToSphere(const idSphere &sphere)
bool FromProjection(const idBounds &bounds, const idVec3 &projectionOrigin, const float dFar)
bool IntersectsFrustum(const idFrustum &frustum) const
bool CullBounds(const idBounds &bounds) const
bool CullLocalFrustum(const idFrustum &localFrustum, const idVec3 indexPoints[8], const idVec3 cornerVecs[4]) const
bool BoundsRayIntersection(const idBounds &bounds, const idVec3 &start, const idVec3 &dir, float &scale1, float &scale2) const
bool RayIntersection(const idVec3 &start, const idVec3 &dir, float &scale1, float &scale2) const
bool ConstrainToFrustum(const idFrustum &frustum)
float GetFarDistance(void) const
bool CullPoint(const idVec3 &point) const
bool IntersectsSphere(const idSphere &sphere) const
bool BoundsCullLocalFrustum(const idBounds &bounds, const idFrustum &localFrustum, const idVec3 indexPoints[8], const idVec3 cornerVecs[4]) const