37 #include "../idlib/precompiled.h"
66 for ( bref = node->
brushes; bref; bref = bref->
next ) {
140 #ifdef NO_SPATIAL_SUBDIVISION
151 if ( t1 >= offset && t2 >= offset ) {
156 if ( t1 < -offset && t2 < -offset ) {
162 idist = 1.0f / (t1-t2);
164 frac2 = (t1 +
offset) * idist;
165 frac = (t1 -
offset) * idist;
166 }
else if (t1 > t2) {
167 idist = 1.0f / (t1-t2);
169 frac2 = (t1 -
offset) * idist;
170 frac = (t1 +
offset) * idist;
181 else if ( frac > 1.0
f ) {
185 midf = p1f + (p2f - p1f)*frac;
187 mid[0] = p1[0] + frac*(p2[0] - p1[0]);
188 mid[1] = p1[1] + frac*(p2[1] - p1[1]);
189 mid[2] = p1[2] + frac*(p2[2] - p1[2]);
195 if ( frac2 < 0.0
f ) {
198 else if ( frac2 > 1.0
f ) {
202 midf = p1f + (p2f - p1f)*frac2;
204 mid[0] = p1[0] + frac2*(p2[0] - p1[0]);
205 mid[1] = p1[1] + frac2*(p2[1] - p1[1]);
206 mid[2] = p1[2] + frac2*(p2[2] - p1[2]);
237 for ( i = 0; i < numSteps; i++ ) {
bool RotateTrmThroughPolygon(cm_traceWork_t *tw, cm_polygon_t *p)
struct cm_node_s * children[2]
bool TestTrmVertsInBrush(cm_traceWork_t *tw, cm_brush_t *b)
struct cm_polygonRef_s * next
void TraceThroughAxialBSPTree_r(cm_traceWork_t *tw, cm_node_t *node, float p1f, float p2f, idVec3 &p1, idVec3 &p2)
void TraceThroughModel(cm_traceWork_t *tw)
void TraceTrmThroughNode(cm_traceWork_t *tw, cm_node_t *node)
#define CIRCLE_APPROXIMATION_LENGTH
bool TestTrmInPolygon(cm_traceWork_t *tw, cm_polygon_t *p)
void Set(const idVec3 &rotationOrigin, const idVec3 &rotationVec, const float rotationAngle)
struct cm_brushRef_s * next
cm_polygonRef_t * polygons
bool TranslateTrmThroughPolygon(cm_traceWork_t *tw, cm_polygon_t *p)