Merge branch 'BoxModelCollision' into FrustumCulling

# Conflicts:
#	src/Game/Game.cpp
This commit is contained in:
William Moberg
2016-02-09 15:03:13 +01:00
11 changed files with 73 additions and 50 deletions
+2
View File
@@ -78,6 +78,8 @@ bool AABBVsAABB(const AABB& a, const AABB& b);
//Also outputs the minimum translation that box [a] would need in order to resolve collision.
bool AABBVsAABB(const AABB& a, const AABB& b, glm::vec3& minimumTranslation);
//Attaches an AABB which contains all vertices in the entitys Model.
bool AttachAABBComponentFromModel(EntityWrapper entity);
// Calculates an absolute AABB from an entity AABB component
boost::optional<EntityAABB> EntityAbsoluteAABB(EntityWrapper& entity);
@@ -6,12 +6,12 @@
#include "Collision.h"
#include "EntityAABB.h"
class CollidableOctreeSystem : public ImpureSystem, public PureSystem
class FillOctreeSystem : public ImpureSystem, public PureSystem
{
public:
CollidableOctreeSystem(World* world, EventBroker* eventBroker, Octree<EntityAABB>* octree, const std::string& componentType)
FillOctreeSystem(World* world, EventBroker* eventBroker, Octree<EntityAABB>* octree, const std::string& fillComponentType)
: System(world, eventBroker)
, PureSystem(componentType)
, PureSystem(fillComponentType)
, m_Octree(octree)
{ }
+1
View File
@@ -25,6 +25,7 @@ struct EntityWrapper
const std::string Name();
bool HasComponent(const std::string& componentType);
void AttachComponent(const char* componentName);
EntityWrapper Parent();
EntityWrapper FirstChildByName(const std::string& name);
EntityWrapper FirstParentWithComponent(const std::string& componentType);