Blender V4.3
texture_pointdensity.cc File Reference
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_kdopbvh.h"
#include "BLI_math_color.h"
#include "BLI_math_matrix.h"
#include "BLI_math_vector.h"
#include "BLI_noise.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_texture_types.h"
#include "BKE_colorband.hh"
#include "BKE_colortools.hh"
#include "BKE_customdata.hh"
#include "BKE_deform.hh"
#include "BKE_mesh.hh"
#include "BKE_object.hh"
#include "BKE_particle.h"
#include "BKE_scene.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_query.hh"
#include "RE_texture.h"

Go to the source code of this file.

Classes

struct  PointDensityRangeData
 
struct  SampleCallbackData
 

Enumerations

enum  { POINT_DATA_VEL = 1 << 0 , POINT_DATA_LIFE = 1 << 1 , POINT_DATA_COLOR = 1 << 2 }
 

Functions

static int point_data_used (PointDensity *pd)
 
static void point_data_pointers (PointDensity *pd, float **r_data_velocity, float **r_data_life, float **r_data_color)
 
static void alloc_point_data (PointDensity *pd)
 
static void pointdensity_cache_psys (Depsgraph *depsgraph, Scene *scene, PointDensity *pd, Object *ob, ParticleSystem *psys)
 
static void pointdensity_cache_vertex_color (PointDensity *pd, Object *, Mesh *mesh, float *data_color)
 
static void pointdensity_cache_vertex_weight (PointDensity *pd, Object *ob, Mesh *mesh, float *data_color)
 
static void pointdensity_cache_vertex_normal (Mesh *mesh, float *data_color)
 
static void pointdensity_cache_object (PointDensity *pd, Object *ob)
 
static void cache_pointdensity (Depsgraph *depsgraph, Scene *scene, PointDensity *pd)
 
static void free_pointdensity (PointDensity *pd)
 
static float density_falloff (PointDensityRangeData *pdr, int index, float squared_dist)
 
static void accum_density (void *userdata, int index, const float co[3], float squared_dist)
 
static void init_pointdensityrangedata (PointDensity *pd, PointDensityRangeData *pdr, float *density, float *vec, float *age, float *col, CurveMapping *density_curve, float velscale)
 
static int pointdensity (PointDensity *pd, const float texvec[3], TexResult *texres, float r_vec[3], float *r_age, float r_col[3])
 
static void pointdensity_color (PointDensity *pd, TexResult *texres, float age, const float vec[3], const float col[3])
 
static void sample_dummy_point_density (int resolution, float *values)
 
static void particle_system_minmax (Depsgraph *depsgraph, Scene *scene, Object *object, ParticleSystem *psys, float radius, float min[3], float max[3])
 
void RE_point_density_cache (Depsgraph *depsgraph, PointDensity *pd)
 
void RE_point_density_minmax (Depsgraph *depsgraph, PointDensity *pd, float r_min[3], float r_max[3])
 
static void point_density_sample_func (void *__restrict data_v, const int iter, const TaskParallelTLS *__restrict)
 
void RE_point_density_sample (Depsgraph *depsgraph, PointDensity *pd, const int resolution, float *values)
 
void RE_point_density_free (PointDensity *pd)
 
void RE_point_density_fix_linking ()
 

Variables

static ThreadMutex sample_mutex = PTHREAD_MUTEX_INITIALIZER
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
POINT_DATA_VEL 
POINT_DATA_LIFE 
POINT_DATA_COLOR 

Definition at line 45 of file texture_pointdensity.cc.

Function Documentation

◆ accum_density()

◆ alloc_point_data()

◆ cache_pointdensity()

◆ density_falloff()

◆ free_pointdensity()

◆ init_pointdensityrangedata()

◆ particle_system_minmax()

◆ point_data_pointers()

static void point_data_pointers ( PointDensity * pd,
float ** r_data_velocity,
float ** r_data_life,
float ** r_data_color )
static

◆ point_data_used()

◆ point_density_sample_func()

static void point_density_sample_func ( void *__restrict data_v,
const int iter,
const TaskParallelTLS * __restrict )
static

◆ pointdensity()

◆ pointdensity_cache_object()

◆ pointdensity_cache_psys()

◆ pointdensity_cache_vertex_color()

◆ pointdensity_cache_vertex_normal()

static void pointdensity_cache_vertex_normal ( Mesh * mesh,
float * data_color )
static

Definition at line 362 of file texture_pointdensity.cc.

References BLI_assert.

Referenced by pointdensity_cache_object().

◆ pointdensity_cache_vertex_weight()

◆ pointdensity_color()

◆ RE_point_density_cache()

void RE_point_density_cache ( Depsgraph * depsgraph,
PointDensity * pd )

◆ RE_point_density_fix_linking()

void RE_point_density_fix_linking ( void )

Definition at line 955 of file texture_pointdensity.cc.

Referenced by RE_InitState().

◆ RE_point_density_free()

void RE_point_density_free ( PointDensity * pd)

◆ RE_point_density_minmax()

◆ RE_point_density_sample()

void RE_point_density_sample ( struct Depsgraph * depsgraph,
struct PointDensity * pd,
int resolution,
float * values )

◆ sample_dummy_point_density()

static void sample_dummy_point_density ( int resolution,
float * values )
static

Definition at line 752 of file texture_pointdensity.cc.

Referenced by RE_point_density_sample().

Variable Documentation

◆ sample_mutex

ThreadMutex sample_mutex = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 43 of file texture_pointdensity.cc.

Referenced by RE_point_density_cache(), and RE_point_density_sample().