Merge remote-tracking branch 'origin/master' into Animations

# Conflicts:
#	assets
#	include/Engine/Rendering/Model.h
#	src/Engine/Collision/Collision.cpp
This commit is contained in:
viktorljung
2016-02-10 14:13:08 +01:00
31 changed files with 1434 additions and 489 deletions
-2
View File
@@ -78,8 +78,6 @@ 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);
@@ -0,0 +1,25 @@
#ifndef FillFrustumOctreeSystem_h__
#define FillFrustumOctreeSystem_h__
#include "../Core/System.h"
#include "../Core/Octree.h"
#include "Collision.h"
#include "EntityAABB.h"
class FillFrustumOctreeSystem : public ImpureSystem, public PureSystem
{
public:
FillFrustumOctreeSystem(World* world, EventBroker* eventBroker, Octree<EntityAABB>* octree)
: System(world, eventBroker)
, PureSystem("Model")
, m_Octree(octree)
{ }
virtual void Update(double dt) override;
virtual void UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt) override;
private:
Octree<EntityAABB>* m_Octree;
};
#endif
+2 -2
View File
@@ -1,5 +1,5 @@
#ifndef CollidableOctreeSystem_h__
#define CollidableOctreeSystem_h__
#ifndef FillOctreeSystem_h__
#define FillOctreeSystem_h__
#include "../Core/System.h"
#include "../Core/Octree.h"