This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Functions | |
| void | AAS_ClearShownDebugLines (void) |
| void | AAS_ClearShownPolygons (void) |
| void | AAS_DebugLine (vec3_t start, vec3_t end, int color) |
| void | AAS_DrawArrow (vec3_t start, vec3_t end, int linecolor, int arrowcolor) |
| void | AAS_DrawCross (vec3_t origin, float size, int color) |
| void | AAS_DrawPermanentCross (vec3_t origin, float size, int color) |
| void | AAS_DrawPlaneCross (vec3_t point, vec3_t normal, float dist, int type, int color) |
| void | AAS_PermanentLine (vec3_t start, vec3_t end, int color) |
| void | AAS_PrintTravelType (int traveltype) |
| void | AAS_ShowArea (int areanum, int groundfacesonly) |
| void | AAS_ShowAreaPolygons (int areanum, int color, int groundfacesonly) |
| void | AAS_ShowBoundingBox (vec3_t origin, vec3_t mins, vec3_t maxs) |
| void | AAS_ShowFace (int facenum) |
| void | AAS_ShowReachability (struct aas_reachability_s *reach) |
| void | AAS_ShowReachableAreas (int areanum) |
|
|
Definition at line 103 of file be_aas_debug.c. References botimport, botlib_import_s::DebugLineDelete, debuglines, debuglinevisible, and i. 00104 {
00105 int i;
00106
00107 //make all lines invisible
00108 for (i = 0; i < MAX_DEBUGLINES; i++)
00109 {
00110 if (debuglines[i])
00111 {
00112 //botimport.DebugLineShow(debuglines[i], NULL, NULL, LINECOLOR_NONE);
00113 botimport.DebugLineDelete(debuglines[i]);
00114 debuglines[i] = 0;
00115 debuglinevisible[i] = qfalse;
00116 } //end if
00117 } //end for
00118 } //end of the function AAS_ClearShownDebugLines
|
|
|
Definition at line 60 of file be_aas_debug.c. References botimport, botlib_import_s::DebugPolygonDelete, debugpolygons, and i. Referenced by BotExportTest(). 00061 {
00062 int i;
00063 //*
00064 for (i = 0; i < MAX_DEBUGPOLYGONS; i++)
00065 {
00066 if (debugpolygons[i]) botimport.DebugPolygonDelete(debugpolygons[i]);
00067 debugpolygons[i] = 0;
00068 } //end for
00069 //*/
00070 /*
00071 for (i = 0; i < MAX_DEBUGPOLYGONS; i++)
00072 {
00073 botimport.DebugPolygonDelete(i);
00074 debugpolygons[i] = 0;
00075 } //end for
00076 */
00077 } //end of the function AAS_ClearShownPolygons
|
|
||||||||||||||||
|
Definition at line 125 of file be_aas_debug.c. References botimport, botlib_import_s::DebugLineCreate, debuglines, botlib_import_s::DebugLineShow, debuglinevisible, line, and numdebuglines. Referenced by AAS_ClientMovementPrediction(), AAS_DrawArrow(), AAS_DrawCross(), AAS_DrawPermanentCross(), and AAS_ShowFace(). 00126 {
00127 int line;
00128
00129 for (line = 0; line < MAX_DEBUGLINES; line++)
00130 {
00131 if (!debuglines[line])
00132 {
00133 debuglines[line] = botimport.DebugLineCreate();
00134 debuglinevisible[line] = qfalse;
00135 numdebuglines++;
00136 } //end if
00137 if (!debuglinevisible[line])
00138 {
00139 botimport.DebugLineShow(debuglines[line], start, end, color);
00140 debuglinevisible[line] = qtrue;
00141 return;
00142 } //end else
00143 } //end for
00144 } //end of the function AAS_DebugLine
|
|
||||||||||||||||||||
|
Definition at line 579 of file be_aas_debug.c. References AAS_DebugLine(), CrossProduct(), DotProduct, p2, up, vec3_t, VectorCopy, VectorMA, VectorNormalize(), VectorSet, and VectorSubtract. Referenced by AAS_ShowReachability(). 00580 {
00581 vec3_t dir, cross, p1, p2, up = {0, 0, 1};
00582 float dot;
00583
00584 VectorSubtract(end, start, dir);
00585 VectorNormalize(dir);
00586 dot = DotProduct(dir, up);
00587 if (dot > 0.99 || dot < -0.99) VectorSet(cross, 1, 0, 0);
00588 else CrossProduct(dir, up, cross);
00589
00590 VectorMA(end, -6, dir, p1);
00591 VectorCopy(p1, p2);
00592 VectorMA(p1, 6, cross, p1);
00593 VectorMA(p2, -6, cross, p2);
00594
00595 AAS_DebugLine(start, end, linecolor);
00596 AAS_DebugLine(p1, end, arrowcolor);
00597 AAS_DebugLine(p2, end, arrowcolor);
00598 } //end of the function AAS_DrawArrow
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 525 of file be_aas_debug.c. References AAS_DebugLine(), i, vec3_t, and VectorCopy. Referenced by AAS_ShowReachability(). 00526 {
00527 int i;
00528 vec3_t start, end;
00529
00530 for (i = 0; i < 3; i++)
00531 {
00532 VectorCopy(origin, start);
00533 start[i] += size;
00534 VectorCopy(origin, end);
00535 end[i] -= size;
00536 AAS_DebugLine(start, end, color);
00537 } //end for
00538 } //end of the function AAS_DrawCross
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 164 of file be_aas_debug.c. References AAS_DebugLine(), botimport, botlib_import_s::DebugLineCreate, botlib_import_s::DebugLineShow, i, vec3_t, and VectorCopy. Referenced by AAS_BestReachableArea(). 00165 {
00166 int i, debugline;
00167 vec3_t start, end;
00168
00169 for (i = 0; i < 3; i++)
00170 {
00171 VectorCopy(origin, start);
00172 start[i] += size;
00173 VectorCopy(origin, end);
00174 end[i] -= size;
00175 AAS_DebugLine(start, end, color);
00176 debugline = botimport.DebugLineCreate();
00177 botimport.DebugLineShow(debugline, start, end, color);
00178 } //end for
00179 } //end of the function AAS_DrawPermanentCross
|
Here is the call graph for this function:

