|
Blender
V2.93
|
#include <DNA_hair_types.h>
Inherits Geometry.
Classes | |
| struct | Curve |
Public Member Functions | |
| Hair () | |
| ~Hair () | |
| void | clear (bool preserve_shaders=false) override |
| void | resize_curves (int numcurves, int numkeys) |
| void | reserve_curves (int numcurves, int numkeys) |
| void | add_curve_key (float3 loc, float radius) |
| void | add_curve (int first_key, int shader) |
| void | copy_center_to_motion_step (const int motion_step) |
| void | compute_bounds () override |
| void | apply_transform (const Transform &tfm, const bool apply_to_motion) override |
| Curve | get_curve (size_t i) const |
| size_t | num_keys () const |
| size_t | num_curves () const |
| size_t | num_segments () const |
| void | get_uv_tiles (ustring map, unordered_set< int > &tiles) override |
| void | pack_curves (Scene *scene, float4 *curve_key_co, float4 *curve_data, size_t curvekey_offset) |
| void | pack_primitives (PackedBVH *pack, int object, uint visibility, PackFlags pack_flags) override |
Public Member Functions inherited from Geometry | |
| Geometry (const NodeType *node_type, const Type type) | |
| virtual | ~Geometry () |
| bool | need_attribute (Scene *scene, AttributeStandard std) |
| bool | need_attribute (Scene *scene, ustring name) |
| AttributeRequestSet | needed_attributes () |
| float | motion_time (int step) const |
| int | motion_step (float time) const |
| void | compute_bvh (Device *device, DeviceScene *dscene, SceneParams *params, Progress *progress, int n, int total) |
| bool | need_build_bvh (BVHLayout layout) const |
| bool | is_instanced () const |
| bool | has_true_displacement () const |
| bool | has_motion_blur () const |
| bool | has_voxel_attributes () const |
| bool | is_mesh () const |
| bool | is_hair () const |
| bool | is_volume () const |
| void | tag_update (Scene *scene, bool rebuild) |
| void | tag_bvh_update (bool rebuild) |
Public Member Functions inherited from Node | |
| Node (const NodeType *type, ustring name=ustring()) | |
| virtual | ~Node ()=0 |
| void | set (const SocketType &input, bool value) |
| void | set (const SocketType &input, int value) |
| void | set (const SocketType &input, uint value) |
| void | set (const SocketType &input, float value) |
| void | set (const SocketType &input, float2 value) |
| void | set (const SocketType &input, float3 value) |
| void | set (const SocketType &input, const char *value) |
| void | set (const SocketType &input, ustring value) |
| void | set (const SocketType &input, const Transform &value) |
| void | set (const SocketType &input, Node *value) |
| void | set (const SocketType &input, array< bool > &value) |
| void | set (const SocketType &input, array< int > &value) |
| void | set (const SocketType &input, array< float > &value) |
| void | set (const SocketType &input, array< float2 > &value) |
| void | set (const SocketType &input, array< float3 > &value) |
| void | set (const SocketType &input, array< ustring > &value) |
| void | set (const SocketType &input, array< Transform > &value) |
| void | set (const SocketType &input, array< Node * > &value) |
| bool | get_bool (const SocketType &input) const |
| int | get_int (const SocketType &input) const |
| uint | get_uint (const SocketType &input) const |
| float | get_float (const SocketType &input) const |
| float2 | get_float2 (const SocketType &input) const |
| float3 | get_float3 (const SocketType &input) const |
| ustring | get_string (const SocketType &input) const |
| Transform | get_transform (const SocketType &input) const |
| Node * | get_node (const SocketType &input) const |
| const array< bool > & | get_bool_array (const SocketType &input) const |
| const array< int > & | get_int_array (const SocketType &input) const |
| const array< float > & | get_float_array (const SocketType &input) const |
| const array< float2 > & | get_float2_array (const SocketType &input) const |
| const array< float3 > & | get_float3_array (const SocketType &input) const |
| const array< ustring > & | get_string_array (const SocketType &input) const |
| const array< Transform > & | get_transform_array (const SocketType &input) const |
| const array< Node * > & | get_node_array (const SocketType &input) const |
| bool | has_default_value (const SocketType &input) const |
| void | set_default_value (const SocketType &input) |
| bool | equals_value (const Node &other, const SocketType &input) const |
| void | copy_value (const SocketType &input, const Node &other, const SocketType &other_input) |
| void | set_value (const SocketType &input, const Node &other, const SocketType &other_input) |
| bool | equals (const Node &other) const |
| void | hash (MD5Hash &md5) |
| size_t | get_total_size_in_bytes () const |
| bool | is_a (const NodeType *type) |
| bool | socket_is_modified (const SocketType &input) const |
| bool | is_modified () |
| void | tag_modified () |
| void | clear_modified () |
| void | print_modified_sockets () const |
| const NodeOwner * | get_owner () const |
| void | set_owner (const NodeOwner *owner_) |
Public Attributes | |
| ID | id |
| struct AnimData * | adt |
| int | flag |
| int | _pad1 [1] |
| float(* | co )[3] |
| float * | radius |
| struct HairCurve * | curves |
| struct HairMaping * | mapping |
| int | totpoint |
| int | totcurve |
| struct CustomData | pdata |
| struct CustomData | cdata |
| int | attributes_active_index |
| int | _pad3 |
| struct Material ** | mat |
| short | totcol |
| short | _pad2 [3] |
| void * | batch_cache |
| size_t | curvekey_offset |
| CurveShapeType | curve_shape |
Public Attributes inherited from Geometry | |
| Type | geometry_type |
| AttributeSet | attributes |
| BoundBox | bounds |
| bool | transform_applied |
| bool | transform_negative_scaled |
| Transform | transform_normal |
| BVH * | bvh |
| size_t | attr_map_offset |
| size_t | prim_offset |
| size_t | optix_prim_offset |
| bool | has_volume |
| bool | has_surface_bssrdf |
| bool | need_update_rebuild |
| bool | need_update_bvh_for_offset |
| size_t | index |
Public Attributes inherited from Node | |
| ustring | name |
| const NodeType * | type |
| InternalNode | internal |
| LeafNode | leaf |
Additional Inherited Members | |
Public Types inherited from Geometry | |
| enum | Type { MESH , HAIR , VOLUME } |
Static Public Attributes inherited from Geometry | |
| static const uint | MAX_MOTION_STEPS = 129 |
Protected Member Functions inherited from Node | |
| template<typename T > | |
| void | set_if_different (const SocketType &input, T value) |
| template<typename T > | |
| void | set_if_different (const SocketType &input, array< T > &value) |
Static Protected Member Functions inherited from Node | |
| template<typename T > | |
| static T & | get_socket_value (const Node *node, const SocketType &socket) |
Protected Attributes inherited from Node | |
| const NodeOwner * | owner |
| SocketModifiedFlags | socket_modified |
Definition at line 45 of file DNA_hair_types.h.
| Hair::Hair | ( | ) |
Definition at line 296 of file hair.cpp.
References CURVE_RIBBON, curve_shape, and curvekey_offset.
| void Hair::add_curve | ( | int | first_key, |
| int | shader | ||
| ) |
Definition at line 338 of file hair.cpp.
Referenced by ExportCurveSegments().
|
overridevirtual |
Implements Geometry.
Definition at line 425 of file hair.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, co, cross(), Attribute::data_float4(), dot(), fabsf, AttributeSet::find(), float3_to_float4(), float4_to_float3(), powf, radius, transform_get_column(), and transform_point().
|
overridevirtual |
Reimplemented from Geometry.
Definition at line 326 of file hair.cpp.
References Geometry::attributes, Geometry::clear(), and AttributeSet::clear().
Referenced by ExportCurveSegments().
|
overridevirtual |
Implements Geometry.
Definition at line 382 of file hair.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Geometry::bounds, Attribute::data_float3(), BoundBox::empty, AttributeSet::find(), BoundBox::grow(), BoundBox::grow_safe(), BoundBox::valid(), and zero_float3().
| void Hair::copy_center_to_motion_step | ( | const int | motion_step | ) |
Definition at line 356 of file hair.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Attribute::data_float3(), AttributeSet::find(), and Geometry::motion_step().
|
inline |
Definition at line 119 of file hair.h.
References curve.
Referenced by BVHBuild::add_reference_curves(), BVHUnaligned::compute_aligned_prim_boundbox(), BVHUnaligned::compute_aligned_space(), count_curve_segments(), pack_curves(), pack_primitives(), BVH2::refit_primitives(), BVHSpatialSplit::split_curve_primitive(), and BVHSpatialSplit::split_object_reference().
|
overridevirtual |
Implements Geometry.
Definition at line 366 of file hair.cpp.
References ATTR_PRIM_GEOMETRY, ATTR_STD_UV, Geometry::attributes, AttributeSet::find(), and Attribute::get_uv_tiles().
|
inline |
Definition at line 133 of file hair.h.
Referenced by BVHBuild::add_reference_curves(), count_curve_segments(), GeometryManager::device_update_mesh(), Attribute::element_size(), ExportCurveSegments(), GeometryManager::mesh_calc_offset(), pack_curves(), pack_primitives(), and BVHSpatialSplit::split_object_reference().
|
inline |
Definition at line 138 of file hair.h.
Referenced by GeometryManager::device_update_bvh(), and GeometryManager::mesh_calc_offset().
| void Hair::pack_curves | ( | Scene * | scene, |
| float4 * | curve_key_co, | ||
| float4 * | curve_data, | ||
| size_t | curvekey_offset | ||
| ) |
Definition at line 463 of file hair.cpp.
References __int_as_float(), curve, curvekey_offset, Scene::default_surface, Hair::Curve::first_key, get_curve(), ShaderManager::get_shader_id(), make_float4, num_curves(), Hair::Curve::num_keys, scene, shader(), Scene::shader_manager, x, y, and z.
Referenced by GeometryManager::device_update_mesh().
|
overridevirtual |
Implements Geometry.
Definition at line 497 of file hair.cpp.
References curve, CURVE_RIBBON, curve_shape, get_curve(), Geometry::has_motion_blur(), Geometry::index, num_curves(), Hair::Curve::num_segments(), Geometry::optix_prim_offset, PACK_GEOMETRY, PACK_VISIBILITY, PackedBVH::prim_index, PackedBVH::prim_object, Geometry::prim_offset, PackedBVH::prim_tri_index, PackedBVH::prim_type, PackedBVH::prim_visibility, PRIMITIVE_CURVE_RIBBON, PRIMITIVE_CURVE_THICK, PRIMITIVE_MOTION_CURVE_RIBBON, PRIMITIVE_MOTION_CURVE_THICK, PRIMITIVE_PACK_SEGMENT, and Node::type.
| void Hair::reserve_curves | ( | int | numcurves, |
| int | numkeys | ||
| ) |
Definition at line 316 of file hair.cpp.
References Geometry::attributes, and AttributeSet::resize().
Referenced by ExportCurveSegments().
| void Hair::resize_curves | ( | int | numcurves, |
| int | numkeys | ||
| ) |
Definition at line 306 of file hair.cpp.
References Geometry::attributes, and AttributeSet::resize().
| int Hair::_pad1[1] |
Definition at line 50 of file DNA_hair_types.h.
| short Hair::_pad2[3] |
Definition at line 69 of file DNA_hair_types.h.
| int Hair::_pad3 |
Definition at line 64 of file DNA_hair_types.h.
| struct AnimData* Hair::adt |
Definition at line 47 of file DNA_hair_types.h.
Referenced by acf_dshair_setting_ptr(), hair_blend_read_data(), hair_blend_write(), make_new_animlistelem(), and outliner_add_id_contents().
| int Hair::attributes_active_index |
Definition at line 63 of file DNA_hair_types.h.
| void* Hair::batch_cache |
Definition at line 72 of file DNA_hair_types.h.
Referenced by BKE_hair_batch_cache_dirty_tag(), BKE_hair_batch_cache_free(), DRW_hair_batch_cache_dirty_tag(), DRW_hair_batch_cache_free(), hair_batch_cache_clear(), hair_batch_cache_get(), hair_batch_cache_init(), hair_batch_cache_valid(), and hair_copy_data().
| struct CustomData Hair::cdata |
Definition at line 58 of file DNA_hair_types.h.
Referenced by BKE_hair_new_for_eval(), BKE_hair_update_customdata_pointers(), get_domains(), hair_blend_read_data(), hair_blend_write(), hair_copy_data(), hair_free_data(), hair_init_data(), and hair_random().
| float(* Hair::co)[3] |
Definition at line 53 of file DNA_hair_types.h.
Referenced by add_curve_key(), apply_transform(), BKE_hair_boundbox_get(), BKE_hair_update_customdata_pointers(), hair_batch_cache_fill_segments_proc_pos(), hair_evaluate_modifiers(), and hair_random().
| CurveShapeType Hair::curve_shape |
Definition at line 99 of file hair.h.
Referenced by BVHBuild::add_reference_curves(), Hair(), and pack_primitives().
| size_t Hair::curvekey_offset |
Definition at line 98 of file hair.h.
Referenced by GeometryManager::device_update_mesh(), Hair(), GeometryManager::mesh_calc_offset(), and pack_curves().
| struct HairCurve* Hair::curves |
Definition at line 55 of file DNA_hair_types.h.
Referenced by BKE_hair_update_customdata_pointers(), ensure_seg_pt_count(), hair_batch_cache_fill_segments_indices(), hair_batch_cache_fill_segments_proc_pos(), hair_batch_cache_fill_strands_data(), and hair_random().
| int Hair::flag |
Definition at line 49 of file DNA_hair_types.h.
Referenced by acf_dshair_setting_ptr().
| ID Hair::id |
Definition at line 46 of file DNA_hair_types.h.
Referenced by BKE_hair_copy_for_eval(), BKE_hair_data_update(), BKE_hair_new_for_eval(), hair_blend_read_lib(), hair_blend_write(), and hair_free_data().
| struct HairMaping* Hair::mapping |
Definition at line 56 of file DNA_hair_types.h.
Referenced by BKE_hair_update_customdata_pointers().
| struct Material** Hair::mat |
Definition at line 67 of file DNA_hair_types.h.
Referenced by BKE_hair_new_for_eval(), BKE_object_material_array_p(), EEVEE_cryptomatte_object_hair_cache_populate(), hair_blend_read_data(), hair_blend_read_expand(), hair_blend_read_lib(), hair_blend_write(), hair_copy_data(), hair_foreach_id(), hair_free_data(), and unlink_material_fn().
| struct CustomData Hair::pdata |
Definition at line 58 of file DNA_hair_types.h.
Referenced by BKE_hair_new_for_eval(), BKE_hair_update_customdata_pointers(), get_domains(), hair_blend_read_data(), hair_blend_write(), hair_copy_data(), hair_evaluate_modifiers(), hair_free_data(), hair_init_data(), and hair_random().
| float* Hair::radius |
Definition at line 54 of file DNA_hair_types.h.
Referenced by add_curve_key(), apply_transform(), BKE_hair_boundbox_get(), BKE_hair_update_customdata_pointers(), and hair_random().
| short Hair::totcol |
Definition at line 68 of file DNA_hair_types.h.
Referenced by BKE_hair_new_for_eval(), BKE_object_material_len_p(), DRW_hair_material_count_get(), hair_blend_read_expand(), hair_blend_read_lib(), hair_blend_write(), hair_foreach_id(), and unlink_material_fn().
| int Hair::totcurve |
Definition at line 58 of file DNA_hair_types.h.
Referenced by BKE_hair_new_for_eval(), ensure_seg_pt_count(), get_domains(), hair_batch_cache_fill_segments_indices(), hair_batch_cache_fill_segments_proc_pos(), hair_batch_cache_fill_strands_data(), hair_blend_read_data(), hair_blend_write(), hair_copy_data(), hair_free_data(), hair_init_data(), and hair_random().
| int Hair::totpoint |
Definition at line 57 of file DNA_hair_types.h.
Referenced by BKE_hair_boundbox_get(), BKE_hair_new_for_eval(), get_domains(), hair_blend_read_data(), hair_blend_write(), hair_copy_data(), hair_evaluate_modifiers(), hair_free_data(), hair_init_data(), and hair_random().