Blender  V3.3
Functions | Variables
pointcloud.cc File Reference
#include "MEM_guardedalloc.h"
#include "DNA_defaults.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_pointcloud_types.h"
#include "BLI_bounds.hh"
#include "BLI_index_range.hh"
#include "BLI_listbase.h"
#include "BLI_math_vec_types.hh"
#include "BLI_rand.h"
#include "BLI_span.hh"
#include "BLI_string.h"
#include "BLI_task.hh"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"
#include "BKE_anim_data.h"
#include "BKE_customdata.h"
#include "BKE_geometry_set.hh"
#include "BKE_global.h"
#include "BKE_idtype.h"
#include "BKE_lib_id.h"
#include "BKE_lib_query.h"
#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_mesh_wrapper.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_pointcloud.h"
#include "BLT_translation.h"
#include "DEG_depsgraph_query.h"
#include "BLO_read_write.h"

Go to the source code of this file.

Functions

static void pointcloud_random (PointCloud *pointcloud)
 
static void pointcloud_init_data (ID *id)
 
static void pointcloud_copy_data (Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag)
 
static void pointcloud_free_data (ID *id)
 
static void pointcloud_foreach_id (ID *id, LibraryForeachIDData *data)
 
static void pointcloud_blend_write (BlendWriter *writer, ID *id, const void *id_address)
 
static void pointcloud_blend_read_data (BlendDataReader *reader, ID *id)
 
static void pointcloud_blend_read_lib (BlendLibReader *reader, ID *id)
 
static void pointcloud_blend_read_expand (BlendExpander *expander, ID *id)
 
voidBKE_pointcloud_add (Main *bmain, const char *name)
 
voidBKE_pointcloud_add_default (Main *bmain, const char *name)
 
PointCloudBKE_pointcloud_new_nomain (const int totpoint)
 
static std::optional< blender::bounds::MinMaxResult< float3 > > point_cloud_bounds (const PointCloud &pointcloud)
 
bool BKE_pointcloud_minmax (const PointCloud *pointcloud, float r_min[3], float r_max[3])
 
BoundBoxBKE_pointcloud_boundbox_get (Object *ob)
 
bool BKE_pointcloud_customdata_required (const PointCloud *UNUSED(pointcloud), const char *name)
 
PointCloudBKE_pointcloud_new_for_eval (const PointCloud *pointcloud_src, int totpoint)
 
PointCloudBKE_pointcloud_copy_for_eval (struct PointCloud *pointcloud_src, bool reference)
 
static void pointcloud_evaluate_modifiers (struct Depsgraph *depsgraph, struct Scene *scene, Object *object, GeometrySet &geometry_set)
 
static PointCloudtake_pointcloud_ownership_from_geometry_set (GeometrySet &geometry_set)
 
void BKE_pointcloud_data_update (struct Depsgraph *depsgraph, struct Scene *scene, Object *object)
 
void BKE_pointcloud_batch_cache_dirty_tag (PointCloud *pointcloud, int mode)
 
void BKE_pointcloud_batch_cache_free (PointCloud *pointcloud)
 

Variables

const char * POINTCLOUD_ATTR_POSITION = "position"
 
const char * POINTCLOUD_ATTR_RADIUS = "radius"
 
IDTypeInfo IDType_ID_PT
 
void(* BKE_pointcloud_batch_cache_dirty_tag_cb )(PointCloud *pointcloud, int mode) = nullptr
 
void(* BKE_pointcloud_batch_cache_free_cb )(PointCloud *pointcloud) = nullptr
 

Function Documentation

◆ BKE_pointcloud_add()

void* BKE_pointcloud_add ( Main bmain,
const char *  name 
)

Definition at line 219 of file pointcloud.cc.

References BKE_id_new(), and ID_PT.

Referenced by BKE_mesh_to_pointcloud().

◆ BKE_pointcloud_add_default()

void* BKE_pointcloud_add_default ( Main bmain,
const char *  name 
)

◆ BKE_pointcloud_batch_cache_dirty_tag()

void BKE_pointcloud_batch_cache_dirty_tag ( PointCloud pointcloud,
int  mode 
)

◆ BKE_pointcloud_batch_cache_free()

void BKE_pointcloud_batch_cache_free ( PointCloud pointcloud)

Definition at line 443 of file pointcloud.cc.

References PointCloud::batch_cache, and BKE_pointcloud_batch_cache_free_cb.

Referenced by pointcloud_free_data().

◆ BKE_pointcloud_boundbox_get()

BoundBox* BKE_pointcloud_boundbox_get ( Object ob)

◆ BKE_pointcloud_copy_for_eval()

PointCloud* BKE_pointcloud_copy_for_eval ( struct PointCloud pointcloud_src,
bool  reference 
)

◆ BKE_pointcloud_customdata_required()

bool BKE_pointcloud_customdata_required ( const PointCloud UNUSEDpointcloud,
const char *  name 
)

Definition at line 321 of file pointcloud.cc.

