Blender V5.0
blender::geometry::InstanceReference Class Reference

#include <BKE_instances.hh>

Public Types

enum class  Type { None , Object , Collection , GeometrySet }

Public Member Functions

 InstanceReference ()=default
 InstanceReference (GeometrySet geometry_set)
 InstanceReference (const InstanceReference &other)
void to_geometry_set (GeometrySet &r_geometry_set) const
StringRefNull name () const
bool owns_direct_data () const
void ensure_owns_direct_data ()
void count_memory (MemoryCounter &memory) const
uint64_t hash () const
#InstanceReference Inline Methods
 InstanceReference (Object &object)
 InstanceReference (Collection &collection)
 InstanceReference (std::unique_ptr< GeometrySet > geometry_set)
 InstanceReference (InstanceReference &&other)
InstanceReferenceoperator= (const InstanceReference &other)
InstanceReferenceoperator= (InstanceReference &&other)
Type type () const
Objectobject () const
Collectioncollection () const
GeometrySetgeometry_set ()
const GeometrySetgeometry_set () const

Friends

bool operator== (const InstanceReference &a, const InstanceReference &b)

Detailed Description

Holds a reference to conceptually unique geometry or a pointer to object/collection data that is instanced with a transform in Instances.

Definition at line 53 of file BKE_instances.hh.

Member Enumeration Documentation

◆ Type

Enumerator
None 

An empty instance. This allows an InstanceReference to be default constructed without being in an invalid state. There might also be other use cases that we haven't explored much yet (such as changing the instance later on, and "disabling" some instances).

Object 
Collection 
GeometrySet 

Definition at line 55 of file BKE_instances.hh.

Constructor & Destructor Documentation

◆ InstanceReference() [1/7]

◆ InstanceReference() [2/7]

Definition at line 244 of file BKE_instances.hh.

◆ InstanceReference() [3/7]

Definition at line 248 of file BKE_instances.hh.

◆ InstanceReference() [4/7]

◆ InstanceReference() [5/7]

blender::bke::InstanceReference::InstanceReference ( std::unique_ptr< GeometrySet > geometry_set)
inline

Definition at line 239 of file BKE_instances.hh.

◆ InstanceReference() [6/7]

◆ InstanceReference() [7/7]

Member Function Documentation

◆ collection()

Definition at line 291 of file BKE_instances.hh.

◆ count_memory()

Definition at line 52 of file instances.cc.

◆ ensure_owns_direct_data()

◆ geometry_set() [1/2]

◆ geometry_set() [2/2]

Definition at line 303 of file BKE_instances.hh.

◆ hash()

Definition at line 143 of file instances.cc.

◆ name()

◆ object()

Definition at line 285 of file BKE_instances.hh.

◆ operator=() [1/2]

InstanceReference & blender::bke::InstanceReference::operator= ( const InstanceReference & other)
inline

Definition at line 260 of file BKE_instances.hh.

◆ operator=() [2/2]

InstanceReference & blender::bke::InstanceReference::operator= ( InstanceReference && other)
inline

Definition at line 270 of file BKE_instances.hh.

◆ owns_direct_data()

Definition at line 43 of file instances.cc.

◆ to_geometry_set()

Converts the instance reference to a geometry set, even if it was an object or collection before.

Note
Uses out-parameter to be able to use GeometrySet forward declaration.

Definition at line 94 of file instances.cc.

◆ type()

◆ operator==

bool operator== ( const InstanceReference & a,
const InstanceReference & b )
friend

Definition at line 135 of file instances.cc.


The documentation for this class was generated from the following files: