|
|
@ -21,7 +21,7 @@ public: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void extend(const AABB& aabb) |
|
|
|
void extend(const AABB& aabb) |
|
|
|
{ |
|
|
|
for (int i = 0; i < 3; ++i) { |
|
|
|
min(i) = std::min(min(i), aabb.min(i)); |
|
|
@ -43,13 +43,13 @@ public: |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
void intersect(const AABB& other) |
|
|
|
{ |
|
|
|
for (int i = 0; i < 3; i++){ |
|
|
|
void intersect(const AABB& other) |
|
|
|
{ |
|
|
|
for (int i = 0; i < 3; i++) { |
|
|
|
min(i) = std::max(min(i), other.min(i)); |
|
|
|
max(i) = std::min(max(i), other.max(i)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void normalize(const uvector3& scale, const uvector3& boundaryMin) |
|
|
|
{ |
|
|
@ -57,13 +57,13 @@ public: |
|
|
|
max = (max - boundaryMin) / scale; |
|
|
|
} |
|
|
|
|
|
|
|
void operator+=(const uvector3& offset) |
|
|
|
{ |
|
|
|
for (int i = 0; i < 3; i++){ |
|
|
|
void operator+=(const uvector3& offset) |
|
|
|
{ |
|
|
|
for (int i = 0; i < 3; i++) { |
|
|
|
min(i) += offset(i); |
|
|
|
max(i) += offset(i); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
struct MinimalPrimitiveRep { |
|
|
|