Blender  V3.3
Public Types | Public Member Functions | Friends | List of all members
InstanceReference Class Reference

#include <BKE_geometry_set.hh>

Public Types

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

Public Member Functions

 InstanceReference ()=default
 
 InstanceReference (Object &object)
 
 InstanceReference (Collection &collection)
 
 InstanceReference (GeometrySet geometry_set)
 
 InstanceReference (const InstanceReference &other)
 
 InstanceReference (InstanceReference &&other)
 
InstanceReferenceoperator= (const InstanceReference &other)
 
InstanceReferenceoperator= (InstanceReference &&other)
 
Type type () const
 
Objectobject () const
 
Collectioncollection () const
 
const GeometrySetgeometry_set () const
 
bool owns_direct_data () const
 
void ensure_owns_direct_data ()
 
uint64_t hash () 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 InstancesComponent.

Definition at line 562 of file BKE_geometry_set.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 564 of file BKE_geometry_set.hh.

Constructor & Destructor Documentation

◆ InstanceReference() [1/6]

InstanceReference::InstanceReference ( )
default

◆ InstanceReference() [2/6]

InstanceReference::InstanceReference ( Object object)
inline

Definition at line 585 of file BKE_geometry_set.hh.

◆ InstanceReference() [3/6]

InstanceReference::InstanceReference ( Collection collection)
inline

Definition at line 589 of file BKE_geometry_set.hh.

◆ InstanceReference() [4/6]

InstanceReference::InstanceReference ( GeometrySet  geometry_set)
inline

Definition at line 593 of file BKE_geometry_set.hh.

◆ InstanceReference() [5/6]

InstanceReference::InstanceReference ( const InstanceReference other)
inline

Definition at line 599 of file BKE_geometry_set.hh.

◆ InstanceReference() [6/6]

InstanceReference::InstanceReference ( InstanceReference &&  other)
inline

Definition at line 606 of file BKE_geometry_set.hh.

Member Function Documentation

◆ collection()

Collection& InstanceReference::collection ( ) const
inline

◆ ensure_owns_direct_data()

void InstanceReference::ensure_owns_direct_data ( )
inline

Definition at line 665 of file BKE_geometry_set.hh.

Referenced by InstancesComponent::ensure_owns_direct_data().

◆ geometry_set()

const GeometrySet& InstanceReference::geometry_set ( ) const
inline

◆ hash()

uint64_t InstanceReference::hash ( ) const
inline

Definition at line 673 of file BKE_geometry_set.hh.

References data_, and blender::get_default_hash_2().

◆ object()

Object& InstanceReference::object ( ) const
inline

◆ operator=() [1/2]

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

Definition at line 613 of file BKE_geometry_set.hh.

◆ operator=() [2/2]

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

Definition at line 623 of file BKE_geometry_set.hh.

◆ owns_direct_data()

bool InstanceReference::owns_direct_data ( ) const
inline

Definition at line 656 of file BKE_geometry_set.hh.

◆ type()

Type InstanceReference::type ( ) const
inline

Friends And Related Function Documentation

◆ operator==

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

Definition at line 678 of file BKE_geometry_set.hh.


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