Blender V5.3
curves.cpp File Reference
#include <optional>
#include "blender/attribute_convert.h"
#include "blender/sync.h"
#include "blender/util.h"
#include "scene/attribute.h"
#include "scene/camera.h"
#include "scene/curves.h"
#include "scene/hair.h"
#include "scene/object.h"
#include "scene/scene.h"
#include "util/color.h"
#include "util/hash.h"
#include "util/log.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_particle_types.h"
#include "BLI_listbase.hh"
#include "BLI_math_matrix_c.hh"
#include "BLI_math_vector_c.hh"
#include "BKE_attribute.hh"
#include "BKE_curves.hh"
#include "BKE_customdata.hh"
#include "BKE_mesh_legacy_convert.hh"
#include "BKE_particle.h"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.

Functions

static float shaperadius (const float shape, const float root, const float tip, const float time)
static bool ObtainCacheParticleData (Hair *hair, const blender::Mesh *b_mesh, const blender::Object *b_ob, ParticleCurveData *CData, bool background)
static bool ObtainCacheParticleUV (Hair *hair, const blender::Mesh *b_mesh, const blender::Object *b_ob, ParticleCurveData *CData, bool background, const int uv_num)
static bool ObtainCacheParticleVcol (Hair *hair, const blender::Mesh *b_mesh, const blender::Object *b_ob, ParticleCurveData *CData, bool background, const int vcol_num)
static void ExportCurveSegments (Scene *scene, Hair *hair, ParticleCurveData *CData)
static float4 CurveSegmentMotionCV (ParticleCurveData *CData, const int sys, const int curve, const int curvekey)
static float4 LerpCurveSegmentMotionCV (ParticleCurveData *CData, const int sys, const int curve, const float step)
static void export_hair_motion_validate_attribute (Hair *hair, const int motion_step, const int num_motion_keys, bool have_motion)
static void ExportCurveSegmentsMotion (Hair *hair, ParticleCurveData *CData, const int motion_step)
static void attr_create_motion_from_velocity (Hair *hair, const blender::Span< blender::float3 > src, const float motion_scale)
static AttributeElement blender_domain_to_attr_element (const blender::bke::AttrDomain b_domain)
static void attr_create_generic (Scene *scene, Hair *hair, const blender::bke::CurvesGeometry &b_curves, const bool need_motion, const float motion_scale)
static float4 curve_point_as_float4 (const blender::Span< blender::float3 > b_positions, const blender::Span< float > b_radius, const int index)
static float4 interpolate_curve_points (const blender::Span< blender::float3 > b_positions, const blender::Span< float > b_radius, const int first_point_index, const int num_points, const float step)
static void export_hair_curves (Scene *scene, Hair *hair, const blender::bke::CurvesGeometry &b_curves, const bool need_motion, const float motion_scale)
static bool hair_topology_matches (const Hair *hair, const blender::bke::CurvesGeometry &b_curves)
static void export_hair_curves_motion (Hair *hair, const blender::bke::CurvesGeometry &b_curves, const int motion_step)

Function Documentation

◆ attr_create_generic()

◆ attr_create_motion_from_velocity()

◆ blender_domain_to_attr_element()

◆ curve_point_as_float4()

float4 curve_point_as_float4 ( const blender::Span< blender::float3 > b_positions,
const blender::Span< float > b_radius,
const int index )
static

◆ CurveSegmentMotionCV()

◆ export_hair_curves()

◆ export_hair_curves_motion()

◆ export_hair_motion_validate_attribute()

◆ ExportCurveSegments()

◆ ExportCurveSegmentsMotion()

◆ hair_topology_matches()

◆ interpolate_curve_points()

float4 interpolate_curve_points ( const blender::Span< blender::float3 > b_positions,
const blender::Span< float > b_radius,
const int first_point_index,
const int num_points,
const float step )
static

◆ LerpCurveSegmentMotionCV()

float4 LerpCurveSegmentMotionCV ( ParticleCurveData * CData,
const int sys,
const int curve,
const float step )
static

◆ ObtainCacheParticleData()

bool ObtainCacheParticleData ( Hair * hair,
const blender::Mesh * b_mesh,
const blender::Object * b_ob,
ParticleCurveData * CData,
bool background )
static

Definition at line 66 of file blender/curves.cpp.

References blender::ParticleSettings::childtype, clamp(), ParticleCurveData::curve_firstkey, ParticleCurveData::curve_keynum, ParticleCurveData::curve_length, ParticleCurveData::curvekey_co, ParticleCurveData::curvekey_time, blender::ParticleSettings::disp, blender::ParticleSettings::draw_step, blender::eModifierMode_Realtime, blender::eModifierMode_Render, blender::eModifierType_ParticleSystem, blender::ParticleSettings::kink, blender::ParticleSettings::kink_extra_steps, len(), blender::ModifierData::mode, blender::Object::modifiers, ObtainCacheParticleData(), blender::ParticleSettings::omat, blender::ParticleSystem::part, blender::PART_DRAW_PATH, blender::PART_HAIR, blender::PART_KINK_SPIRAL, blender::PART_SHAPE_CLOSE_TIP, ParticleCurveData::psys_closetip, ParticleCurveData::psys_curvenum, ParticleCurveData::psys_firstcurve, ParticleCurveData::psys_rootradius, ParticleCurveData::psys_shader, ParticleCurveData::psys_shape, ParticleCurveData::psys_tipradius, array< T, alignment >::push_back_slow(), blender::ParticleSettings::rad_root, blender::ParticleSettings::rad_scale, blender::ParticleSettings::rad_tip, blender::ParticleSettings::ren_as, blender::ParticleSettings::ren_step, array< T, alignment >::reserve(), blender::ParticleSettings::shape, blender::ParticleSettings::shape_flag, array< T, alignment >::size(), blender::ParticleSystem::totchild, blender::ParticleSystem::totpart, transform_inverse(), transform_point(), blender::ModifierData::type, blender::ParticleSettings::type, float3::x, and zero_float3().

Referenced by ObtainCacheParticleData().

◆ ObtainCacheParticleUV()

◆ ObtainCacheParticleVcol()

◆ shaperadius()

float shaperadius ( const float shape,
const float root,
const float tip,
const float time )
static

Definition at line 47 of file blender/curves.cpp.

References assert, powf, and shaperadius().

Referenced by CurveSegmentMotionCV(), ExportCurveSegments(), and shaperadius().