|
Blender V5.3
|
#include <attribute.h>
Classes | |
| struct | Buffer |
Public Member Functions | |
| Attribute (ustring name, const TypeDesc type, AttributeElement element, Geometry *geom, AttributePrimitive prim) | |
| Attribute (ustring name, const TypeDesc type, AttributeElement element, const void *data, int size, ImplicitSharingInfo sharing_info) | |
| Attribute (Attribute &&other) | |
| Attribute & | operator= (Attribute &&other)=delete |
| Attribute (const Attribute &other)=delete | |
| Attribute & | operator= (const Attribute &other)=delete |
| ~Attribute () | |
| void | set (ustring name, const TypeDesc type, AttributeElement element) |
| void | resize (Geometry *geom, AttributePrimitive prim) |
| void | resize (const size_t num_elements) |
| void | add_motion (const Geometry *geom) |
| void | remove_motion () |
| bool | has_motion () const |
| int | num_motion_steps () const |
| void | take_motion_from (Attribute &other) |
| void | set_motion_step_shared (int step, const void *data, int new_size, ImplicitSharingInfo sharing_info) |
| size_t | data_sizeof () const |
| size_t | buffer_size (Geometry *geom, AttributePrimitive prim) const |
| template<typename T = void> | |
| const T * | data (const int step=0) const |
| template<typename T = void> | |
| T * | data_for_write (const int step=0) |
| int | time_step_to_attr_step (const int step, const int num_time_steps) const |
| template<typename T = void> | |
| const T * | data_at_time_step (const int step, const int num_time_steps) const |
| const ImageHandle & | data_voxel () const |
| ImageHandle & | data_voxel_for_write () |
| void | zero_data (void *dst) |
| void | set_data_from (Attribute &&other) |
| void | free_data () |
| bool | matches_standard (const Geometry *geometry, AttributeStandard std) const |
| void | get_uv_tiles (Geometry *geom, AttributePrimitive prim, unordered_set< int > &tiles) const |
Static Public Member Functions | |
| static size_t | element_size (Geometry *geom, AttributeElement element, AttributePrimitive prim) |
| static bool | same_storage (const TypeDesc a, const TypeDesc b) |
| static const char * | standard_name (AttributeStandard std) |
| static AttributeStandard | name_standard (ustring name) |
| static AttributeStandard | name_volume_standard (ustring name) |
| static ustring | osl_name (AttributeStandard std) |
| static ustring | osl_name (ustring name) |
| static AttrKernelDataType | kernel_type (const Attribute &attr) |
Public Attributes | |
| ustring | name |
| AttributeStandard | std |
| TypeDesc | type |
| Buffer | center |
| vector< Buffer > | motion |
| int | size = 0 |
| AttributeElement | element |
| uint | flags |
| bool | modified |
Definition at line 57 of file scene/attribute.h.
| CCL_NAMESPACE_BEGIN Attribute::Attribute | ( | ustring | name, |
| const TypeDesc | type, | ||
| AttributeElement | element, | ||
| Geometry * | geom, | ||
| AttributePrimitive | prim ) |
Definition at line 20 of file attribute.cpp.
References assert, ATTR_ELEMENT_VOXEL, ATTR_STD_NONE, center, Attribute::Buffer::data, data(), element, element_size(), flags, GuardedAllocator< T >::GuardedAllocator(), ImageHandle::ImageHandle(), modified, name, resize(), size, std, and type.
Referenced by Attribute(), Attribute(), kernel_type(), operator=(), operator=(), set_data_from(), and take_motion_from().
| Attribute::Attribute | ( | ustring | name, |
| const TypeDesc | type, | ||
| AttributeElement | element, | ||
| const void * | data, | ||
| int | size, | ||
| ImplicitSharingInfo | sharing_info ) |
Definition at line 43 of file attribute.cpp.
References assert, ATTR_ELEMENT_VOXEL, ATTR_STD_NONE, center, Attribute::Buffer::data, data(), element, flags, g_implicit_sharing_user_add_fn, g_implicit_sharing_user_remove_fn, modified, name, Attribute::Buffer::sharing_info, size, std, and type.
| Attribute::Attribute | ( | Attribute && | other | ) |
Definition at line 97 of file attribute.cpp.
References Attribute(), element, modified, name, set_data_from(), std, and type.
|
delete |
References Attribute().
| Attribute::~Attribute | ( | ) |
Definition at line 117 of file attribute.cpp.
References free_data().
| void Attribute::add_motion | ( | const Geometry * | geom | ) |
Definition at line 163 of file attribute.cpp.
References GuardedAllocator< T >::allocate(), attribute_alloc_bytes(), Attribute::Buffer::data, data_sizeof(), element, element_size(), free_step_buffer(), modified, motion, and size.
Referenced by Mesh::add_vertex_normals(), attr_create_motion_from_velocity(), attr_create_motion_from_velocity(), AttributeSet::copy(), export_hair_curves_motion(), export_pointcloud_motion(), ExportCurveSegmentsMotion(), and set().
| size_t Attribute::buffer_size | ( | Geometry * | geom, |
| AttributePrimitive | prim ) const |
Definition at line 435 of file attribute.cpp.
References data_sizeof(), element, and element_size().
Referenced by Mesh::add_undisplaced(), and Mesh::apply_transform().
Definition at line 130 of file scene/attribute.h.
References assert, center, Attribute::Buffer::data, data_sizeof(), has_motion(), motion, step, and T.
Referenced by AttributeTableBuilder::add(), AttributeTableBuilder::add_position_radius(), BVHBuild::add_reference_curves(), BVHBuild::add_reference_points(), BVHBuild::add_reference_triangles(), Mesh::add_undisplaced(), Mesh::add_vertex_normals(), Attribute(), Attribute(), Hair::compute_bounds(), Mesh::compute_bounds(), PointCloud::compute_bounds(), Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), data_at_time_step(), data_voxel(), export_hair_curves_motion(), export_pointcloud_motion(), Geometry::get_position(), Geometry::get_radius(), get_uv_tiles(), mikk_compute_tangents(), Mesh::SubdFace::normal(), recompute_displaced_corner_normals(), recompute_displaced_vertex_normals(), BVH2::refit_primitives(), resize(), save_pre_displacement_normals(), set_motion_step_shared(), SubdAttributeInterpolation::setup_attribute_corner_linear(), SubdAttributeInterpolation::setup_attribute_face(), SubdAttributeInterpolation::setup_attribute_type(), SubdAttributeInterpolation::setup_attribute_vertex_linear(), Mesh::tessellate(), Mesh::update_generated(), and PointCloud::update_gsplat_radii().
|
inline |
Definition at line 163 of file scene/attribute.h.
References data(), step, T, and time_step_to_attr_step().
Referenced by hair_step_buffers(), PointCloud::Point::point_for_step(), and Mesh::Triangle::verts_for_step().
Definition at line 141 of file scene/attribute.h.
References assert, data_sizeof(), step, and T.
Referenced by Mesh::add_undisplaced(), Mesh::add_vertex_normals(), Hair::apply_transform(), Mesh::apply_transform(), PointCloud::apply_transform(), ApplyPrimvars(), attr_create_generic(), attr_create_motion_from_velocity(), attr_create_motion_from_velocity(), Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), PointCloud::copy_center_to_motion_step(), data_voxel_for_write(), GeometryManager::device_update_attributes(), EdgeDice::EdgeDice(), export_hair_curves(), export_hair_curves_motion(), export_hair_motion_validate_attribute(), export_pointcloud(), export_pointcloud_gsplat_attributes(), export_pointcloud_motion(), export_pointcloud_motion_gsplat_attributes(), ExportCurveSegments(), ExportCurveSegmentsMotion(), Geometry::get_position_for_write(), Geometry::get_radius_for_write(), mikk_compute_tangents(), read_shader_output(), recompute_displaced_corner_normals(), recompute_displaced_vertex_normals(), SubdAttributeInterpolation::setup_attribute_corner_linear(), SubdAttributeInterpolation::setup_attribute_face(), SubdAttributeInterpolation::setup_attribute_type(), SubdAttributeInterpolation::setup_attribute_vertex_linear(), sync_attribute_from_blender(), sync_attribute_motion_step_from_blender(), sync_smoke_volume(), sync_volume_object(), Hair::update_shadow_transparency(), and xml_read_mesh().
| size_t Attribute::data_sizeof | ( | ) | const |
Definition at line 325 of file attribute.cpp.
References ATTR_ELEMENT_IS_BYTE, ATTR_ELEMENT_IS_NORMAL, ATTR_ELEMENT_VOXEL, element, float, and type.
Referenced by add_motion(), ApplyPrimvars(), buffer_size(), data(), data_for_write(), free_data(), remove_motion(), resize(), set_data_from(), set_motion_step_shared(), SubdAttributeInterpolation::setup_attribute_type(), and zero_data().
|
inline |
Definition at line 169 of file scene/attribute.h.
References data().
Referenced by AttributeTableBuilder::add(), and GeometryManager::device_update_volume_images().
|
inline |
Definition at line 173 of file scene/attribute.h.
References data_for_write().
Referenced by Object::compute_volume_step_size(), GeometryManager::create_volume_mesh(), sync_smoke_volume(), and sync_volume_object().
|
static |
Definition at line 362 of file attribute.cpp.
References ATTR_ELEMENT_CORNER, ATTR_ELEMENT_CORNER_BYTE, ATTR_ELEMENT_CORNER_NORMAL, ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY, ATTR_ELEMENT_CURVE_KEY_NORMAL, ATTR_ELEMENT_FACE, ATTR_ELEMENT_MESH, ATTR_ELEMENT_OBJECT, ATTR_ELEMENT_VERTEX, ATTR_ELEMENT_VERTEX_NORMAL, ATTR_ELEMENT_VOXEL, ATTR_PRIM_SUBD, element, Mesh::get_num_subd_base_verts(), Mesh::get_num_subd_faces(), Geometry::is_hair(), Geometry::is_mesh(), Geometry::is_pointcloud(), Geometry::is_volume(), Hair::num_curves(), Hair::num_keys(), PointCloud::num_points(), Mesh::num_triangles(), Mesh::num_verts(), and size.
Referenced by AttributeTableBuilder::add(), add_motion(), Attribute(), buffer_size(), free_data(), get_uv_tiles(), remove_motion(), AttributeTableBuilder::reserve(), resize(), resize(), and set_data_from().
| void Attribute::free_data | ( | ) |
Definition at line 107 of file attribute.cpp.
References center, data_sizeof(), element, element_size(), free_step_buffer(), motion, and size.
Referenced by resize(), set_data_from(), and ~Attribute().
| void Attribute::get_uv_tiles | ( | Geometry * | geom, |
| AttributePrimitive | prim, | ||
| unordered_set< int > & | tiles ) const |
Definition at line 634 of file attribute.cpp.
References data(), element, element_size(), tiles, type, float2::x, x, float2::y, and y.
Referenced by Hair::get_uv_tiles(), Mesh::get_uv_tiles(), and PointCloud::get_uv_tiles().
|
inline |
Definition at line 105 of file scene/attribute.h.
References motion.
Referenced by AttributeTableBuilder::add_position_radius(), BVHBuild::add_reference_curves(), BVHBuild::add_reference_points(), BVHBuild::add_reference_triangles(), Mesh::add_vertex_normals(), Hair::apply_transform(), Mesh::apply_transform(), PointCloud::apply_transform(), Hair::compute_bounds(), Mesh::compute_bounds(), PointCloud::compute_bounds(), AttributeSet::copy(), Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), PointCloud::copy_center_to_motion_step(), data(), ObjectManager::device_update_object_transform(), export_hair_curves_motion(), export_pointcloud_motion(), ExportCurveSegmentsMotion(), Geometry::has_motion_blur(), Mesh::has_motion_blur(), num_motion_steps(), read_shader_output(), recompute_displaced_corner_normals(), recompute_displaced_vertex_normals(), BVH2::refit_primitives(), remove_motion(), AttributeTableBuilder::reserve_position_radius(), save_pre_displacement_normals(), SubdAttributeInterpolation::setup_attribute_corner_linear(), SubdAttributeInterpolation::setup_attribute_type(), SubdAttributeInterpolation::setup_attribute_vertex_linear(), SubdAttributeInterpolation::support_interp_attribute(), and PointCloud::update_gsplat_radii().
|
static |
Definition at line 601 of file attribute.cpp.
References ATTR_ELEMENT_IS_BYTE, ATTR_ELEMENT_IS_NORMAL, Attribute(), element, FLOAT, FLOAT2, FLOAT3, FLOAT4, NORMAL, QUATERNION, SPHERICAL_HARMONICS_REST, type, and UCHAR4.
Referenced by GeometryManager::device_update_attributes(), and update_device_flags_attribute().
| bool Attribute::matches_standard | ( | const Geometry * | geometry, |
| AttributeStandard | std ) const |
Definition at line 957 of file attribute.cpp.
References element, standard_type_element(), std, and type.
Referenced by AttributeSet::find().
|
static |
Definition at line 554 of file attribute.cpp.
References ATTR_STD_NONE, ATTR_STD_NUM, name, standard_name(), and std.
Referenced by AttributeRequestSet::add_name_or_standard(), SVMCompiler::attribute_standard(), and osl_name().
|
static |
Definition at line 567 of file attribute.cpp.
References ATTR_STD_NONE, ATTR_STD_VOLUME_COLOR, ATTR_STD_VOLUME_DENSITY, ATTR_STD_VOLUME_FLAME, ATTR_STD_VOLUME_HEAT, ATTR_STD_VOLUME_TEMPERATURE, ATTR_STD_VOLUME_VELOCITY, ATTR_STD_VOLUME_VELOCITY_X, ATTR_STD_VOLUME_VELOCITY_Y, ATTR_STD_VOLUME_VELOCITY_Z, name, standard_name(), and std.
Referenced by sync_volume_object().
|
inline |
Definition at line 110 of file scene/attribute.h.
References has_motion(), and motion.
Referenced by BVHBuild::add_reference_curves(), BVHBuild::add_reference_points(), BVHBuild::add_reference_triangles(), Mesh::add_vertex_normals(), Hair::compute_bounds(), Mesh::compute_bounds(), PointCloud::compute_bounds(), hair_step_buffers(), PointCloud::Point::point_for_step(), BVH2::refit_primitives(), AttributeTableBuilder::reserve(), and Mesh::Triangle::verts_for_step().
References Attribute().
References Attribute().
|
static |
Definition at line 590 of file attribute.cpp.
References standard_name(), and std.
Referenced by osl_name().
|
static |
Definition at line 595 of file attribute.cpp.
References ATTR_STD_NONE, name, name_standard(), osl_name(), and std.
| void Attribute::remove_motion | ( | ) |
Definition at line 197 of file attribute.cpp.
References data_sizeof(), element, element_size(), free_step_buffer(), has_motion(), modified, motion, and size.
Referenced by export_hair_motion_validate_attribute(), export_pointcloud_motion(), set(), and take_motion_from().
| void Attribute::resize | ( | const size_t | num_elements | ) |
Definition at line 129 of file attribute.cpp.
References GuardedAllocator< T >::allocate(), ATTR_ELEMENT_VOXEL, attribute_alloc_bytes(), center, Attribute::Buffer::data, data(), data_sizeof(), element, element_size(), free_data(), motion, and size.
| void Attribute::resize | ( | Geometry * | geom, |
| AttributePrimitive | prim ) |
Definition at line 122 of file attribute.cpp.
References ATTR_ELEMENT_VOXEL, element, element_size(), and resize().
Referenced by Attribute(), resize(), PointCloud::resize(), Hair::resize_curves(), Mesh::resize_mesh(), set(), and xml_read_mesh().
|
static |
Definition at line 441 of file attribute.cpp.
References b.
Referenced by SubdAttributeInterpolation::setup_attribute().
| void Attribute::set | ( | ustring | name, |
| const TypeDesc | type, | ||
| AttributeElement | element ) |
References add_motion(), element, name, remove_motion(), resize(), and type.
| void Attribute::set_data_from | ( | Attribute && | other | ) |
Definition at line 271 of file attribute.cpp.
References assert, Attribute(), b, center, Attribute::Buffer::data, data_sizeof(), element, element_size(), flags, free_data(), free_step_buffer(), modified, motion, Attribute::Buffer::sharing_info, size, std, and type.
Referenced by AttributeSet::add_from(), and Attribute().
| void Attribute::set_motion_step_shared | ( | int | step, |
| const void * | data, | ||
| int | new_size, | ||
| ImplicitSharingInfo | sharing_info ) |
Definition at line 210 of file attribute.cpp.
References assert, Attribute::Buffer::data, data(), data_sizeof(), element, free_step_buffer(), g_implicit_sharing_user_add_fn, modified, motion, Attribute::Buffer::sharing_info, size, and step.
Referenced by sync_attribute_motion_step_from_blender().
|
static |
Definition at line 465 of file attribute.cpp.
References ATTR_STD_CORNER_NORMAL, ATTR_STD_CURVE_INTERCEPT, ATTR_STD_CURVE_LENGTH, ATTR_STD_CURVE_RANDOM, ATTR_STD_GENERATED, ATTR_STD_GENERATED_TRANSFORM, ATTR_STD_GSPLAT_RADIANCE, ATTR_STD_GSPLAT_RADIANCE_BASE, ATTR_STD_GSPLAT_RADIANCE_SPHERICAL_HARMONICS_REST, ATTR_STD_GSPLAT_ROTATION, ATTR_STD_GSPLAT_SCALE, ATTR_STD_NONE, ATTR_STD_NORMAL_UNDISPLACED, ATTR_STD_NOT_FOUND, ATTR_STD_NUM, ATTR_STD_PARTICLE, ATTR_STD_POINT_RANDOM, ATTR_STD_POINTINESS, ATTR_STD_POSITION, ATTR_STD_POSITION_UNDEFORMED, ATTR_STD_POSITION_UNDISPLACED, ATTR_STD_PTEX_FACE_ID, ATTR_STD_PTEX_UV, ATTR_STD_RADIUS, ATTR_STD_RANDOM_PER_ISLAND, ATTR_STD_SHADOW_TRANSPARENCY, ATTR_STD_UV, ATTR_STD_UV_TANGENT, ATTR_STD_UV_TANGENT_SIGN, ATTR_STD_UV_TANGENT_SIGN_UNDISPLACED, ATTR_STD_UV_TANGENT_UNDISPLACED, ATTR_STD_VERTEX_COLOR, ATTR_STD_VERTEX_NORMAL, ATTR_STD_VOLUME_COLOR, ATTR_STD_VOLUME_DENSITY, ATTR_STD_VOLUME_FLAME, ATTR_STD_VOLUME_HEAT, ATTR_STD_VOLUME_TEMPERATURE, ATTR_STD_VOLUME_VELOCITY, ATTR_STD_VOLUME_VELOCITY_X, ATTR_STD_VOLUME_VELOCITY_Y, ATTR_STD_VOLUME_VELOCITY_Z, and std.
Referenced by AttributeSet::add(), AttributeSet::add_shared(), Mesh::add_undisplaced(), VertexColorNode::expand(), AttributeSet::find(), BlenderSmokeLoader::get_voxels(), mikk_compute_tangents(), BlenderSmokeLoader::name(), name_standard(), name_volume_standard(), osl_name(), and xml_read_mesh().
| void Attribute::take_motion_from | ( | Attribute & | other | ) |
Definition at line 230 of file attribute.cpp.
References assert, Attribute(), element, modified, motion, remove_motion(), size, and type.
|
inline |
Definition at line 157 of file scene/attribute.h.
Referenced by data_at_time_step().
| void Attribute::zero_data | ( | void * | dst | ) |
Definition at line 455 of file attribute.cpp.
References data_sizeof(), spherical_harmonics_rest_fill_zero(), and type.
| Buffer Attribute::center |
Definition at line 72 of file scene/attribute.h.
Referenced by Attribute(), Attribute(), data(), free_data(), resize(), set_data_from(), and time_step_to_attr_step().
| AttributeElement Attribute::element |
Definition at line 76 of file scene/attribute.h.
Referenced by AttributeSet::add(), AttributeTableBuilder::add(), AttributeSet::add_from(), add_motion(), AttributeTableBuilder::add_position_radius(), Mesh::add_undisplaced(), Attribute(), Attribute(), Attribute(), buffer_size(), Object::compute_volume_step_size(), AttributeSet::copy(), GeometryManager::create_volume_mesh(), data_sizeof(), ObjectManager::device_update_flags(), GeometryManager::device_update_volume_images(), element_size(), AttributeSet::find_matching(), free_data(), get_uv_tiles(), Geometry::has_voxel_attributes(), VolumeManager::is_homogeneous_volume(), kernel_type(), matches_standard(), remove_motion(), AttributeTableBuilder::reserve(), resize(), resize(), set(), set_data_from(), set_motion_step_shared(), SubdAttributeInterpolation::setup_attribute(), SubdAttributeInterpolation::setup_attribute_type(), SubdAttributeInterpolation::support_interp_attribute(), take_motion_from(), and Mesh::update_tangents().
| uint Attribute::flags |
Definition at line 77 of file scene/attribute.h.
Referenced by Attribute(), Attribute(), and set_data_from().
| bool Attribute::modified |
Definition at line 79 of file scene/attribute.h.
Referenced by AttributeTableBuilder::add(), add_motion(), AttributeTableBuilder::add_position_radius(), Attribute(), Attribute(), Attribute(), GeometryManager::device_update_attributes(), GeometryManager::device_update_preprocess(), Geometry::get_position_for_write(), Geometry::get_radius_for_write(), Geometry::position_is_modified(), Geometry::radius_is_modified(), remove_motion(), set_data_from(), set_motion_step_shared(), Geometry::tag_position_modified(), Geometry::tag_radius_modified(), take_motion_from(), AttributeSet::update(), and update_device_flags_attribute().
Definition at line 74 of file scene/attribute.h.
Referenced by AttributeTableBuilder::add(), add_motion(), Hair::apply_transform(), Mesh::apply_transform(), PointCloud::apply_transform(), data(), free_data(), has_motion(), num_motion_steps(), remove_motion(), resize(), set_data_from(), set_motion_step_shared(), SubdAttributeInterpolation::setup_attribute_type(), and take_motion_from().
| ustring Attribute::name |
Definition at line 67 of file scene/attribute.h.
Referenced by Attribute(), Attribute(), Attribute(), AttributeSet::copy(), AttributeSet::find_matching(), mikk_compute_tangents(), name_standard(), name_volume_standard(), osl_name(), set(), and Mesh::update_tangents().
| int Attribute::size = 0 |
Definition at line 75 of file scene/attribute.h.
Referenced by add_motion(), AttributeTableBuilder::add_position_radius(), ApplyPrimvars(), Attribute(), Attribute(), Mesh::copy_center_to_motion_step(), GeometryManager::device_update_attributes(), element_size(), free_data(), Hair::num_keys(), PointCloud::num_points(), Mesh::num_verts(), remove_motion(), AttributeTableBuilder::reserve_position_radius(), resize(), set_data_from(), set_motion_step_shared(), SubdAttributeInterpolation::setup_attribute_type(), take_motion_from(), and Mesh::update_generated().
| AttributeStandard Attribute::std |
Definition at line 68 of file scene/attribute.h.
Referenced by AttributeSet::add(), AttributeTableBuilder::add(), AttributeSet::add_from(), AttributeSet::add_shared(), Mesh::add_undisplaced(), ApplyPrimvars(), Attribute(), Attribute(), Attribute(), AttributeSet::copy(), GeometryManager::create_volume_mesh(), GeometryManager::device_update_attributes(), AttributeSet::find_matching(), matches_standard(), mikk_compute_tangents(), name_standard(), name_volume_standard(), osl_name(), osl_name(), AttributeTableBuilder::reserve(), set_data_from(), SubdAttributeInterpolation::setup_attribute_type(), standard_name(), SubdAttributeInterpolation::support_interp_attribute(), and AttributeSet::update().
| TypeDesc Attribute::type |
Definition at line 70 of file scene/attribute.h.
Referenced by AttributeSet::add(), AttributeTableBuilder::add(), AttributeSet::add_from(), Attribute(), Attribute(), Attribute(), AttributeSet::copy(), data_sizeof(), AttributeSet::find_matching(), get_uv_tiles(), kernel_type(), matches_standard(), AttributeTableBuilder::reserve(), set(), set_data_from(), SubdAttributeInterpolation::setup_attribute(), take_motion_from(), Mesh::update_tangents(), and zero_data().