Skip to content

Commit

Permalink
--return to Matrix3
Browse files Browse the repository at this point in the history
With the Corrade update, no need to use Matrix3x3
  • Loading branch information
jturner65 committed Jul 11, 2024
1 parent 932d4a7 commit be79a4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/esp/geo/OBB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ Mn::Range3D OBB::toAABB() const {
}

void OBB::recomputeTransforms() {
const Mn::Matrix3x3 R = rotation_.toMatrix();
const Mn::Matrix3 R = rotation_.toMatrix();
// Local-to-world transform
Mn::Matrix3x3 localToWorldRot;
Mn::Matrix3 localToWorldRot;
for (int i = 0; i < 3; ++i) {
localToWorldRot[i] = R[i] * halfExtents_[i];
}

localToWorld_ = Mn::Matrix4::from(localToWorldRot, center_);

// World-to-local transform. Points within OBB are in [0,1]^3
Mn::Matrix3x3 worldToLocalRotTranspose;
Mn::Matrix3 worldToLocalRotTranspose;
for (int i = 0; i < 3; ++i) {
worldToLocalRotTranspose[i] = R[i] * (1.0f / halfExtents_[i]);
}
Expand Down

0 comments on commit be79a4b

Please sign in to comment.