References POINTCLOUD_ATTR_POSITION, and STREQ.

◆ BKE_pointcloud_data_update()

void BKE_pointcloud_data_update ( struct Depsgraph depsgraph,
struct Scene scene,
Object object 
)

◆ BKE_pointcloud_minmax()

bool BKE_pointcloud_minmax ( const PointCloud pointcloud,
float  r_min[3],
float  r_max[3] 
)

◆ BKE_pointcloud_new_for_eval()

PointCloud* BKE_pointcloud_new_for_eval ( const PointCloud pointcloud_src,
int  totpoint 
)

◆ BKE_pointcloud_new_nomain()

PointCloud* BKE_pointcloud_new_nomain ( const int  totpoint)

◆ point_cloud_bounds()

static std::optional<blender::bounds::MinMaxResult<float3> > point_cloud_bounds ( const PointCloud pointcloud)
static

◆ pointcloud_blend_read_data()

static void pointcloud_blend_read_data ( BlendDataReader reader,
ID id 
)
static

◆ pointcloud_blend_read_expand()

static void pointcloud_blend_read_expand ( BlendExpander expander,
ID id 
)
static

Definition at line 152 of file pointcloud.cc.

References Freestyle::a, BLO_expand, PointCloud::mat, and PointCloud::totcol.

◆ pointcloud_blend_read_lib()

static void pointcloud_blend_read_lib ( BlendLibReader reader,
ID id 
)
static

◆ pointcloud_blend_write()

static void pointcloud_blend_write ( BlendWriter writer,
ID id,
const void id_address 
)
static

◆ pointcloud_copy_data()

static void pointcloud_copy_data ( Main UNUSEDbmain,
ID id_dst,
const ID id_src,
const int  flag 
)
static

◆ pointcloud_evaluate_modifiers()

static void pointcloud_evaluate_modifiers ( struct Depsgraph depsgraph,
struct Scene scene,
Object object,
GeometrySet geometry_set 
)
static

◆ pointcloud_foreach_id()

static void pointcloud_foreach_id ( ID id,
LibraryForeachIDData data 
)
static

◆ pointcloud_free_data()

static void pointcloud_free_data ( ID id)
static

◆ pointcloud_init_data()

static void pointcloud_init_data ( ID id)
static

◆ pointcloud_random()

static void pointcloud_random ( PointCloud pointcloud)
static

◆ take_pointcloud_ownership_from_geometry_set()

static PointCloud* take_pointcloud_ownership_from_geometry_set ( GeometrySet geometry_set)
static

Variable Documentation

◆ BKE_pointcloud_batch_cache_dirty_tag_cb

void(* BKE_pointcloud_batch_cache_dirty_tag_cb) (PointCloud *pointcloud, int mode) ( PointCloud pointcloud,
int  mode 
) = nullptr

Definition at line 433 of file pointcloud.cc.

Referenced by BKE_pointcloud_batch_cache_dirty_tag(), and DRW_engines_register().

◆ BKE_pointcloud_batch_cache_free_cb

void(* BKE_pointcloud_batch_cache_free_cb) (PointCloud *pointcloud) ( PointCloud pointcloud) = nullptr

Definition at line 434 of file pointcloud.cc.

Referenced by BKE_pointcloud_batch_cache_free(), and DRW_engines_register().

◆ IDType_ID_PT

IDTypeInfo IDType_ID_PT
Initial value:
= {
sizeof(PointCloud),
"PointCloud",
"pointclouds",
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
}
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
Definition: BKE_idtype.h:39
#define BLT_I18NCONTEXT_ID_POINTCLOUD
#define FILTER_ID_PT
Definition: DNA_ID.h:931
@ INDEX_ID_PT
Definition: DNA_ID.h:1030
@ ID_PT
Definition: DNA_ID_enums.h:82
struct PointCloud PointCloud
static void pointcloud_init_data(ID *id)
Definition: pointcloud.cc:57
static void pointcloud_free_data(ID *id)
Definition: pointcloud.cc:89
static void pointcloud_foreach_id(ID *id, LibraryForeachIDData *data)
Definition: pointcloud.cc:98
static void pointcloud_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src, const int flag)
Definition: pointcloud.cc:73
static void pointcloud_blend_write(BlendWriter *writer, ID *id, const void *id_address)
Definition: pointcloud.cc:106
static void pointcloud_blend_read_lib(BlendLibReader *reader, ID *id)
Definition: pointcloud.cc:144
static void pointcloud_blend_read_data(BlendDataReader *reader, ID *id)
Definition: pointcloud.cc:131
static void pointcloud_blend_read_expand(BlendExpander *expander, ID *id)
Definition: pointcloud.cc:152

Definition at line 160 of file pointcloud.cc.

◆ POINTCLOUD_ATTR_POSITION

const char* POINTCLOUD_ATTR_POSITION = "position"

◆ POINTCLOUD_ATTR_RADIUS

const char* POINTCLOUD_ATTR_RADIUS = "radius"