diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-15 12:18:31 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-15 12:18:31 -0400 |
commit | 7ccf02515ad3f9e3bf795d651fe4b3c0d773f353 (patch) | |
tree | c4adc897c07f652e617e91fbf41c12b823acc808 /indra/llmath/llmatrix4a.cpp | |
parent | 1abf5f18d6afc7ae9e1b1562b92e5c1ce33b722f (diff) | |
parent | e7eced3c87310b15ac20cc3cd470d67686104a14 (diff) |
Merge commit 'e7eced3' into lua-timers for whitespace fixes.
Diffstat (limited to 'indra/llmath/llmatrix4a.cpp')
-rw-r--r-- | indra/llmath/llmatrix4a.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/indra/llmath/llmatrix4a.cpp b/indra/llmath/llmatrix4a.cpp index fe8f0b98f3..00e30a248b 100644 --- a/indra/llmath/llmatrix4a.cpp +++ b/indra/llmath/llmatrix4a.cpp @@ -33,48 +33,48 @@ // necessarily the fastest way to implement. void matMulBoundBox(const LLMatrix4a &mat, const LLVector4a *in_extents, LLVector4a *out_extents) { - //get 8 corners of bounding box - LLVector4Logical mask[6]; + //get 8 corners of bounding box + LLVector4Logical mask[6]; - for (U32 i = 0; i < 6; ++i) - { - mask[i].clear(); - } + for (U32 i = 0; i < 6; ++i) + { + mask[i].clear(); + } - mask[0].setElement<2>(); //001 - mask[1].setElement<1>(); //010 - mask[2].setElement<1>(); //011 - mask[2].setElement<2>(); - mask[3].setElement<0>(); //100 - mask[4].setElement<0>(); //101 - mask[4].setElement<2>(); - mask[5].setElement<0>(); //110 - mask[5].setElement<1>(); + mask[0].setElement<2>(); //001 + mask[1].setElement<1>(); //010 + mask[2].setElement<1>(); //011 + mask[2].setElement<2>(); + mask[3].setElement<0>(); //100 + mask[4].setElement<0>(); //101 + mask[4].setElement<2>(); + mask[5].setElement<0>(); //110 + mask[5].setElement<1>(); - LLVector4a v[8]; + LLVector4a v[8]; - v[6] = in_extents[0]; - v[7] = in_extents[1]; + v[6] = in_extents[0]; + v[7] = in_extents[1]; - for (U32 i = 0; i < 6; ++i) - { - v[i].setSelectWithMask(mask[i], in_extents[0], in_extents[1]); - } + for (U32 i = 0; i < 6; ++i) + { + v[i].setSelectWithMask(mask[i], in_extents[0], in_extents[1]); + } - LLVector4a tv[8]; + LLVector4a tv[8]; - //transform bounding box into drawable space - for (U32 i = 0; i < 8; ++i) - { - mat.affineTransform(v[i], tv[i]); - } - - //find bounding box - out_extents[0] = out_extents[1] = tv[0]; + //transform bounding box into drawable space + for (U32 i = 0; i < 8; ++i) + { + mat.affineTransform(v[i], tv[i]); + } - for (U32 i = 1; i < 8; ++i) - { - out_extents[0].setMin(out_extents[0], tv[i]); - out_extents[1].setMax(out_extents[1], tv[i]); - } + //find bounding box + out_extents[0] = out_extents[1] = tv[0]; + + for (U32 i = 1; i < 8; ++i) + { + out_extents[0].setMin(out_extents[0], tv[i]); + out_extents[1].setMax(out_extents[1], tv[i]); + } } |