Add CAABox subscript operator

This commit is contained in:
Jack Andersen 2017-03-23 19:29:46 -10:00
parent c50a319a39
commit e08dcffcd1
1 changed files with 8 additions and 0 deletions

View File

@ -351,6 +351,14 @@ public:
} }
inline bool invalid() { return (max.x < min.x || max.y < min.y || max.z < min.z); } inline bool invalid() { return (max.x < min.x || max.y < min.y || max.z < min.z); }
inline float operator[](size_t idx) const
{
if (idx < 3)
return min[idx];
else
return max[idx-3];
}
}; };
inline bool operator==(const CAABox& left, const CAABox& right) inline bool operator==(const CAABox& left, const CAABox& right)