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

Method LineCheckAll

Source/Main/scenegraph.cpp:417–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417void SceneGraph::LineCheckAll(const vec3& start, const vec3& end, std::vector<Collision>* collisions) {
418 PROFILER_ZONE(g_profiler_ctx, "SceneGraph::LineCheckAll");
419 for (auto obj : objects_) {
420 vec3 point, normal;
421 int collision_tri = obj->lineCheck(start, end, &point, &normal);
422 if (collision_tri != -1) {
423 Collision c;
424 c.hit = true;
425 c.hit_normal = normal;
426 c.hit_what = obj;
427 c.hit_how = collision_tri;
428 c.hit_where = point;
429 collisions->push_back(c);
430 }
431 }
432}
433
434static std::vector<EnvObject*>* g_static_mesh_draw_sort_entries = NULL;
435

Callers 2

GetEditorLineCollisionsFunction · 0.80
HandleShortcutsMethod · 0.80

Calls 2

lineCheckMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected