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')
-rw-r--r--source/blender/blenlib/BLI_float4x4.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_float4x4.hh b/source/blender/blenlib/BLI_float4x4.hh
index 347ce2caa34..14e61d53845 100644
--- a/source/blender/blenlib/BLI_float4x4.hh
+++ b/source/blender/blenlib/BLI_float4x4.hh
@@ -45,6 +45,13 @@ struct float4x4 {
return mat;
}
+ static float4x4 from_location(const float3 location)
+ {
+ float4x4 mat = float4x4::identity();
+ copy_v3_v3(mat.values[3], location);
+ return mat;
+ }
+
static float4x4 from_normalized_axis_data(const float3 location,
const float3 forward,
const float3 up)