|
Blender V4.3
|
#include "BLI_math_matrix.h"#include "BLI_math_rotation.h"#include "BLI_math_vector.h"#include "BLI_noise.h"#include "DNA_material_types.h"#include "DNA_object_types.h"#include "BKE_colortools.hh"#include "BKE_particle.h"#include "particle_private.h"Go to the source code of this file.
Classes | |
| struct | ParticlePathIterator |
Functions | |
| static void | psys_path_iter_get (ParticlePathIterator *iter, ParticleCacheKey *keys, int totkeys, ParticleCacheKey *parent, int index) |
| static void | do_kink_spiral_deform (ParticleKey *state, const float dir[3], const float kink[3], float time, float freq, float shape, float amplitude, const float spiral_start[3]) |
| static void | do_kink_spiral (ParticleThreadContext *ctx, ParticleTexture *ptex, const float parent_orco[3], ChildParticle *cpa, const float orco[3], float hairmat[4][4], ParticleCacheKey *keys, ParticleCacheKey *parent_keys, int *r_totkeys, float *r_max_length) |
| static bool | check_path_length (int k, ParticleCacheKey *keys, ParticleCacheKey *key, float max_length, float step_length, float *cur_length, float dvec[3]) |
| void | psys_apply_child_modifiers (ParticleThreadContext *ctx, ListBase *, ChildParticle *cpa, ParticleTexture *ptex, const float orco[3], float hairmat[4][4], ParticleCacheKey *keys, ParticleCacheKey *parent_keys, const float parent_orco[3]) |
| void | do_kink (ParticleKey *state, const float par_co[3], const float par_vel[3], const float par_rot[4], float time, float freq, float shape, float amplitude, float flat, short type, short axis, const float obmat[4][4], int smooth_start) |
| static float | do_clump_level (float result[3], const float co[3], const float par_co[3], float time, float clumpfac, float clumppow, float pa_clump, const CurveMapping *clumpcurve) |
| float | do_clump (ParticleKey *state, const float par_co[3], float time, const float orco_offset[3], float clumpfac, float clumppow, float pa_clump, bool use_clump_noise, float clump_noise_size, const CurveMapping *clumpcurve) |
| static void | do_rough (const float loc[3], const float mat[4][4], float t, float fac, float size, float thres, ParticleKey *state) |
| static void | do_rough_end (const float loc[3], const float mat[4][4], float t, float fac, float shape, ParticleKey *state) |
| static void | do_rough_curve (const float loc[3], const float mat[4][4], float time, float fac, float size, CurveMapping *roughcurve, ParticleKey *state) |
| static int | twist_num_segments (const ParticleChildModifierContext *modifier_ctx) |
| static void | twist_get_axis (const ParticleChildModifierContext *modifier_ctx, const float time, float r_axis[3]) |
| static float | BKE_curvemapping_integrate_clamped (const CurveMapping *curve, float start, float end, float step) |
| static void | do_twist (const ParticleChildModifierContext *modifier_ctx, ParticleKey *state, const float time) |
| void | do_child_modifiers (const ParticleChildModifierContext *modifier_ctx, float mat[4][4], ParticleKey *state, float t) |
|
static |
Definition at line 729 of file particle_child.cc.
References BKE_curvemapping_evaluateF(), and clamp_f().
Referenced by do_twist().
|
static |
Definition at line 266 of file particle_child.cc.
References add_v3_v3v3(), ParticleCacheKey::co, mul_v3_fl(), ParticleCacheKey::segments, and sub_v3_v3v3().
Referenced by psys_apply_child_modifiers().
| void do_child_modifiers | ( | const ParticleChildModifierContext * | modifier_ctx, |
| float | mat[4][4], | ||
| ParticleKey * | state, | ||
| float | t ) |
Definition at line 796 of file particle_child.cc.
References ParticleSystem::child, ParticleSettings::childtype, ParticleTexture::clump, ParticleThreadContext::clumpcurve, ParticleChildModifierContext::cpa, ParticleSimulationData::depsgraph, do_clump(), do_guides(), do_kink(), do_rough(), do_rough_curve(), do_rough_end(), do_twist(), ParticleSystem::effectors, ParticleTexture::kink_amp, ParticleTexture::kink_freq, ParticleSimulationData::ob, ParticleChildModifierContext::orco, ParticleChildModifierContext::par_co, ParticleChildModifierContext::par_orco, ParticleChildModifierContext::par_rot, ParticleChildModifierContext::par_vel, ChildParticle::parent, ParticleSystem::part, PART_CHILD_EFFECT, PART_CHILD_FACES, PART_CHILD_USE_CLUMP_CURVE, PART_CHILD_USE_CLUMP_NOISE, PART_CHILD_USE_ROUGH_CURVE, ParticleSimulationData::psys, psys_frand_vec(), ParticleChildModifierContext::ptex, ParticleTexture::rough1, ParticleTexture::rough2, ParticleThreadContext::roughcurve, ParticleTexture::roughe, ParticleChildModifierContext::sim, state, sub_v3_v3v3(), and ParticleChildModifierContext::thread_ctx.
Referenced by do_kink_spiral(), psys_apply_child_modifiers(), psys_get_particle_on_path(), and psys_get_particle_state().
| float do_clump | ( | ParticleKey * | state, |
| const float | par_co[3], | ||
| float | time, | ||
| const float | orco_offset[3], | ||
| float | clumpfac, | ||
| float | clumppow, | ||
| float | pa_clump, | ||
| bool | use_clump_noise, | ||
| float | clump_noise_size, | ||
| const CurveMapping * | clumpcurve ) |
Definition at line 598 of file particle_child.cc.
References add_v3_v3v3(), BLI_noise_voronoi(), do_clump_level(), mul_v3_fl(), mul_v3_v3fl(), and state.
Referenced by do_child_modifiers(), and do_guides().
|
static |
Definition at line 558 of file particle_child.cc.
References BKE_curvemapping_evaluateF(), clamp_f(), float, interp_v3_v3v3(), and pow().
Referenced by do_clump().
| void do_kink | ( | ParticleKey * | state, |
| const float | par_co[3], | ||
| const float | par_vel[3], | ||
| const float | par_rot[4], | ||
| float | time, | ||
| float | freq, | ||
| float | shape, | ||
| float | amplitude, | ||
| float | flat, | ||
| short | type, | ||
| short | axis, | ||
| const float | obmat[4][4], | ||
| int | smooth_start ) |
Definition at line 385 of file particle_child.cc.
References add_v3_v3(), add_v3_v3v3(), axis_angle_to_quat(), CLAMP, copy_v3_v3(), cosf, dot_v3v3(), ELEM, fabsf, float, interp_v3_v3v3(), length(), M_PI, madd_v3_v3fl(), mul_mat3_m4_v3(), mul_qt_v3(), mul_v3_fl(), mul_v3_v3fl(), negate_v3(), normalize_v3(), normalize_v3_v3(), PART_KINK_BRAID, PART_KINK_CURL, PART_KINK_NO, PART_KINK_RADIAL, PART_KINK_SPIRAL, PART_KINK_WAVE, pow(), project_v3_v3v3(), q1, sinf, sqrt(), state, sub_v3_v3(), and sub_v3_v3v3().
Referenced by do_child_modifiers(), and do_guides().
|
static |
Definition at line 120 of file particle_child.cc.
References axis_angle_normalized_to_mat3(), ParticleSystem::child, ParticleSystem::child_seed, ParticleCacheKey::co, ParticleChildModifierContext::cpa, do_child_modifiers(), do_kink_spiral_deform(), ParticleThreadContext::extra_segments, float, int, interp_qt_qtqt(), interp_v3_v3v3(), ParticleTexture::kink_amp, ParticleTexture::kink_freq, len_v3v3(), ParticleTexture::length, M_PI, mul_m3_v3(), mul_mat3_m4_v3(), normalize_v3(), ParticleSimulationData::ob, ParticleChildModifierContext::orco, ParticleChildModifierContext::par_co, ParticleChildModifierContext::par_orco, ParticleChildModifierContext::par_rot, ParticleChildModifierContext::par_vel, ParticleChildModifierContext::parent_keys, ParticleSystem::part, project_v3_v3v3(), ParticleSimulationData::psys, psys_frand(), psys_path_iter_get(), ParticleChildModifierContext::ptex, ParticleCacheKey::rot, rot, seed, ParticleThreadContext::segments, ParticleChildModifierContext::sim, ParticleThreadContext::sim, sub_v3_v3v3(), ParticleChildModifierContext::thread_ctx, ParticleCacheKey::vel, and zero_v3().
Referenced by psys_apply_child_modifiers().
|
static |
Definition at line 62 of file particle_child.cc.
References add_v3_v3v3(), atanf, axis_angle_normalized_to_mat3(), b, CLAMP, copy_v3_v3(), cross_v3_v3v3(), expf, float, M_PI, M_PI_2, madd_v3_v3fl(), mul_m3_v3(), mul_v3_v3fl(), normalize_v3(), rot, sqrtf, and state.
Referenced by do_kink_spiral().
|
static |
Definition at line 629 of file particle_child.cc.
References BLI_noise_generic_turbulence(), copy_v3_v3(), fabsf, madd_v3_v3fl(), mul_v3_fl(), and state.
Referenced by do_child_modifiers().
|
static |
Definition at line 676 of file particle_child.cc.
References BKE_curvemapping_evaluateF(), BLI_noise_generic_turbulence(), clamp_f(), copy_v3_v3(), madd_v3_v3fl(), mul_v3_fl(), and state.
Referenced by do_child_modifiers().
|
static |
Definition at line 660 of file particle_child.cc.
References copy_v2_v2(), float, madd_v3_v3fl(), mul_v2_fl(), pow(), and state.
Referenced by do_child_modifiers().
|
static |
Definition at line 746 of file particle_child.cc.
References add_v3_v3(), BKE_curvemapping_integrate_clamped(), M_PI, ParticleChildModifierContext::par_co, ParticleChildModifierContext::parent_keys, ParticleSystem::part, PART_CHILD_PARTICLES, PART_CHILD_USE_TWIST_CURVE, ParticleSimulationData::psys, ParticleChildModifierContext::ptex, rotate_v3_v3v3fl(), ParticleChildModifierContext::sim, state, sub_v3_v3v3(), ParticleChildModifierContext::thread_ctx, time, ParticleTexture::twist, twist_get_axis(), twist_num_segments(), and ParticleThreadContext::twistcurve.
Referenced by do_child_modifiers().
| void psys_apply_child_modifiers | ( | ParticleThreadContext * | ctx, |
| ListBase * | modifiers, | ||
| ChildParticle * | cpa, | ||
| ParticleTexture * | ptex, | ||
| const float | orco[3], | ||
| float | hairmat[4][4], | ||
| ParticleCacheKey * | keys, | ||
| ParticleCacheKey * | parent_keys, | ||
| const float | parent_orco[3] ) |
Definition at line 287 of file particle_child.cc.
References check_path_length(), ParticleCacheKey::co, ParticleKey::co, ParticleCacheKey::col, copy_v3_v3(), ParticleChildModifierContext::cpa, do_child_modifiers(), do_kink_spiral(), ELEM, float, ParticleTexture::length, ParticleThreadContext::ma, mul_v3_fl(), ParticleChildModifierContext::orco, ParticleChildModifierContext::par_co, ParticleChildModifierContext::par_orco, ParticleChildModifierContext::par_rot, ParticleChildModifierContext::par_vel, ParticlePathIterator::parent_key, ParticleChildModifierContext::parent_keys, ParticlePathIterator::parent_rotation, ParticleSystem::part, PART_DRAW_COL_MAT, PART_KINK_SPIRAL, ParticleSimulationData::psys, psys_path_iter_get(), ParticleChildModifierContext::ptex, Material::r, ParticleCacheKey::segments, ParticleThreadContext::segments, ParticleChildModifierContext::sim, ParticleThreadContext::sim, sub_v3_v3v3(), ParticleChildModifierContext::thread_ctx, ParticlePathIterator::time, ParticleCacheKey::vel, and ParticleKey::vel.
Referenced by psys_thread_create_path().
|
static |
Definition at line 33 of file particle_child.cc.
References BLI_assert, copy_qt_qt(), float, ParticlePathIterator::index, ParticlePathIterator::key, mul_qt_qtqt(), ParticlePathIterator::parent_key, ParticlePathIterator::parent_rotation, ParticleCacheKey::rot, ParticlePathIterator::time, and unit_qt().
Referenced by do_kink_spiral(), and psys_apply_child_modifiers().
|
static |
Definition at line 713 of file particle_child.cc.
References clamp_i(), ParticleCacheKey::co, ParticleChildModifierContext::parent_keys, sub_v3_v3v3(), and twist_num_segments().
Referenced by do_twist().
|
static |
Definition at line 707 of file particle_child.cc.
References ParticleSettings::draw_step, ParticleSystem::part, ParticleSimulationData::psys, ParticleThreadContext::segments, ParticleChildModifierContext::sim, and ParticleChildModifierContext::thread_ctx.
Referenced by do_twist(), and twist_get_axis().