Blender V4.3
draw_cache_impl_particles.cc File Reference

Particle API for render engines. More...

#include "DRW_render.hh"
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_ghash.h"
#include "BLI_math_color.h"
#include "BLI_math_vector.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "DNA_customdata_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_particle_types.h"
#include "BKE_customdata.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_legacy_convert.hh"
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "ED_particle.hh"
#include "GPU_batch.hh"
#include "GPU_capabilities.hh"
#include "GPU_context.hh"
#include "GPU_material.hh"
#include "DEG_depsgraph_query.hh"
#include "draw_cache_impl.hh"
#include "draw_hair_private.hh"

Go to the source code of this file.

Classes

struct  blender::draw::ParticlePointCache
 
struct  blender::draw::ParticleBatchCache
 
struct  blender::draw::HairAttributeID
 
struct  blender::draw::EditStrandData
 
struct  blender::draw::ParticleDrawSource
 

Namespaces

namespace  blender
 
namespace  blender::draw
 

Enumerations

enum  blender::draw::ParticleSource { blender::draw::PARTICLE_SOURCE_PARENT , blender::draw::PARTICLE_SOURCE_CHILDREN }
 

Functions

static void blender::draw::particle_batch_cache_clear (ParticleSystem *psys)
 
static GPUVertFormatblender::draw::edit_points_vert_format_get (uint *r_pos_id, uint *r_selection_id)
 
static bool blender::draw::particle_batch_cache_valid (ParticleSystem *psys)
 
static void blender::draw::particle_batch_cache_init (ParticleSystem *psys)
 
static ParticleBatchCacheblender::draw::particle_batch_cache_get (ParticleSystem *psys)
 
static void blender::draw::particle_batch_cache_clear_point (ParticlePointCache *point_cache)
 
static void blender::draw::particle_batch_cache_clear_hair (ParticleHairCache *hair_cache)
 
static void blender::draw::count_cache_segment_keys (ParticleCacheKey **pathcache, const int num_path_cache_keys, ParticleHairCache *hair_cache)
 
static void blender::draw::ensure_seg_pt_count (PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *hair_cache)
 
static void blender::draw::particle_pack_mcol (MCol *mcol, ushort r_scol[3])
 
static void blender::draw::particle_calculate_parent_uvs (ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_uv_layers, const int parent_index, const MTFace **mtfaces, float(*r_uv)[2])
 
static void blender::draw::particle_calculate_parent_mcol (ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_col_layers, const int parent_index, const MCol **mcols, MCol *r_mcol)
 
static void blender::draw::particle_interpolate_children_uvs (ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_uv_layers, const int child_index, const MTFace **mtfaces, float(*r_uv)[2])
 
static void blender::draw::particle_interpolate_children_mcol (ParticleSystem *psys, ParticleSystemModifierData *psmd, const int num_col_layers, const int child_index, const MCol **mcols, MCol *r_mcol)
 
static void blender::draw::particle_calculate_uvs (ParticleSystem *psys, ParticleSystemModifierData *psmd, const bool is_simple, const int num_uv_layers, const int parent_index, const int child_index, const MTFace **mtfaces, float(**r_parent_uvs)[2], float(**r_uv)[2])
 
static void blender::draw::particle_calculate_mcol (ParticleSystem *psys, ParticleSystemModifierData *psmd, const bool is_simple, const int num_col_layers, const int parent_index, const int child_index, const MCol **mcols, MCol **r_parent_mcol, MCol **r_mcol)
 
static int blender::draw::particle_batch_cache_fill_segments (ParticleSystem *psys, ParticleSystemModifierData *psmd, ParticleCacheKey **path_cache, const ParticleSource particle_source, const int global_offset, const int start_index, const int num_path_keys, const int num_uv_layers, const int num_col_layers, const MTFace **mtfaces, const MCol **mcols, uint *uv_id, uint *col_id, float(***r_parent_uvs)[2], MCol ***r_parent_mcol, GPUIndexBufBuilder *elb, HairAttributeID *attr_id, ParticleHairCache *hair_cache)
 
static void blender::draw::particle_batch_cache_fill_segments_proc_pos (ParticleCacheKey **path_cache, const int num_path_keys, GPUVertBufRaw *attr_step, GPUVertBufRaw *length_step)
 
static float blender::draw::particle_key_weight (const ParticleData *particle, int strand, float t)
 
static int blender::draw::particle_batch_cache_fill_segments_edit (const PTCacheEdit *, const ParticleData *particle, ParticleCacheKey **path_cache, const int start_index, const int num_path_keys, GPUIndexBufBuilder *elb, GPUVertBufRaw *attr_step)
 
