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:
authorSebastian Parborg <darkdefende@gmail.com>2021-01-26 20:23:13 +0300
committerSebastian Parborg <darkdefende@gmail.com>2021-01-26 20:23:13 +0300
commit82523840cd40359a6c60bcc60983762eca87d17b (patch)
treefada3f96343c6b326bc71f0e53bfde2529764b6a /source/blender/blenkernel/BKE_geometry_set.hh
parentae5c15bb4349426c5db276d7d73d750c43cc0346 (diff)
parentabd6b1d7b281c85fce748e0535f1f769916cd9b3 (diff)
Merge branch 'blender-v2.92-release'
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r--source/blender/blenkernel/BKE_geometry_set.hh31
1 files changed, 7 insertions, 24 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh
index adc08f699fd..51f7507bd6c 100644
--- a/source/blender/blenkernel/BKE_geometry_set.hh
+++ b/source/blender/blenkernel/BKE_geometry_set.hh
@@ -24,6 +24,7 @@
#include <iostream>
#include "BLI_float3.hh"
+#include "BLI_float4x4.hh"
#include "BLI_hash.hh"
#include "BLI_map.hh"
#include "BLI_set.hh"
@@ -427,9 +428,7 @@ class PointCloudComponent : public GeometryComponent {
/** A geometry component that stores instances. */
class InstancesComponent : public GeometryComponent {
private:
- blender::Vector<blender::float3> positions_;
- blender::Vector<blender::float3> rotations_;
- blender::Vector<blender::float3> scales_;
+ blender::Vector<blender::float4x4> transforms_;
blender::Vector<int> ids_;
blender::Vector<InstancedData> instanced_data_;
@@ -439,30 +438,14 @@ class InstancesComponent : public GeometryComponent {
GeometryComponent *copy() const override;
void clear();
- void add_instance(Object *object,
- blender::float3 position,
- blender::float3 rotation = {0, 0, 0},
- blender::float3 scale = {1, 1, 1},
- const int id = -1);
- void add_instance(Collection *collection,
- blender::float3 position,
- blender::float3 rotation = {0, 0, 0},
- blender::float3 scale = {1, 1, 1},
- const int id = -1);
- void add_instance(InstancedData data,
- blender::float3 position,
- blender::float3 rotation,
- blender::float3 scale,
- const int id = -1);
+ void add_instance(Object *object, blender::float4x4 transform, const int id = -1);
+ void add_instance(Collection *collection, blender::float4x4 transform, const int id = -1);
+ void add_instance(InstancedData data, blender::float4x4 transform, const int id = -1);
blender::Span<InstancedData> instanced_data() const;
- blender::Span<blender::float3> positions() const;
- blender::Span<blender::float3> rotations() const;
- blender::Span<blender::float3> scales() const;
+ blender::Span<blender::float4x4> transforms() const;
blender::Span<int> ids() const;
- blender::MutableSpan<blender::float3> positions();
- blender::MutableSpan<blender::float3> rotations();
- blender::MutableSpan<blender::float3> scales();
+ blender::MutableSpan<blender::float4x4> transforms();
int instances_amount() const;
bool is_empty() const final;