Просмотр исходного кода

added a lt operator to the inline

added a lt operator to the inline, so that I can use aiVectors as stl keys and such
Peter LaValle 11 лет назад
Родитель
Сommit
057a7ffe60
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      include/assimp/vector3.inl

+ 5 - 0
include/assimp/vector3.inl

@@ -149,6 +149,11 @@ AI_FORCE_INLINE bool aiVector3t<TReal>::operator!= (const aiVector3t<TReal>& oth
 }
 }
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 template <typename TReal>
 template <typename TReal>
+AI_FORCE_INLINE bool aiVector3t<TReal>::operator < (const aiVector3t<TReal>& other) const {
+	return x != other.x ? x < other.x : y != other.y ? y < other.y : z < other.z;
+}
+// ------------------------------------------------------------------------------------------------
+template <typename TReal>
 AI_FORCE_INLINE const aiVector3t<TReal> aiVector3t<TReal>::SymMul(const aiVector3t<TReal>& o) {
 AI_FORCE_INLINE const aiVector3t<TReal> aiVector3t<TReal>::SymMul(const aiVector3t<TReal>& o) {
 	return aiVector3t<TReal>(x*o.x,y*o.y,z*o.z);
 	return aiVector3t<TReal>(x*o.x,y*o.y,z*o.z);
 }
 }