6 #include "CollisionMaterial.h"
19 : m_collisionMaterials(collisionMaterials)
22 std::string IdAtIndex(
int tableIndex)
const {
return m_collisionMaterials.at(tableIndex).MaterialId(); }
24 bool Contains(
const std::string materialId)
const
26 return std::find_if(m_collisionMaterials.begin(), m_collisionMaterials.end(),
MatchesId(materialId)) != m_collisionMaterials.end();
29 int FindIndexOf(
const std::string materialId)
const
31 std::vector<CollisionMaterial>::const_iterator iter = std::find_if(m_collisionMaterials.begin(), m_collisionMaterials.end(),
MatchesId(materialId));
32 if (iter == m_collisionMaterials.end())
35 return static_cast<int>(std::distance(m_collisionMaterials.begin(), iter));
38 const std::vector<CollisionMaterial>& GetCollisionMaterials()
const {
return m_collisionMaterials; }
41 std::vector<CollisionMaterial> m_collisionMaterials;