Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_float4x4.hh')
-rw-r--r--source/blender/blenlib/BLI_float4x4.hh34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenlib/BLI_float4x4.hh b/source/blender/blenlib/BLI_float4x4.hh
index 0abfb751ebf..1e9bd12b12b 100644
--- a/source/blender/blenlib/BLI_float4x4.hh
+++ b/source/blender/blenlib/BLI_float4x4.hh
@@ -46,23 +46,6 @@ struct float4x4 {
return (const float *)this;
}
- float4x4 inverted() const
- {
- float result[4][4];
- invert_m4_m4(result, values);
- return result;
- }
-
- /**
- * Matrix inversion can be implemented more efficiently for affine matrices.
- */
- float4x4 inverted_affine() const
- {
- BLI_assert(values[0][3] == 0.0f && values[1][3] == 0.0f && values[2][3] == 0.0f &&
- values[3][3] == 1.0f);
- return this->inverted();
- }
-
friend float4x4 operator*(const float4x4 &a, const float4x4 &b)
{
float4x4 result;
@@ -86,6 +69,23 @@ struct float4x4 {
return m * float3(v);
}
+ float4x4 inverted() const
+ {
+ float result[4][4];
+ invert_m4_m4(result, values);
+ return result;
+ }
+
+ /**
+ * Matrix inversion can be implemented more efficiently for affine matrices.
+ */
+ float4x4 inverted_affine() const
+ {
+ BLI_assert(values[0][3] == 0.0f && values[1][3] == 0.0f && values[2][3] == 0.0f &&
+ values[3][3] == 1.0f);
+ return this->inverted();
+ }
+
struct float3x3_ref {
const float4x4 &data;