Browse Source

empty

master
gjj 9 months ago
parent
commit
8632c72421
  1. 20
      algoim/organizer/minimalPrimitive.hpp

20
algoim/organizer/minimalPrimitive.hpp

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

Loading…
Cancel
Save