Blender V5.0
draw_cache_impl_particles.cc File Reference

Particle API for render engines. More...

#include "BLI_color.hh"
#include "DNA_collection_types.h"
#include "DNA_curves_types.h"
#include "DNA_scene_types.h"
#include "DRW_render.hh"
#include "MEM_guardedalloc.h"
#include "BLI_alloca.h"
#include "BLI_math_color.h"
#include "BLI_math_vector.h"
#include "BLI_offset_indices.hh"
#include "BLI_string_utf8.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_material.hh"
#include "DEG_depsgraph_query.hh"
#include "IMB_colormanagement.hh"
#include "draw_attributes.hh"
#include "draw_cache_impl.hh"
#include "draw_hair_private.hh"

Go to the source code of this file.

Classes

struct  blender::draw::ParticleHairFinalCache
struct  blender::draw::ParticleHairCache
struct  blender::draw::ParticlePointCache
struct  blender::draw::ParticleBatchCache
struct  blender::draw::HairAttributeID
struct  blender::draw::EditStrandData

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 const 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 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 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)
void blender::draw::drw_particle_update_ptcache (Object *object_eval, ParticleSystem *psys)
ParticleDrawSource blender::draw::drw_particle_get_hair_source (Object *object, ParticleSystem *psys, ModifierData *md, PTCacheEdit *edit, const int additional_subdivision)
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)
static int blender::draw::particle_mface_index (const ParticleData &particle, int face_count_legacy)
static int blender::draw::particle_mface_index (const ChildParticle &particle, int)
static float4 blender::draw::particle_mcol_convert (const MCol &mcol)
template<typename ParticleDataT>
static float4 blender::draw::interpolate (const ParticleDataT &particle, Span< MFace > mfaces, Span< MCol > mcols)
template<typename ParticleDataT>
static float2 blender::draw::interpolate (const ParticleDataT &particle, Span< MFace > mfaces, Span< MTFace > mtfaces)
static std::optional< StringRefblender::draw::get_first_uv_name (const bke::AttributeAccessor &attributes)
template<typename T>
Span< Tblender::draw::span_from_custom_data_layer (const Mesh &mesh, const eCustomDataType type, const StringRef name)
template<typename T>
Span< Tblender::draw::span_from_custom_data_layer (const Mesh &mesh, const eCustomDataType type)
template<typename InputT, typename OutputT, eCustomDataType data_type>
static gpu::VertBufPtr blender::draw::interpolate_face_corner_attribute_to_curve (ParticleDrawSource &src, const StringRef name)
static gpu::VertBufPtr blender::draw::ensure_curve_attribute (ParticleDrawSource &src, const Mesh &mesh, const StringRef name, bool &r_is_point_domain)
static float blender::draw::hair_shape_radius (float shape, float root, float tip, float time)
CurvesEvalCacheblender::draw::hair_particle_get_eval_cache (ParticleDrawSource &src)
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.