Blender  V2.93
mesh_runtime.c File Reference
#include "atomic_ops.h"
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BLI_math_geom.h"
#include "BLI_threads.h"
#include "BKE_bvhutils.h"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
#include "BKE_shrinkwrap.h"
#include "BKE_subdiv_ccg.h"
#include "BLI_dynstr.h"

Go to the source code of this file.

Functions

Mesh Runtime Struct Utils
void BKE_mesh_runtime_reset (Mesh *mesh)
 
void BKE_mesh_runtime_reset_on_copy (Mesh *mesh, const int UNUSED(flag))
 
void BKE_mesh_runtime_clear_cache (Mesh *mesh)
 
static void mesh_ensure_looptri_data (Mesh *mesh)
 
void BKE_mesh_runtime_looptri_recalc (Mesh *mesh)
 
int BKE_mesh_runtime_looptri_len (const Mesh *mesh)
 
const MLoopTriBKE_mesh_runtime_looptri_ensure (Mesh *mesh)
 
void BKE_mesh_runtime_verttri_from_looptri (MVertTri *r_verttri, const MLoop *mloop, const MLoopTri *looptri, int looptri_num)
 
bool BKE_mesh_runtime_ensure_edit_data (struct Mesh *mesh)
 
bool BKE_mesh_runtime_reset_edit_data (Mesh *mesh)
 
bool BKE_mesh_runtime_clear_edit_data (Mesh *mesh)
 
void BKE_mesh_runtime_clear_geometry (Mesh *mesh)
 
Mesh runtime debug helpers.
static void mesh_runtime_debug_info_layers (DynStr *dynstr, CustomData *cd)
 
char * BKE_mesh_runtime_debug_info (Mesh *me_eval)
 
void BKE_mesh_runtime_debug_print (Mesh *me_eval)
 
void BKE_mesh_runtime_debug_print_cdlayers (CustomData *data)
 
bool BKE_mesh_runtime_is_valid (Mesh *me_eval)
 

Mesh Batch Cache Callbacks

void(* BKE_mesh_batch_cache_dirty_tag_cb )(Mesh *me, eMeshBatchDirtyMode mode) = NULL
 
void(* BKE_mesh_batch_cache_free_cb )(Mesh *me) = NULL
 
void BKE_mesh_batch_cache_dirty_tag (Mesh *me, eMeshBatchDirtyMode mode)
 
void BKE_mesh_batch_cache_free (Mesh *me)
 

Function Documentation

◆ BKE_mesh_batch_cache_dirty_tag()

void BKE_mesh_batch_cache_dirty_tag ( Mesh me,
eMeshBatchDirtyMode  mode 
)

◆ BKE_mesh_batch_cache_free()

void BKE_mesh_batch_cache_free ( Mesh me)

◆ BKE_mesh_runtime_clear_cache()

void BKE_mesh_runtime_clear_cache ( Mesh mesh)

◆ BKE_mesh_runtime_clear_edit_data()

bool BKE_mesh_runtime_clear_edit_data ( Mesh mesh)

◆ BKE_mesh_runtime_clear_geometry()

void BKE_mesh_runtime_clear_geometry ( Mesh mesh)

◆ BKE_mesh_runtime_debug_info()

char* BKE_mesh_runtime_debug_info ( Mesh me_eval)

◆ BKE_mesh_runtime_debug_print()

void BKE_mesh_runtime_debug_print ( Mesh me_eval)

Definition at line 357 of file mesh_runtime.c.

References BKE_mesh_runtime_debug_info(), MEM_freeN, and str.

◆ BKE_mesh_runtime_debug_print_cdlayers()

void BKE_mesh_runtime_debug_print_cdlayers ( CustomData data)

◆ BKE_mesh_runtime_ensure_edit_data()

bool BKE_mesh_runtime_ensure_edit_data ( struct Mesh mesh)

◆ BKE_mesh_runtime_is_valid()

bool BKE_mesh_runtime_is_valid ( Mesh me_eval)

◆ BKE_mesh_runtime_looptri_ensure()

const MLoopTri* BKE_mesh_runtime_looptri_ensure ( Mesh mesh)

◆ BKE_mesh_runtime_looptri_len()

int BKE_mesh_runtime_looptri_len ( const Mesh mesh)

◆ BKE_mesh_runtime_looptri_recalc()

void BKE_mesh_runtime_looptri_recalc ( Mesh mesh)

◆ BKE_mesh_runtime_reset()

void BKE_mesh_runtime_reset ( Mesh mesh)

Default values defined at read time.

Definition at line 49 of file mesh_runtime.c.

References BLI_mutex_init(), Mesh_Runtime::eval_mutex, MEM_mallocN, mesh, and Mesh::runtime.

Referenced by mesh_blend_read_data(), and mesh_init_data().

◆ BKE_mesh_runtime_reset_edit_data()

bool BKE_mesh_runtime_reset_edit_data ( Mesh mesh)

◆ BKE_mesh_runtime_reset_on_copy()

void BKE_mesh_runtime_reset_on_copy ( Mesh mesh,
const int   UNUSEDflag 
)

◆ BKE_mesh_runtime_verttri_from_looptri()

void BKE_mesh_runtime_verttri_from_looptri ( MVertTri r_verttri,
const MLoop mloop,
const MLoopTri looptri,
int  looptri_num 
)

Definition at line 176 of file mesh_runtime.c.

References MLoopTri::tri, MVertTri::tri, and MLoop::v.

◆ mesh_ensure_looptri_data()

static void mesh_ensure_looptri_data ( Mesh mesh)
static

Ensure the array is large enough

Note
This function must always be thread-protected by caller. It should only be used by internal code.

Definition at line 99 of file mesh_runtime.c.

References MLoopTri_Store::array, MLoopTri_Store::array_wip, BLI_assert, MLoopTri_Store::len, MLoopTri_Store::len_alloc, Mesh_Runtime::looptris, MEM_malloc_arrayN, MEM_SAFE_FREE, mesh, NULL, poly_to_tri_count(), Mesh::runtime, SWAP, Mesh::totloop, and Mesh::totpoly.

Referenced by BKE_mesh_runtime_looptri_recalc().

◆ mesh_runtime_debug_info_layers()

static void mesh_runtime_debug_info_layers ( DynStr dynstr,
CustomData cd 
)
static

Variable Documentation

◆ BKE_mesh_batch_cache_dirty_tag_cb

void(* BKE_mesh_batch_cache_dirty_tag_cb) (Mesh *me, eMeshBatchDirtyMode mode) ( Mesh me,
eMeshBatchDirtyMode  mode 
) = NULL

Definition at line 248 of file mesh_runtime.c.

Referenced by BKE_mesh_batch_cache_dirty_tag(), and DRW_engines_register().

◆ BKE_mesh_batch_cache_free_cb

void(* BKE_mesh_batch_cache_free_cb) (Mesh *me) ( Mesh me) = NULL

Definition at line 249 of file mesh_runtime.c.

Referenced by BKE_mesh_batch_cache_free(), and DRW_engines_register().