Blender
V3.3
|
#include <hair.h>
Classes | |
struct | Curve |
Public Attributes | |
size_t | curve_key_offset |
size_t | curve_segment_offset |
CurveShapeType | curve_shape |
![]() | |
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 |
bool | has_volume |
bool | has_surface_bssrdf |
bool | need_update_rebuild |
bool | need_update_bvh_for_offset |
size_t | index |
![]() | |
ustring | name |
const NodeType * | type |
InternalNode | internal |
LeafNode | leaf |
Additional Inherited Members | |
![]() | |
enum | Type { MESH , HAIR , VOLUME , POINTCLOUD } |
![]() | |
static const uint | MAX_MOTION_STEPS = 129 |
![]() | |
template<typename T > | |
void | set_if_different (const SocketType &input, T value) |
void | set_if_different (const SocketType &input, Node *value) |
template<typename T > | |
void | set_if_different (const SocketType &input, array< T > &value) |
void | set_if_different (const SocketType &input, array< Node * > &value) |
void | dereference_all_used_nodes () |
![]() | |
template<typename T > | |
static T & | get_socket_value (const Node *node, const SocketType &socket) |
![]() | |
const NodeOwner * | owner |
int | ref_count {0} |
SocketModifiedFlags | socket_modified |
Hair::Hair | ( | ) |
Definition at line 288 of file hair.cpp.
References curve_key_offset, CURVE_RIBBON, curve_segment_offset, and curve_shape.
void Hair::add_curve | ( | int | first_key, |
int | shader | ||
) |
Definition at line 340 of file hair.cpp.
Referenced by ExportCurveSegments().
Definition at line 331 of file hair.cpp.
Referenced by ExportCurveSegments().
Implements Geometry.
Definition at line 418 of file hair.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, blender::math::cross(), Attribute::data_float4(), blender::math::dot(), fabsf, AttributeSet::find(), float3_to_float4(), float4_to_float3(), powf, transform_get_column(), and transform_point().
Reimplemented from Geometry.
Definition at line 319 of file hair.cpp.
References Geometry::attributes, Geometry::clear(), and AttributeSet::clear().
Referenced by ExportCurveSegments().
|
overridevirtual |
Implements Geometry.
Definition at line 375 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 349 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 109 of file hair.h.
References curve.
Referenced by BVHBuild::add_reference_curves(), BVHUnaligned::compute_aligned_prim_boundbox(), BVHUnaligned::compute_aligned_space(), count_curve_segments(), export_hair_curves_motion(), fill_shader_input(), pack_curves(), BVH2::refit_primitives(), BVHSpatialSplit::split_curve_primitive(), and BVHSpatialSplit::split_object_reference().
|
overridevirtual |
Implements Geometry.
Definition at line 359 of file hair.cpp.
References ATTR_PRIM_GEOMETRY, ATTR_STD_UV, Geometry::attributes, AttributeSet::find(), Attribute::get_uv_tiles(), map, and tiles.
bool Hair::need_shadow_transparency | ( | ) |
Definition at line 554 of file hair.cpp.
References Shader::has_surface_transparent, and node.
Referenced by GeometryManager::device_update(), GeometryManager::device_update_displacement_images(), and update_shadow_transparency().
|
inline |
Definition at line 123 of file hair.h.
Referenced by BVHBuild::add_reference_curves(), count_curve_segments(), GeometryManager::device_update_mesh(), Attribute::element_size(), export_hair_curves_motion(), ExportCurveSegments(), fill_shader_input(), GeometryManager::geom_calc_offset(), pack_curves(), and BVHSpatialSplit::split_object_reference().
|
inline |
Definition at line 118 of file hair.h.
Referenced by Hair::Curve::bounds_grow(), Hair::Curve::cardinal_keys_for_step(), export_hair_curves_motion(), Hair::Curve::keys_for_step(), and update_shadow_transparency().
|
inline |
Definition at line 128 of file hair.h.
Referenced by GeometryManager::device_update_mesh(), and GeometryManager::geom_calc_offset().
void Hair::pack_curves | ( | Scene * | scene, |
float4 * | curve_key_co, | ||
KernelCurve * | curve, | ||
KernelCurveSegment * | curve_segments | ||
) |
Definition at line 459 of file hair.cpp.
References curve, curve_key_offset, curves, Scene::default_surface, Hair::Curve::first_key, get_curve(), ShaderManager::get_shader_id(), Geometry::index, make_float4, num_curves(), Hair::Curve::num_keys, Hair::Curve::num_segments(), KernelCurveSegment::prim, Geometry::prim_offset, PRIMITIVE_PACK_SEGMENT, primitive_type(), scene, Scene::shader_manager, Node::type, KernelCurveSegment::type, x, y, and z.
Referenced by GeometryManager::device_update_mesh().
|
overridevirtual |
Implements Geometry.
Definition at line 501 of file hair.cpp.
References CURVE_RIBBON, curve_shape, Geometry::has_motion_blur(), PRIMITIVE_CURVE_RIBBON, PRIMITIVE_CURVE_THICK, PRIMITIVE_MOTION_CURVE_RIBBON, and PRIMITIVE_MOTION_CURVE_THICK.
Referenced by BVHBuild::add_reference_curves(), and pack_curves().
void Hair::reserve_curves | ( | int | numcurves, |
int | numkeys | ||
) |
Definition at line 309 of file hair.cpp.
References Geometry::attributes, and AttributeSet::resize().
Referenced by ExportCurveSegments().
void Hair::resize_curves | ( | int | numcurves, |
int | numkeys | ||
) |
Definition at line 299 of file hair.cpp.
References Geometry::attributes, and AttributeSet::resize().
Referenced by export_hair_curves().
Definition at line 566 of file hair.cpp.
References AttributeSet::add(), ATTR_STD_SHADOW_TRANSPARENCY, Geometry::attributes, Attribute::data_float(), ShaderEval::eval(), fill_shader_input(), AttributeSet::find(), function_bind, Node::name, need_shadow_transparency(), num_keys(), OBJECT_NONE, Scene::objects, read_shader_output(), AttributeSet::remove(), scene, Progress::set_status(), SHADER_EVAL_CURVE_SHADOW_TRANSPARENCY, and string_printf().
size_t Hair::curve_key_offset |
Definition at line 87 of file hair.h.
Referenced by GeometryManager::device_update_mesh(), GeometryManager::geom_calc_offset(), Hair(), and pack_curves().
size_t Hair::curve_segment_offset |
Definition at line 88 of file hair.h.
Referenced by GeometryManager::device_update_mesh(), GeometryManager::geom_calc_offset(), and Hair().
CurveShapeType Hair::curve_shape |
Definition at line 89 of file hair.h.
Referenced by Hair(), and primitive_type().