|
||||||||||||||||||||||||
|
Definition at line 186 of file be_aas_debug.c. References botimport, botlib_import_s::DebugLineCreate, debuglines, botlib_import_s::DebugLineShow, debuglinevisible, j, line, numdebuglines, point, type, vec3_t, and VectorCopy. Referenced by BotExportTest(). 00187 {
00188 int n0, n1, n2, j, line, lines[2];
00189 vec3_t start1, end1, start2, end2;
00190
00191 //make a cross in the hit plane at the hit point
00192 VectorCopy(point, start1);
00193 VectorCopy(point, end1);
00194 VectorCopy(point, start2);
00195 VectorCopy(point, end2);
00196
00197 n0 = type % 3;
00198 n1 = (type + 1) % 3;
00199 n2 = (type + 2) % 3;
00200 start1[n1] -= 6;
00201 start1[n2] -= 6;
00202 end1[n1] += 6;
00203 end1[n2] += 6;
00204 start2[n1] += 6;
00205 start2[n2] -= 6;
00206 end2[n1] -= 6;
00207 end2[n2] += 6;
00208
00209 start1[n0] = (dist - (start1[n1] * normal[n1] +
00210 start1[n2] * normal[n2])) / normal[n0];
00211 end1[n0] = (dist - (end1[n1] * normal[n1] +
00212 end1[n2] * normal[n2])) / normal[n0];
00213 start2[n0] = (dist - (start2[n1] * normal[n1] +
00214 start2[n2] * normal[n2])) / normal[n0];
00215 end2[n0] = (dist - (end2[n1] * normal[n1] +
00216 end2[n2] * normal[n2])) / normal[n0];
00217
00218 for (j = 0, line = 0; j < 2 && line < MAX_DEBUGLINES; line++)
00219 {
00220 if (!debuglines[line])
00221 {
00222 debuglines[line] = botimport.DebugLineCreate();
00223 lines[j++] = debuglines[line];
00224 debuglinevisible[line] = qtrue;
00225 numdebuglines++;
00226 } //end if
00227 else if (!debuglinevisible[line])
00228 {
00229 lines[j++] = debuglines[line];
00230 debuglinevisible[line] = qtrue;
00231 } //end else
00232 } //end for
00233 botimport.DebugLineShow(lines[0], start1, end1, color);
00234 botimport.DebugLineShow(lines[1], start2, end2, color);
00235 } //end of the function AAS_DrawPlaneCross
|
|
||||||||||||||||
|
Definition at line 151 of file be_aas_debug.c. References botimport, botlib_import_s::DebugLineCreate, botlib_import_s::DebugLineShow, and line. Referenced by AAS_FindFaceReachabilities(), and AAS_Reachability_FuncBobbing(). 00152 {
00153 int line;
00154
00155 line = botimport.DebugLineCreate();
00156 botimport.DebugLineShow(line, start, end, color);
00157 } //end of the function AAS_PermenentLine
|
|
|
Definition at line 545 of file be_aas_debug.c. References botimport, PRT_MESSAGE, TRAVEL_BARRIERJUMP, TRAVEL_BFGJUMP, TRAVEL_CROUCH, TRAVEL_ELEVATOR, TRAVEL_FUNCBOB, TRAVEL_GRAPPLEHOOK, TRAVEL_INVALID, TRAVEL_JUMP, TRAVEL_JUMPPAD, TRAVEL_LADDER, TRAVEL_ROCKETJUMP, TRAVEL_SWIM, TRAVEL_TELEPORT, TRAVEL_WALK, TRAVEL_WALKOFFLEDGE, and TRAVEL_WATERJUMP. Referenced by AAS_ShowReachableAreas(), and BotMoveToGoal(). 00546 {
00547 #ifdef DEBUG
00548 char *str;
00549 //
00550 switch(traveltype & TRAVELTYPE_MASK)
00551 {
00552 case TRAVEL_INVALID: str = "TRAVEL_INVALID"; break;
00553 case TRAVEL_WALK: str = "TRAVEL_WALK"; break;
00554 case TRAVEL_CROUCH: str = "TRAVEL_CROUCH"; break;
00555 case TRAVEL_BARRIERJUMP: str = "TRAVEL_BARRIERJUMP"; break;
00556 case TRAVEL_JUMP: str = "TRAVEL_JUMP"; break;
00557 case TRAVEL_LADDER: str = "TRAVEL_LADDER"; break;
00558 case TRAVEL_WALKOFFLEDGE: str = "TRAVEL_WALKOFFLEDGE"; break;
00559 case TRAVEL_SWIM: str = "TRAVEL_SWIM"; break;
00560 case TRAVEL_WATERJUMP: str = "TRAVEL_WATERJUMP"; break;
00561 case TRAVEL_TELEPORT: str = "TRAVEL_TELEPORT"; break;
00562 case TRAVEL_ELEVATOR: str = "TRAVEL_ELEVATOR"; break;
00563 case TRAVEL_ROCKETJUMP: str = "TRAVEL_ROCKETJUMP"; break;
00564 case TRAVEL_BFGJUMP: str = "TRAVEL_BFGJUMP"; break;
00565 case TRAVEL_GRAPPLEHOOK: str = "TRAVEL_GRAPPLEHOOK"; break;
00566 case TRAVEL_JUMPPAD: str = "TRAVEL_JUMPPAD"; break;
00567 case TRAVEL_FUNCBOB: str = "TRAVEL_FUNCBOB"; break;
00568 default: str = "UNKNOWN TRAVEL TYPE"; break;
00569 } //end switch
00570 botimport.Print(PRT_MESSAGE, "%s", str);
00571 #endif
00572 } //end of the function AAS_PrintTravelType
|
|
||||||||||||
|
Definition at line 394 of file be_aas_debug.c. References aas_area_t, aas_edge_t, aas_face_t, aasworld, abs(), aas_s::areas, botimport, botlib_import_s::DebugLineCreate, debuglines, botlib_import_s::DebugLineShow, debuglinevisible, aas_s::edgeindex, aas_s::edges, FACE_GROUND, aas_face_s::faceflags, aas_s::faceindex, aas_s::faces, aas_face_s::firstedge, aas_area_s::firstface, i, j, line, n, aas_s::numareas, numdebuglines, aas_s::numedges, aas_face_s::numedges, aas_s::numfaces, aas_area_s::numfaces, PRT_ERROR, aas_edge_s::v, and aas_s::vertexes. 00395 {
00396 int areaedges[MAX_DEBUGLINES];
00397 int numareaedges, i, j, n, color = 0, line;
00398 int facenum, edgenum;
00399 aas_area_t *area;
00400 aas_face_t *face;
00401 aas_edge_t *edge;
00402
00403 //
00404 numareaedges = 0;
00405 //
00406 if (areanum < 0 || areanum >= aasworld.numareas)
00407 {
00408 botimport.Print(PRT_ERROR, "area %d out of range [0, %d]\n",
00409 areanum, aasworld.numareas);
00410 return;
00411 } //end if
00412 //pointer to the convex area
00413 area = &aasworld.areas[areanum];
00414 //walk through the faces of the area
00415 for (i = 0; i < area->numfaces; i++)
00416 {
00417 facenum = abs(aasworld.faceindex[area->firstface + i]);
00418 //check if face number is in range
00419 if (facenum >= aasworld.numfaces)
00420 {
00421 botimport.Print(PRT_ERROR, "facenum %d out of range\n", facenum);
00422 } //end if
00423 face = &aasworld.faces[facenum];
00424 //ground faces only
00425 if (groundfacesonly)
00426 {
00427 if (!(face->faceflags & (FACE_GROUND | FACE_LADDER))) continue;
00428 } //end if
00429 //walk through the edges of the face
00430 for (j = 0; j < face->numedges; j++)
00431 {
00432 //edge number
00433 edgenum = abs(aasworld.edgeindex[face->firstedge + j]);
00434 //check if edge number is in range
00435 if (edgenum >= aasworld.numedges)
00436 {
00437 botimport.Print(PRT_ERROR, "edgenum %d out of range\n", edgenum);
00438 } //end if
00439 //check if the edge is stored already
00440 for (n = 0; n < numareaedges; n++)
00441 {
00442 if (areaedges[n] == edgenum) break;
00443 } //end for
00444 if (n == numareaedges && numareaedges < MAX_DEBUGLINES)
00445 {
00446 areaedges[numareaedges++] = edgenum;
00447 } //end if
00448 } //end for
00449 //AAS_ShowFace(facenum);
00450 } //end for
00451 //draw all the edges
00452 for (n = 0; n < numareaedges; n++)
00453 {
00454 for (line = 0; line < MAX_DEBUGLINES; line++)
00455 {
00456 if (!debuglines[line])
00457 {
00458 debuglines[line] = botimport.DebugLineCreate();
00459 debuglinevisible[line] = qfalse;
00460 numdebuglines++;
00461 } //end if
00462 if (!debuglinevisible[line])
00463 {
00464 break;
00465 } //end else
00466 } //end for
00467 if (line >= MAX_DEBUGLINES) return;
00468 edge = &aasworld.edges[areaedges[n]];
00469 if (color == LINECOLOR_RED) color = LINECOLOR_BLUE;
00470 else if (color == LINECOLOR_BLUE) color = LINECOLOR_GREEN;
00471 else if (color == LINECOLOR_GREEN) color = LINECOLOR_YELLOW;
00472 else color = LINECOLOR_RED;
00473 botimport.DebugLineShow(debuglines[line],
00474 aasworld.vertexes[edge->v[0]],
00475 aasworld.vertexes[edge->v[1]],
00476 color);
00477 debuglinevisible[line] = qtrue;
00478 } //end for*/
00479 } //end of the function AAS_ShowArea
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 486 of file be_aas_debug.c. References aas_area_t, aas_face_t, AAS_ShowFacePolygon(), aasworld, abs(), aas_s::areas, botimport, FACE_GROUND, aas_face_s::faceflags, aas_s::faceindex, aas_s::faces, aas_area_s::firstface, aas_face_s::frontarea, i, aas_s::numareas, aas_s::numfaces, aas_area_s::numfaces, and PRT_ERROR. Referenced by AAS_AlternativeRouteGoals(), AAS_FloodAreas_r(), AAS_ShowReachability(), and BotExportTest(). 00487 {
00488 int i, facenum;
00489 aas_area_t *area;
00490 aas_face_t *face;
00491
00492 //
00493 if (areanum < 0 || areanum >= aasworld.numareas)
00494 {
00495 botimport.Print(PRT_ERROR, "area %d out of range [0, %d]\n",
00496 areanum, aasworld.numareas);
00497 return;
00498 } //end if
00499 //pointer to the convex area
00500 area = &aasworld.areas[areanum];
00501 //walk through the faces of the area
00502 for (i = 0; i < area->numfaces; i++)
00503 {
00504 facenum = abs(aasworld.faceindex[area->firstface + i]);
00505 //check if face number is in range
00506 if (facenum >= aasworld.numfaces)
00507 {
00508 botimport.Print(PRT_ERROR, "facenum %d out of range\n", facenum);
00509 } //end if
00510 face = &aasworld.faces[facenum];
00511 //ground faces only
00512 if (groundfacesonly)
00513 {
00514 if (!(face->faceflags & (FACE_GROUND | FACE_LADDER))) continue;
00515 } //end if
00516 AAS_ShowFacePolygon(facenum, color, face->frontarea != areanum);
00517 } //end for
00518 } //end of the function AAS_ShowAreaPolygons
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 242 of file be_aas_debug.c. References botimport, Com_Memcpy(), botlib_import_s::DebugLineCreate, debuglines, botlib_import_s::DebugLineShow, debuglinevisible, i, j, line, LINECOLOR_RED, numdebuglines, and vec3_t. Referenced by BotExportTest(). 00243 {
00244 vec3_t bboxcorners[8];
00245 int lines[3];
00246 int i, j, line;
00247
00248 //upper corners
00249 bboxcorners[0][0] = origin[0] + maxs[0];
00250 bboxcorners[0][1] = origin[1] + maxs[1];
00251 bboxcorners[0][2] = origin[2] + maxs[2];
00252 //
00253 bboxcorners[1][0] = origin[0] + mins[0];
00254 bboxcorners[1][1] = origin[1] + maxs[1];
00255 bboxcorners[1][2] = origin[2] + maxs[2];
00256 //
00257 bboxcorners[2][0] = origin[0] + mins[0];
00258 bboxcorners[2][1] = origin[1] + mins[1];
00259 bboxcorners[2][2] = origin[2] + maxs[2];
00260 //
00261 bboxcorners[3][0] = origin[0] + maxs[0];
00262 bboxcorners[3][1] = origin[1] + mins[1];
00263 bboxcorners[3][2] = origin[2] + maxs[2];
00264 //lower corners
00265 Com_Memcpy(bboxcorners[4], bboxcorners[0], sizeof(vec3_t) * 4);
00266 for (i = 0; i < 4; i++) bboxcorners[4 + i][2] = origin[2] + mins[2];
00267 //draw bounding box
00268 for (i = 0; i < 4; i++)
00269 {
00270 for (j = 0, line = 0; j < 3 && line < MAX_DEBUGLINES; line++)
00271 {
00272 if (!debuglines[line])
00273 {
00274 debuglines[line] = botimport.DebugLineCreate();
00275 lines[j++] = debuglines[line];
00276 debuglinevisible[line] = qtrue;
00277 numdebuglines++;
00278 } //end if
00279 else if (!debuglinevisible[line])
00280 {
00281 lines[j++] = debuglines[line];
00282 debuglinevisible[line] = qtrue;
00283 } //end else
00284 } //end for
00285 //top plane
00286 botimport.DebugLineShow(lines[0], bboxcorners[i],
00287 bboxcorners[(i+1)&3], LINECOLOR_RED);
00288 //bottom plane
00289 botimport.DebugLineShow(lines[1], bboxcorners[4+i],
00290 bboxcorners[4+((i+1)&3)], LINECOLOR_RED);
00291 //vertical lines
00292 botimport.DebugLineShow(lines[2], bboxcorners[i],
00293 bboxcorners[4+i], LINECOLOR_RED);
00294 } //end for
00295 } //end of the function AAS_ShowBoundingBox
|
Here is the call graph for this function:

