10 #include "Collision.h"
11 #include "VectorMath.h"
12 #include "CollisionGroup.h"
13 #include "ICollisionBvhProvider.h"
14 #include "CollisionBvhRayCaster.h"
27 typedef std::vector<const CollisionBvh*> CollisionBvhVector;
31 : m_collisionBvhProvider(collisionBvhProvider)
36 template <
typename TPredicate,
typename TOutIter>
37 TOutIter Gather(
const u32 collidableGroupsMask, TOutIter outIter, TPredicate predicate)
39 const size_t totalCount = m_collisionBvhProvider.CountCollisionBvhsForGroups(collidableGroupsMask);
40 CollisionBvhVector collisionBvhBuffer;
41 collisionBvhBuffer.resize(totalCount);
42 m_collisionBvhProvider.CopyCollisionBvhsForGroups(collidableGroupsMask, collisionBvhBuffer.data(), collisionBvhBuffer.size());
44 return std::remove_copy_if(collisionBvhBuffer.begin(), collisionBvhBuffer.end(), outIter, std::not1(predicate));
54 : m_collisionMaterialId(collisionMaterialId)
59 return pCollisionBvh->GetCollisionMaterialTable().Contains(m_collisionMaterialId);
62 std::string m_collisionMaterialId;
68 : m_collisionMaterialIds(collisionMaterialIds)
73 Eegeo_ASSERT(pCollisionBvh != NULL);
75 for (std::vector<std::string>::const_iterator iter = m_collisionMaterialIds.begin(); iter != m_collisionMaterialIds.end(); ++iter)
77 const std::string& materialId = *iter;
78 if (table.Contains(materialId))
86 const std::vector<std::string>& m_collisionMaterialIds;