Don't collide against disabled (invisible) models. Triggers uses model vs. box instead of only box vs. box.

This commit is contained in:
William Moberg
2016-03-10 16:05:30 +01:00
parent f26b24ef6b
commit 038a706e28
4 changed files with 101 additions and 25 deletions
+12
View File
@@ -84,6 +84,18 @@ bool AABBvsTriangles(const AABB& box,
const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix);
enum Output
{
OutContained,
OutSeparated,
OutIntersecting
};
//Detects intersection and containment.
Output AABBvsTrianglesWContainment(const AABB& box,
const RawModel::Vertex* modelVertices,
const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix);
//Return true if the boxes are intersecting.
bool AABBVsAABB(const AABB& a, const AABB& b);
//Return true if the boxes are intersecting.