|
Blender V4.3
|
#include <attribute.h>
Public Member Functions | |
| Attribute (ustring name, TypeDesc type, AttributeElement element, Geometry *geom, AttributePrimitive prim) | |
| Attribute (Attribute &&other)=default | |
| Attribute (const Attribute &other)=delete | |
| Attribute & | operator= (const Attribute &other)=delete |
| ~Attribute () | |
| void | set (ustring name, TypeDesc type, AttributeElement element) |
| void | resize (Geometry *geom, AttributePrimitive prim, bool reserve_only) |
| void | resize (size_t num_elements) |
| size_t | data_sizeof () const |
| size_t | element_size (Geometry *geom, AttributePrimitive prim) const |
| size_t | buffer_size (Geometry *geom, AttributePrimitive prim) const |
| char * | data () |
| float2 * | data_float2 () |
| float3 * | data_float3 () |
| float4 * | data_float4 () |
| float * | data_float () |
| uchar4 * | data_uchar4 () |
| Transform * | data_transform () |
| ImageHandle & | data_voxel () |
| const char * | data () const |
| const float2 * | data_float2 () const |
| const float3 * | data_float3 () const |
| const float4 * | data_float4 () const |
| const float * | data_float () const |
| const Transform * | data_transform () const |
| const ImageHandle & | data_voxel () const |
| void | zero_data (void *dst) |
| void | add_with_weight (void *dst, void *src, float weight) |
| void | add (const float &f) |
| void | add (const float2 &f) |
| void | add (const float3 &f) |
| void | add (const uchar4 &f) |
| void | add (const Transform &tfm) |
| void | add (const char *data) |
| void | set_data_from (Attribute &&other) |
| void | get_uv_tiles (Geometry *geom, AttributePrimitive prim, unordered_set< int > &tiles) const |
Static Public Member Functions | |
| static bool | same_storage (TypeDesc a, TypeDesc b) |
| static const char * | standard_name (AttributeStandard std) |
| static AttributeStandard | name_standard (const char *name) |
| static AttrKernelDataType | kernel_type (const Attribute &attr) |
Public Attributes | |
| ustring | name |
| AttributeStandard | std |
| TypeDesc | type |
| vector< char > | buffer |
| AttributeElement | element |
| uint | flags |
| bool | modified |
Definition at line 45 of file scene/attribute.h.
| CCL_NAMESPACE_BEGIN Attribute::Attribute | ( | ustring | name, |
| TypeDesc | type, | ||
| AttributeElement | element, | ||
| Geometry * | geom, | ||
| AttributePrimitive | prim ) |
Definition at line 19 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, resize(), TypeFloat2(), and TypeRGBA().
|
default |
|
delete |
| Attribute::~Attribute | ( | ) |
Definition at line 38 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, and data_voxel().
| void Attribute::add | ( | const char * | data | ) |
Definition at line 136 of file scene/attribute.cpp.
References buffer, data_sizeof(), modified, and size().
| void Attribute::add | ( | const float & | f | ) |
Definition at line 66 of file scene/attribute.cpp.
References buffer, data_sizeof(), modified, and size().
Referenced by Mesh::add_face_normals(), Mesh::add_vertex_normals(), ApplyPrimvars(), attr_create_generic(), attr_create_generic(), attr_create_motion_from_velocity(), attr_create_motion_from_velocity(), attr_create_pointiness(), attr_create_random_per_island(), attr_create_subd_uv_map(), attr_create_uv_map(), create_mesh(), GeometryManager::create_volume_mesh(), GeometryManager::device_update_attributes(), export_hair_curves_motion(), ExportCurveSegments(), ExportCurveSegmentsMotion(), mikk_compute_tangents(), EdgeDice::reserve(), sync_smoke_volume(), sync_volume_object(), Hair::update_shadow_transparency(), and xml_read_mesh().
| void Attribute::add | ( | const float2 & | f | ) |
Definition at line 94 of file scene/attribute.cpp.
References buffer, data_sizeof(), modified, and size().
| void Attribute::add | ( | const float3 & | f | ) |
Definition at line 108 of file scene/attribute.cpp.
References buffer, data_sizeof(), modified, and size().
| void Attribute::add | ( | const Transform & | tfm | ) |
Definition at line 122 of file scene/attribute.cpp.
References buffer, data_sizeof(), modified, and size().
| void Attribute::add | ( | const uchar4 & | f | ) |
Definition at line 80 of file scene/attribute.cpp.
References buffer, data_sizeof(), modified, and size().
| void Attribute::add_with_weight | ( | void * | dst, |
| void * | src, | ||
| float | weight ) |
Definition at line 313 of file scene/attribute.cpp.
References ATTR_ELEMENT_CORNER_BYTE, same_storage(), and TypeFloat2().
Referenced by Mesh::tessellate().
| size_t Attribute::buffer_size | ( | Geometry * | geom, |
| AttributePrimitive | prim ) const |
Definition at line 285 of file scene/attribute.cpp.
References data_sizeof(), and element_size().
Referenced by Mesh::add_undisplaced(), and resize().
|
inline |
Definition at line 75 of file scene/attribute.h.
Referenced by ApplyPrimvars(), data_float(), data_float(), data_float2(), data_float2(), data_float3(), data_float3(), data_float4(), data_float4(), data_transform(), data_transform(), data_uchar4(), data_voxel(), data_voxel(), set_data_from(), and Mesh::tessellate().
|
inline |
Definition at line 117 of file scene/attribute.h.
|
inline |
Definition at line 94 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_pointiness(), export_pointcloud(), mikk_compute_tangents(), Hair::update_shadow_transparency(), and xml_read_mesh().
|
inline |
Definition at line 136 of file scene/attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 79 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_generic(), attr_create_subd_uv_map(), attr_create_uv_map(), get_uv_tiles(), MikkMeshWrapper< is_subd >::MikkMeshWrapper(), and xml_read_mesh().
|
inline |
Definition at line 121 of file scene/attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 84 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by Mesh::add_face_normals(), BVHBuild::add_reference_triangles(), Mesh::add_undisplaced(), Mesh::add_vertex_normals(), Mesh::apply_transform(), attr_create_motion_from_velocity(), attr_create_motion_from_velocity(), Mesh::compute_bounds(), Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), create_mesh(), GeometryManager::create_volume_mesh(), GeometryManager::displace(), mikk_compute_tangents(), MikkMeshWrapper< is_subd >::MikkMeshWrapper(), Mesh::pack_normals(), read_shader_output(), BVH2::refit_primitives(), EdgeDice::reserve(), Mesh::tessellate(), and xml_read_mesh().
|
inline |
Definition at line 126 of file scene/attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 89 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by BVHBuild::add_reference_curves(), BVHBuild::add_reference_points(), Hair::apply_transform(), PointCloud::apply_transform(), attr_create_motion_from_velocity(), Hair::compute_bounds(), PointCloud::compute_bounds(), PointCloud::copy_center_to_motion_step(), export_hair_curves_motion(), export_hair_motion_validate_attribute(), export_pointcloud_motion(), and ExportCurveSegmentsMotion().
|
inline |
Definition at line 131 of file scene/attribute.h.
References data(), and data_sizeof().
| size_t Attribute::data_sizeof | ( | ) | const |
Definition at line 165 of file scene/attribute.cpp.
References ATTR_ELEMENT_CORNER_BYTE, ATTR_ELEMENT_VOXEL, float, TypeFloat2(), and TypeRGBA().
Referenced by add(), add(), add(), add(), add(), add(), Mesh::add_undisplaced(), buffer_size(), data_float(), data_float(), data_float2(), data_float2(), data_float3(), data_float3(), data_float4(), data_float4(), data_transform(), data_transform(), data_uchar4(), data_voxel(), data_voxel(), element_size(), resize(), Mesh::tessellate(), and zero_data().
|
inline |
Definition at line 104 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by create_mesh().
|
inline |
Definition at line 141 of file scene/attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 99 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_generic().
|
inline |
Definition at line 111 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by Object::compute_volume_step_size(), GeometryManager::create_volume_mesh(), GeometryManager::device_update_volume_images(), sync_smoke_volume(), sync_volume_object(), and ~Attribute().
|
inline |
Definition at line 146 of file scene/attribute.h.
References data(), and data_sizeof().
| size_t Attribute::element_size | ( | Geometry * | geom, |
| AttributePrimitive | prim ) const |
Definition at line 195 of file scene/attribute.cpp.
References ATTR_ELEMENT_CORNER, ATTR_ELEMENT_CORNER_BYTE, ATTR_ELEMENT_CURVE, ATTR_ELEMENT_CURVE_KEY, ATTR_ELEMENT_CURVE_KEY_MOTION, ATTR_ELEMENT_FACE, ATTR_ELEMENT_MESH, ATTR_ELEMENT_OBJECT, ATTR_ELEMENT_VERTEX, ATTR_ELEMENT_VERTEX_MOTION, ATTR_ELEMENT_VOXEL, ATTR_FINAL_SIZE, ATTR_PRIM_GEOMETRY, ATTR_PRIM_SUBD, buffer, data_sizeof(), DCHECK_GT, flags, Geometry::geometry_type, Mesh::get_num_subd_verts(), Geometry::HAIR, Geometry::MESH, Hair::num_curves(), PointCloud::num_points(), Mesh::num_triangles(), Geometry::POINTCLOUD, size(), and Geometry::VOLUME.
Referenced by buffer_size(), get_uv_tiles(), and update_attribute_element_size().
| void Attribute::get_uv_tiles | ( | Geometry * | geom, |
| AttributePrimitive | prim, | ||
| unordered_set< int > & | tiles ) const |
Definition at line 443 of file scene/attribute.cpp.
References data_float2(), element_size(), int, tiles, TypeFloat2(), v, float2::x, float2::y, and y.
Referenced by Hair::get_uv_tiles(), Mesh::get_uv_tiles(), and PointCloud::get_uv_tiles().
|
static |
Definition at line 422 of file scene/attribute.cpp.
References ATTR_ELEMENT_CORNER, element, FLOAT, FLOAT2, FLOAT3, FLOAT4, type, TypeFloat2(), TypeRGBA(), and UCHAR4.
Referenced by GeometryManager::device_update_attributes(), and update_device_flags_attribute().
|
static |
Definition at line 409 of file scene/attribute.cpp.
References ATTR_STD_NONE, ATTR_STD_NUM, standard_name(), and std.
Referenced by AttributeRequestSet::add_standard(), and SVMCompiler::attribute_standard().
| void Attribute::resize | ( | Geometry * | geom, |
| AttributePrimitive | prim, | ||
| bool | reserve_only ) |
Definition at line 47 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, and buffer_size().
Referenced by Attribute(), and AttributeSet::resize().
| void Attribute::resize | ( | size_t | num_elements | ) |
Definition at line 59 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, and data_sizeof().
| void Attribute::set | ( | ustring | name, |
| TypeDesc | type, | ||
| AttributeElement | element ) |
| void Attribute::set_data_from | ( | Attribute && | other | ) |
Definition at line 147 of file scene/attribute.cpp.
References buffer, data(), flags, modified, and std.
Referenced by AttributeSet::update().
|
static |
Definition at line 335 of file scene/attribute.cpp.
References ATTR_STD_CURVE_INTERCEPT, ATTR_STD_CURVE_LENGTH, ATTR_STD_CURVE_RANDOM, ATTR_STD_FACE_NORMAL, ATTR_STD_GENERATED, ATTR_STD_GENERATED_TRANSFORM, ATTR_STD_MOTION_VERTEX_NORMAL, ATTR_STD_MOTION_VERTEX_POSITION, ATTR_STD_NONE, ATTR_STD_NOT_FOUND, ATTR_STD_NUM, ATTR_STD_PARTICLE, ATTR_STD_POINT_RANDOM, ATTR_STD_POINTINESS, ATTR_STD_POSITION_UNDEFORMED, ATTR_STD_POSITION_UNDISPLACED, ATTR_STD_PTEX_FACE_ID, ATTR_STD_PTEX_UV, ATTR_STD_RANDOM_PER_ISLAND, ATTR_STD_SHADOW_TRANSPARENCY, ATTR_STD_UV, ATTR_STD_UV_TANGENT, ATTR_STD_UV_TANGENT_SIGN, 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(), BlenderSmokeLoader::load_pixels(), BlenderSmokeLoader::name(), name_standard(), sync_volume_object(), and xml_read_mesh().
| void Attribute::zero_data | ( | void * | dst | ) |
Definition at line 308 of file scene/attribute.cpp.
References data_sizeof().
Referenced by Mesh::tessellate().
| vector<char> Attribute::buffer |
Definition at line 51 of file scene/attribute.h.
Referenced by add(), add(), add(), add(), add(), add(), ApplyPrimvars(), Attribute(), data(), data(), GeometryManager::device_update_attributes(), element_size(), resize(), resize(), set_data_from(), and ~Attribute().
| AttributeElement Attribute::element |
Definition at line 52 of file scene/attribute.h.
Referenced by AttributeSet::add(), Object::compute_volume_step_size(), GeometryManager::create_volume_mesh(), GeometryManager::device_update_volume_images(), Geometry::has_voxel_attributes(), kernel_type(), Mesh::tessellate(), AttributeSet::update(), and update_attribute_element_size().
| uint Attribute::flags |
Definition at line 53 of file scene/attribute.h.
Referenced by Mesh::add_undisplaced(), attr_create_subd_uv_map(), create_mesh(), element_size(), set_data_from(), Mesh::tessellate(), and xml_read_mesh().
| bool Attribute::modified |
Definition at line 55 of file scene/attribute.h.
Referenced by add(), add(), add(), add(), add(), add(), AttributeSet::clear_modified(), GeometryManager::device_update_attributes(), set_data_from(), and update_device_flags_attribute().
| ustring Attribute::name |
Definition at line 47 of file scene/attribute.h.
Referenced by AttributeSet::find(), and AttributeSet::update().
| AttributeStandard Attribute::std |
Definition at line 48 of file scene/attribute.h.
Referenced by AttributeSet::add(), ApplyPrimvars(), attr_create_generic(), GeometryManager::create_volume_mesh(), AttributeSet::find(), name_standard(), set_data_from(), standard_name(), and AttributeSet::update().
| TypeDesc Attribute::type |
Definition at line 50 of file scene/attribute.h.
Referenced by AttributeSet::add(), kernel_type(), AttributeSet::update(), and update_attribute_element_size().