static int blender::draw::particle_batch_cache_fill_segments_indices (ParticleCacheKey **path_cache, const int start_index, const int num_path_keys, const int res, GPUIndexBufBuilder *elb)
 
static int blender::draw::particle_batch_cache_fill_strands_data (ParticleSystem *psys, ParticleSystemModifierData *psmd, ParticleCacheKey **path_cache, const ParticleSource particle_source, const int start_index, const int num_path_keys, GPUVertBufRaw *data_step, GPUVertBufRaw *seg_step, float(***r_parent_uvs)[2], GPUVertBufRaw *uv_step, const MTFace **mtfaces, int num_uv_layers, MCol ***r_parent_mcol, GPUVertBufRaw *col_step, const MCol **mcols, int num_col_layers)
 
static void blender::draw::particle_batch_cache_ensure_procedural_final_points (ParticleHairCache *cache, int subdiv)
 
static void blender::draw::particle_batch_cache_ensure_procedural_strand_data (PTCacheEdit *edit, ParticleSystem *psys, ModifierData *md, ParticleHairCache *cache)
 
static void blender::draw::particle_batch_cache_ensure_procedural_indices (PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *cache, int thickness_res, int subdiv)
 
static void blender::draw::particle_batch_cache_ensure_procedural_pos (PTCacheEdit *edit, ParticleSystem *psys, ParticleHairCache *cache, GPUMaterial *)
 
static void blender::draw::particle_batch_cache_ensure_pos_and_seg (PTCacheEdit *edit, ParticleSystem *psys, ModifierData *md, ParticleHairCache *hair_cache)
 
static void blender::draw::particle_batch_cache_ensure_pos (Object *object, ParticleSystem *psys, ParticlePointCache *point_cache)
 
static void blender::draw::drw_particle_update_ptcache_edit (Object *object_eval, ParticleSystem *psys, PTCacheEdit *edit)
 
static void blender::draw::drw_particle_update_ptcache (Object *object_eval, ParticleSystem *psys)
 
static void blender::draw::drw_particle_get_hair_source (Object *object, ParticleSystem *psys, ModifierData *md, PTCacheEdit *edit, ParticleDrawSource *r_draw_source)
 
static void blender::draw::particle_batch_cache_ensure_edit_pos_and_seg (PTCacheEdit *edit, ParticleSystem *psys, ModifierData *, ParticleHairCache *hair_cache, bool use_weight)
 
static void blender::draw::ensure_edit_inner_points_count (const PTCacheEdit *edit, ParticleBatchCache *cache)
 
static void blender::draw::particle_batch_cache_ensure_edit_inner_pos (PTCacheEdit *edit, ParticleBatchCache *cache)
 
static void blender::draw::ensure_edit_tip_points_count (const PTCacheEdit *edit, ParticleBatchCache *cache)
 
static void blender::draw::particle_batch_cache_ensure_edit_tip_pos (PTCacheEdit *edit, ParticleBatchCache *cache)
 
bool blender::draw::particles_ensure_procedural_data (Object *object, ParticleSystem *psys, ModifierData *md, ParticleHairCache **r_hair_cache, GPUMaterial *gpu_material, int subdiv, int thickness_res)
 
Expose via BKE callbacks
void blender::draw::DRW_particle_batch_cache_dirty_tag (ParticleSystem *psys, int mode)
 
void blender::draw::DRW_particle_batch_cache_free (ParticleSystem *psys)
 
Particles
blender::gpu::Batch * blender::draw::DRW_particles_batch_cache_get_hair (Object *object, ParticleSystem *psys, ModifierData *md)
 
blender::gpu::Batch * blender::draw::DRW_particles_batch_cache_get_dots (Object *object, ParticleSystem *psys)
 
blender::gpu::Batch * blender::draw::DRW_particles_batch_cache_get_edit_strands (Object *object, ParticleSystem *psys, PTCacheEdit *edit, bool use_weight)
 
blender::gpu::Batch * blender::draw::DRW_particles_batch_cache_get_edit_inner_points (Object *object, ParticleSystem *psys, PTCacheEdit *edit)
 
blender::gpu::Batch * blender::draw::DRW_particles_batch_cache_get_edit_tip_points (Object *object, ParticleSystem *psys, PTCacheEdit *edit)
 

Detailed Description

Particle API for render engines.

Definition in file draw_cache_impl_particles.cc.