|
|
Definition at line 302 of file be_aas_debug.c. References AAS_DebugLine(), aas_edge_t, aas_face_t, aas_plane_t, aasworld, abs(), botimport, aas_s::edgeindex, aas_s::edges, aas_s::faces, aas_face_s::firstedge, i, LINECOLOR_RED, aas_plane_s::normal, aas_s::numedges, aas_face_s::numedges, aas_s::numfaces, aas_face_s::planenum, aas_s::planes, PRT_ERROR, aas_edge_s::v, vec3_t, VectorCopy, VectorMA, and aas_s::vertexes. Referenced by BotExportTest(). 00303 {
00304 int i, color, edgenum;
00305 aas_edge_t *edge;
00306 aas_face_t *face;
00307 aas_plane_t *plane;
00308 vec3_t start, end;
00309
00310 color = LINECOLOR_YELLOW;
00311 //check if face number is in range
00312 if (facenum >= aasworld.numfaces)
00313 {
00314 botimport.Print(PRT_ERROR, "facenum %d out of range\n", facenum);
00315 } //end if
00316 face = &aasworld.faces[facenum];
00317 //walk through the edges of the face
00318 for (i = 0; i < face->numedges; i++)
00319 {
00320 //edge number
00321 edgenum = abs(aasworld.edgeindex[face->firstedge + i]);
00322 //check if edge number is in range
00323 if (edgenum >= aasworld.numedges)
00324 {
00325 botimport.Print(PRT_ERROR, "edgenum %d out of range\n", edgenum);
00326 } //end if
00327 edge = &aasworld.edges[edgenum];
00328 if (color == LINECOLOR_RED) color = LINECOLOR_GREEN;
00329 else if (color == LINECOLOR_GREEN) color = LINECOLOR_BLUE;
00330 else if (color == LINECOLOR_BLUE) color = LINECOLOR_YELLOW;
00331 else color = LINECOLOR_RED;
00332 AAS_DebugLine(aasworld.vertexes[edge->v[0]],
00333 aasworld.vertexes[edge->v[1]],
00334 color);
00335 } //end for
00336 plane = &aasworld.planes[face->planenum];
00337 edgenum = abs(aasworld.edgeindex[face->firstedge]);
00338 edge = &aasworld.edges[edgenum];
00339 VectorCopy(aasworld.vertexes[edge->v[0]], start);
00340 VectorMA(start, 20, plane->normal, end);
00341 AAS_DebugLine(start, end, LINECOLOR_RED);
00342 } //end of the function AAS_ShowFace
|
Here is the call graph for this function:

