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

Method Draw

Source/Objects/pathpointobject.cpp:166–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void PathPointObject::Draw() {
167 if (g_debug_runtime_disable_pathpoint_object_draw) {
168 return;
169 }
170
171 if (scenegraph_->map_editor->IsTypeEnabled(_path_point_object) &&
172 !Graphics::Instance()->media_mode() &&
173 scenegraph_->map_editor->state_ != MapEditor::kInGame) {
174 DebugDraw::Instance()->AddWireSphere(GetTranslation(), 0.5f, vec4(0.0f, 0.5f, 0.5f, 0.5f), _delete_on_draw);
175 for (int connection_id : connection_ids) {
176 Object* obj = scenegraph_->GetObjectFromID(connection_id);
177 DebugDraw::Instance()->AddLine(GetTranslation(), obj->GetTranslation(), vec4(0.0f, 0.5f, 0.5f, 0.5f), _delete_on_draw);
178 }
179 }
180}
181
182void PathPointObject::RemapReferences(std::map<int, int> id_map) {
183 for (int& connection_id : connection_ids) {

Callers

nothing calls this directly

Calls 8

GetTranslationFunction · 0.85
media_modeMethod · 0.80
AddWireSphereMethod · 0.80
GetObjectFromIDMethod · 0.80
GetTranslationMethod · 0.80
vec4Class · 0.50
IsTypeEnabledMethod · 0.45
AddLineMethod · 0.45

Tested by

no test coverage detected