29 #include "../../../idlib/precompiled.h"
34 #define LEDGE_EPSILON 0.1f
105 size = bounds[1] - bounds[0];
112 i = size[1] > size[0];
125 j =
end[!
i] > start[!
i];
157 for ( j = 0; j < 3; j++ ) {
158 if (
planes[i].Normal()[j] > 0.0
f ) {
276 for ( i = 0; i < nodeList.
Num(); i++ ) {
320 for ( j = 0; j <
ledgeList[
i].numPlanes; j++ ) {
356 if ( dist > radius ) {
359 else if ( dist < -radius ) {
393 if ( plane.
Distance( (*w)[i].ToVec3() ) > 0.0
f ) {
413 for ( j = 0; j < 2; j++ ) {
425 if ( !
ledgeList[i].PointBetweenBounds( v1 ) &&
430 if ( merged == -1 ) {
444 if ( merged == -1 ) {
482 v1 = (*w)[
i].ToVec3();
496 origin = (bounds[1] - bounds[0]) * 0.5
f;
498 origin = bounds[0] + origin;
502 if ( !
IsLedgeSide_r( root, &winding, plane, normal, origin, radius ) ) {
void GetBounds(idBounds &bounds) const
void CreateBevels(const idVec3 &gravityDir)
const idVec3 & Normal(void) const
idWinding * ChopWinding(const idWinding *winding) const
int GetContents(void) const
void AddLedge(const idVec3 &v1, const idVec3 &v2, idBrushBSPNode *node)
void SetNum(int newnum, bool resize=true)
float Distance(const idVec3 &v) const
const idPlane & GetPlane(void) const
const idPlane & GetPlane(void) const
#define AREACONTENTS_SOLID
int PlaneSide(const idPlane &plane, float epsilon=ON_EPSILON) const
idWinding * Reverse(void) const
void LedgeSubdivision(idBrushBSP &bsp)
void SetNormal(const idVec3 &normal)
idWinding * Clip(const idPlane &plane, const float epsilon=ON_EPSILON, const bool keepOn=false)
void FindLeafNodeLedges(idBrushBSPNode *root, idBrushBSPNode *node)
idBounds boundingBoxes[MAX_AAS_BOUNDING_BOXES]
int Split(idFixedWinding *back, const idPlane &plane, const float epsilon=ON_EPSILON)
idBrushBSPNode * GetRootNode(void) const
void RemoveFlagRecurse(int flag)
void LedgeSubdiv(idBrushBSPNode *root)
void WriteLedgeMap(const idStr &fileName, const idStr &ext)
idList< idLedge > ledgeList
bool AddPoint(const idVec3 &v)
GLfloat GLfloat GLfloat v2
int GetNumPoints(void) const
int Distance(CPoint pt1, CPoint pt2)
GLubyte GLubyte GLubyte GLubyte w
void AddPoint(const idVec3 &v)
void SetDist(const float dist)
idBrushBSPNode * GetNode(int side) const
idVec3 vec3_origin(0.0f, 0.0f, 0.0f)
static float Fabs(float f)
const idAASSettings * aasSettings
void LedgeSubdivFlood_r(idBrushBSPNode *node, const idLedge *ledge)
virtual void Printf(const char *fmt,...) id_attribute((format(printf
float Normalize(bool fixDegenerate=true)
void SetTexture(const idStr &textureName)
int Append(const type &obj)
idBrushBSPNode * GetChild(int index) const
bool RemoveIndex(int index)
idWinding * Copy(void) const
idBrushBSPPortal * GetPortals(void) const
bool PointBetweenBounds(const idVec3 &v) const
idWinding * GetWinding(void) const
idBrushBSPPortal * Next(int side) const
void DisplayRealTimeString(char *string,...)
void FindLedges_r(idBrushBSPNode *root, idBrushBSPNode *node)
void LedgeSubdivLeafNodes_r(idBrushBSPNode *node, const idLedge *ledge)
void WriteBrush(const idBrush *brush)
void Expand(const idBounds &bounds, float maxStepHeight)
bool IsLedgeSide_r(idBrushBSPNode *node, idFixedWinding *w, const idPlane &plane, const idVec3 &normal, const idVec3 &origin, const float radius)
bool FromSides(idList< idBrushSide * > &sideList)
void FitThroughPoint(const idVec3 &p)
bool Split(const idPlane &splitPlane, int splitPlaneNum)