|
|
Referenced by AAS_ShowReachableAreas(), BotExportTest(), and BotMoveToGoal(). |
|
|
Definition at line 684 of file be_aas_debug.c. References aas_areasettings_t, AAS_PrintTravelType(), aas_reachability_t, AAS_ShowReachability(), AAS_Time(), aasworld, aas_s::areasettings, botimport, Com_Memcpy(), aas_areasettings_s::firstreachablearea, aas_areasettings_s::numreachableareas, PRT_MESSAGE, aas_s::reachability, aas_reachability_s::traveltype, and TRAVELTYPE_MASK. Referenced by BotExportTest(). 00685 {
00686 aas_areasettings_t *settings;
00687 static aas_reachability_t reach;
00688 static int index, lastareanum;
00689 static float lasttime;
00690
00691 if (areanum != lastareanum)
00692 {
00693 index = 0;
00694 lastareanum = areanum;
00695 } //end if
00696 settings = &aasworld.areasettings[areanum];
00697 //
00698 if (!settings->numreachableareas) return;
00699 //
00700 if (index >= settings->numreachableareas) index = 0;
00701 //
00702 if (AAS_Time() - lasttime > 1.5)
00703 {
00704 Com_Memcpy(&reach, &aasworld.reachability[settings->firstreachablearea + index], sizeof(aas_reachability_t));
00705 index++;
00706 lasttime = AAS_Time();
00707 AAS_PrintTravelType(reach.traveltype & TRAVELTYPE_MASK);
00708 botimport.Print(PRT_MESSAGE, "\n");
00709 } //end if
00710 AAS_ShowReachability(&reach);
00711 } //end of the function ShowReachableAreas
|
Here is the call graph for this function:

1.3.9.1