Blender V5.0
BKE_instances.hh File Reference
#include <optional>
#include "BLI_array.hh"
#include "BLI_function_ref.hh"
#include "BLI_index_mask_fwd.hh"
#include "BLI_math_matrix_types.hh"
#include "BLI_memory_counter_fwd.hh"
#include "BLI_shared_cache.hh"
#include "BLI_string_ref.hh"
#include "BLI_vector.hh"
#include "BLI_virtual_array_fwd.hh"
#include "BKE_attribute_filter.hh"
#include "BKE_attribute_storage.hh"

Go to the source code of this file.

Classes

class  blender::bke::InstanceReference
class  blender::bke::Instances

Namespaces

namespace  blender
namespace  blender::bke

Functions

VArray< float3blender::bke::instance_position_varray (const Instances &instances)
VMutableArray< float3blender::bke::instance_position_varray_for_write (Instances &instances)
const AttributeAccessorFunctionsblender::bke::instance_attribute_accessor_functions ()

Detailed Description

Instances is a container for geometry instances. It fulfills some key requirements:

  • Support nested instances.
  • Support instance attributes.
  • Support referencing different kinds of instances (objects, collections, geometry sets).
  • Support efficiently iterating over the instanced geometries, i.e. without have to iterate over all instances.

Instances has an ordered set of InstanceReference. An InstanceReference contains information about a particular instanced geometry. Each InstanceReference has a handle (integer index) which is then stored per instance. Many instances can use the same InstanceReference.

Definition in file BKE_instances.hh.