MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / Draw

Method Draw

Source/Game/paths.cpp:34–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include <sstream>
33
34void AIPaths::Draw() {
35 for (PointMap::const_iterator iter = points.begin(); iter != points.end(); ++iter) {
36 const vec3 &point = iter->second;
37 DebugDraw::Instance()->AddWireSphere(point,
38 0.5f,
39 vec4(0.0f, 0.5f, 0.5f, 0.5f),
40 _delete_on_draw);
41 }
42 for (auto &connection : connections) {
43 DebugDraw::Instance()->AddLine(GetPointPosition(connection.point_ids[0]),
44 GetPointPosition(connection.point_ids[1]),
45 vec4(0.0f, 0.5f, 0.5f, 0.5f),
46 _delete_on_draw);
47 }
48}
49
50int AIPaths::GetNearestPoint(const vec3 &pos) {
51 float closest_distance;

Callers

nothing calls this directly

Calls 5

AddWireSphereMethod · 0.80
vec4Class · 0.50
beginMethod · 0.45
endMethod · 0.45
AddLineMethod · 0.45

Tested by

no test coverage detected