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:
parent
96bbcb9956
commit
64dc099e0a
9 changed files with 973 additions and 70 deletions
|
|
@ -44,6 +44,11 @@ struct vec2
|
|||
else static assert(0, "Operator "~op~" not implemented");
|
||||
}
|
||||
|
||||
vec2 opUnary(string op)()if (op == "-")
|
||||
{
|
||||
return vec2(-x,-y);
|
||||
}
|
||||
|
||||
ivec2 opCast()
|
||||
{
|
||||
return ivec2(cast(int)x,cast(int)y);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue