Blender V5.0
blender::bke::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]

blender::bke::InstanceReference::InstanceReference ( )
default

◆ InstanceReference() [2/7]

blender::bke::InstanceReference::InstanceReference ( Object & object)
inline

Definition at line 244 of file BKE_instances.hh.

References object().

◆ InstanceReference() [3/7]

blender::bke::InstanceReference::InstanceReference ( Collection & collection)
inline

Definition at line 248 of file BKE_instances.hh.

References collection().

◆ InstanceReference() [4/7]

blender::bke::InstanceReference::InstanceReference ( GeometrySet geometry_set)

Definition at line 21 of file instances.cc.

References geometry_set().

◆ InstanceReference() [5/7]

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

Definition at line 239 of file BKE_instances.hh.

References geometry_set().

◆ InstanceReference() [6/7]

blender::bke::InstanceReference::InstanceReference ( const InstanceReference & other)

Definition at line 27 of file instances.cc.

References InstanceReference().

◆ InstanceReference() [7/7]

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

Definition at line 253 of file BKE_instances.hh.

References InstanceReference(), and None.

Member Function Documentation

◆ collection()

Collection & blender::bke::InstanceReference::collection ( ) const
inline

◆ count_memory()

void blender::bke::InstanceReference::count_memory ( MemoryCounter & memory) const

Definition at line 52 of file instances.cc.

References GeometrySet.

◆ ensure_owns_direct_data()

void blender::bke::InstanceReference::ensure_owns_direct_data ( )

Definition at line 35 of file instances.cc.

References GeometrySet.

Referenced by blender::bke::Instances::ensure_owns_direct_data().

◆ geometry_set() [1/2]

◆ geometry_set() [2/2]

const GeometrySet & blender::bke::InstanceReference::geometry_set ( ) const
inline

Definition at line 303 of file BKE_instances.hh.

References BLI_assert, and GeometrySet.

◆ hash()

uint64_t blender::bke::InstanceReference::hash ( ) const

Definition at line 143 of file instances.cc.

References blender::get_default_hash().

◆ name()

◆ object()

◆ operator=() [1/2]

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

Definition at line 260 of file BKE_instances.hh.

References InstanceReference().

◆ operator=() [2/2]

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

Definition at line 270 of file BKE_instances.hh.

References InstanceReference().

◆ owns_direct_data()

bool blender::bke::InstanceReference::owns_direct_data ( ) const

Definition at line 43 of file instances.cc.

References GeometrySet.

◆ to_geometry_set()

◆ type()

◆ operator==

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

Definition at line 135 of file instances.cc.

References b, and InstanceReference().


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