Blender  V3.3
Classes | Typedefs | Functions | Variables
texture_pointdensity.c File Reference
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_kdopbvh.h"
#include "BLI_math.h"
#include "BLI_noise.h"
#include "BLI_task.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_texture_types.h"
#include "BKE_colorband.h"
#include "BKE_colortools.h"
#include "BKE_customdata.h"
#include "BKE_deform.h"
#include "BKE_lattice.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "render_types.h"
#include "texture_common.h"
#include "RE_texture.h"

Go to the source code of this file.

Classes

struct  PointDensityRangeData
 
struct  SampleCallbackData
 

Typedefs

typedef struct PointDensityRangeData PointDensityRangeData
 
typedef struct SampleCallbackData SampleCallbackData
 

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 *UNUSED(ob), 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, struct 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 (struct Depsgraph *depsgraph, PointDensity *pd)
 
void RE_point_density_minmax (struct Depsgraph *depsgraph, struct 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 UNUSED(tls))
 
void RE_point_density_sample (Depsgraph *depsgraph, PointDensity *pd, const int resolution, float *values)
 
void RE_point_density_free (struct PointDensity *pd)
 
void RE_point_density_fix_linking (void)
 

Variables

static ThreadMutex sample_mutex = PTHREAD_MUTEX_INITIALIZER
 

Typedef Documentation

◆ PointDensityRangeData

◆ SampleCallbackData

Function Documentation

◆ accum_density()

static void accum_density ( void userdata,
int  index,
const float  co[3],
float  squared_dist 
)
static

◆ alloc_point_data()

static void alloc_point_data ( PointDensity pd)
static

◆ cache_pointdensity()

static void cache_pointdensity ( Depsgraph depsgraph,
Scene scene,
PointDensity pd 
)
static

◆ density_falloff()

static float density_falloff ( PointDensityRangeData pdr,
int  index,
float  squared_dist 
)
static

◆ free_pointdensity()

static void free_pointdensity ( PointDensity pd)
static

◆ init_pointdensityrangedata()

static void init_pointdensityrangedata ( PointDensity pd,
PointDensityRangeData pdr,
float density,
float vec,
float age,
float col,
struct CurveMapping density_curve,
float  velscale 
)
static

◆ particle_system_minmax()

static void particle_system_minmax ( Depsgraph depsgraph,
Scene scene,
Object object,
ParticleSystem psys,
float  radius,
float  min[3],
float  max[3] 
)
static

◆ 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()

static int point_data_used ( PointDensity pd)
static

◆ point_density_sample_func()

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

◆ pointdensity()

static int pointdensity ( PointDensity pd,
const float  texvec[3],
TexResult texres,
float  r_vec[3],
float r_age,
float  r_col[3] 
)
static

◆ pointdensity_cache_object()

static void pointdensity_cache_object ( PointDensity pd,
Object ob 
)
static

◆ pointdensity_cache_psys()

static void pointdensity_cache_psys ( Depsgraph depsgraph,
Scene scene,
PointDensity pd,
Object ob,
ParticleSystem psys 
)
static

◆ pointdensity_cache_vertex_color()

static void pointdensity_cache_vertex_color ( PointDensity pd,
Object UNUSEDob,
Mesh mesh,
float data_color 
)
static

◆ pointdensity_cache_vertex_normal()

static void pointdensity_cache_vertex_normal ( Mesh mesh,
float data_color 
)
static

◆ pointdensity_cache_vertex_weight()

static void pointdensity_cache_vertex_weight ( PointDensity pd,
Object ob,
Mesh mesh,
float data_color 
)
static

◆ pointdensity_color()

static void pointdensity_color ( PointDensity pd,
TexResult texres,
float  age,
const float  vec[3],
const float  col[3] 
)
static

◆ RE_point_density_cache()

void RE_point_density_cache ( struct Depsgraph depsgraph,
PointDensity pd 
)

◆ RE_point_density_fix_linking()

void RE_point_density_fix_linking ( void  )

Definition at line 947 of file texture_pointdensity.c.

Referenced by RE_InitState().

◆ RE_point_density_free()

void RE_point_density_free ( struct PointDensity pd)

◆ RE_point_density_minmax()

void RE_point_density_minmax ( struct Depsgraph depsgraph,
struct PointDensity pd,
float  r_min[3],
float  r_max[3] 
)

◆ 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 742 of file texture_pointdensity.c.

Referenced by RE_point_density_sample().

Variable Documentation

◆ sample_mutex

ThreadMutex sample_mutex = PTHREAD_MUTEX_INITIALIZER
static

Definition at line 47 of file texture_pointdensity.c.

Referenced by RE_point_density_cache(), and RE_point_density_sample().