Demos big update

-Added some more math functions
-fixed many memory leaks
-added AABB and BVHTree support to collision.d
 *BVHTree has only incrementally adding entities implemented by now (and bad BottomUp algorithm)
 *ECS Systems use two trees, one for static and one for dynamic entities, dynamic BVH is builded every frame from scratch by now
-BrickBreaker now uses BVHTree to collision detection
 *balls only use tree for checks (they aren't adding to tree)
-fixed bug leading to crash
This commit is contained in:
Mergul 2020-07-17 13:38:41 +02:00
parent 96bbcb9956
commit 64dc099e0a
9 changed files with 973 additions and 70 deletions

View file

@ -33,6 +33,11 @@ struct GUIManager
int selected_template = 0;
int selected_component = 0;
~this()
{
clear();
}
void selectTemplate(int id)
{
if(templates.length == 0)return;
@ -133,6 +138,7 @@ struct GUIManager
edit_components.length = comp.component_id+1;//.extend(comp.component_id + 1);
}
//edit_components[comp.component_id] = ComponentEditGUI(name);
if(edit_components[comp.component_id].variables)return;
ComponentEditGUI comp_edit;
comp_edit.name = T.stringof;
//enum fields = __traits(allMembers, T);