|
Blender
V2.93
|
#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) |
Public Attributes | |
| ustring | name |
| AttributeStandard | std |
| TypeDesc | type |
| vector< char > | buffer |
| AttributeElement | element |
| uint | flags |
| bool | modified |
Definition at line 47 of file attribute.h.
| CCL_NAMESPACE_BEGIN Attribute::Attribute | ( | ustring | name, |
| TypeDesc | type, | ||
| AttributeElement | element, | ||
| Geometry * | geom, | ||
| AttributePrimitive | prim | ||
| ) |
Definition at line 29 of file attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, element, resize(), type, TypeFloat2(), and TypeRGBA().
|
default |
|
delete |
| Attribute::~Attribute | ( | ) |
Definition at line 48 of file attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, data_voxel(), element, and ImageHandle::~ImageHandle().
| void Attribute::add | ( | const char * | data | ) |
Definition at line 141 of file attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
| void Attribute::add | ( | const float & | f | ) |
Definition at line 76 of file attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
Referenced by Mesh::add_vertex_normals(), and ExportCurveSegments().
| void Attribute::add | ( | const float2 & | f | ) |
Definition at line 102 of file attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
| void Attribute::add | ( | const float3 & | f | ) |
Definition at line 115 of file attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
| void Attribute::add | ( | const Transform & | tfm | ) |
Definition at line 128 of file attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
| void Attribute::add | ( | const uchar4 & | f | ) |
Definition at line 89 of file attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
| void Attribute::add_with_weight | ( | void * | dst, |
| void * | src, | ||
| float | weight | ||
| ) |
Definition at line 290 of file attribute.cpp.
References ATTR_ELEMENT_CORNER_BYTE, element, same_storage(), type, and TypeFloat2().
Referenced by Mesh::tessellate().
| size_t Attribute::buffer_size | ( | Geometry * | geom, |
| AttributePrimitive | prim | ||
| ) | const |
Definition at line 265 of file attribute.cpp.
References data_sizeof(), and element_size().
Referenced by Mesh::add_undisplaced(), and resize().
|
inline |
Definition at line 77 of file attribute.h.
Referenced by add(), data_float(), data_float2(), data_float3(), data_float4(), data_transform(), data_uchar4(), data_voxel(), set_data_from(), and Mesh::tessellate().
|
inline |
Definition at line 119 of file attribute.h.
|
inline |
Definition at line 96 of file attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_generic(), and mikk_compute_tangents().
|
inline |
Definition at line 138 of file attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 81 of file attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_generic(), attr_create_subd_uv_map(), attr_create_uv_map(), get_uv_tiles(), MikkUserData::MikkUserData(), and xml_read_mesh().
|
inline |
Definition at line 123 of file attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 86 of file attribute.h.
References data(), and data_sizeof().
Referenced by Mesh::add_face_normals(), BVHBuild::add_reference_curves(), BVHBuild::add_reference_triangles(), Mesh::add_undisplaced(), Mesh::add_vertex_normals(), Mesh::apply_transform(), attr_create_generic(), Hair::compute_bounds(), Mesh::compute_bounds(), Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), create_mesh(), GeometryManager::create_volume_mesh(), GeometryManager::displace(), MikkUserData::MikkUserData(), Mesh::pack_normals(), BVH2::refit_primitives(), EdgeDice::reserve(), sync_mesh_cached_velocities(), sync_mesh_fluid_motion(), Mesh::tessellate(), and xml_read_mesh().
|
inline |
Definition at line 128 of file attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 91 of file attribute.h.
References data(), and data_sizeof().
Referenced by Hair::apply_transform(), attr_create_generic(), export_hair_motion_validate_attribute(), and ExportCurveSegmentsMotion().
|
inline |
Definition at line 133 of file attribute.h.
References data(), and data_sizeof().
| size_t Attribute::data_sizeof | ( | ) | const |
Definition at line 169 of file attribute.cpp.
References ATTR_ELEMENT_CORNER_BYTE, ATTR_ELEMENT_VOXEL, element, float(), type, and TypeFloat2().
Referenced by add(), Mesh::add_undisplaced(), buffer_size(), data_float(), data_float2(), data_float3(), data_float4(), data_transform(), data_uchar4(), data_voxel(), element_size(), resize(), Mesh::tessellate(), and zero_data().
|
inline |
Definition at line 106 of file attribute.h.
References data(), and data_sizeof().
Referenced by create_mesh().
|
inline |
Definition at line 143 of file attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 101 of file attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_vertex_color().
|
inline |
Definition at line 113 of file 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 148 of file attribute.h.
References data(), and data_sizeof().
| size_t Attribute::element_size | ( | Geometry * | geom, |
| AttributePrimitive | prim | ||
| ) | const |
Definition at line 185 of file 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(), element, flags, Geometry::geometry_type, Mesh::get_num_subd_faces(), Mesh::get_num_subd_verts(), Geometry::HAIR, Geometry::MESH, mesh, Hair::num_curves(), Mesh::num_triangles(), size(), Mesh::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 386 of file attribute.cpp.
References data_float2(), element_size(), type, TypeFloat2(), v, float2::x, x, float2::y, and y.
Referenced by Hair::get_uv_tiles(), and Mesh::get_uv_tiles().
|
static |
Definition at line 373 of file attribute.cpp.
References ATTR_STD_NONE, ATTR_STD_NUM, name, 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 57 of file attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, buffer_size(), and element.
Referenced by Attribute(), and AttributeSet::resize().
| void Attribute::resize | ( | size_t | num_elements | ) |
Definition at line 69 of file attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, data_sizeof(), and element.
|
static |
Definition at line 270 of file attribute.cpp.
References Freestyle::a.
Referenced by add_with_weight().
| void Attribute::set | ( | ustring | name, |
| TypeDesc | type, | ||
| AttributeElement | element | ||
| ) |
| void Attribute::set_data_from | ( | Attribute && | other | ) |
Definition at line 151 of file attribute.cpp.
References buffer, data(), element, flags, modified, and type.
Referenced by AttributeSet::update().
|
static |
Definition at line 311 of file attribute.cpp.
References ATTR_STD_CURVE_INTERCEPT, 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_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_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, and ATTR_STD_VOLUME_VELOCITY.
Referenced by AttributeSet::add(), BlenderSmokeLoader::load_pixels(), BlenderSmokeLoader::name(), name_standard(), sync_volume_object(), and GeometryManager::update_osl_attributes().
| void Attribute::zero_data | ( | void * | dst | ) |
Definition at line 285 of file attribute.cpp.
References data_sizeof().
Referenced by Mesh::tessellate().
| vector<char> Attribute::buffer |
Definition at line 53 of file attribute.h.
Referenced by add(), Attribute(), data(), GeometryManager::device_update_attributes(), element_size(), resize(), set_data_from(), and ~Attribute().
| AttributeElement Attribute::element |
Definition at line 54 of file attribute.h.
Referenced by AttributeSet::add(), add_with_weight(), Attribute(), Object::compute_volume_step_size(), GeometryManager::create_volume_mesh(), data_sizeof(), GeometryManager::device_update_volume_images(), element_size(), Geometry::has_voxel_attributes(), resize(), set_data_from(), Mesh::tessellate(), AttributeSet::update(), update_attribute_element_size(), update_device_flags_attribute(), and ~Attribute().
| uint Attribute::flags |
Definition at line 55 of file 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 57 of file attribute.h.
Referenced by add(), AttributeSet::clear_modified(), GeometryManager::device_update_attributes(), set_data_from(), and update_device_flags_attribute().
| ustring Attribute::name |
Definition at line 49 of file attribute.h.
Referenced by AttributeSet::find(), name_standard(), AttributeSet::remove(), and AttributeSet::update().
| AttributeStandard Attribute::std |
Definition at line 50 of file attribute.h.
Referenced by AttributeSet::add(), attr_create_sculpt_vertex_color(), AttributeSet::find(), name_standard(), AttributeSet::remove(), and AttributeSet::update().
| TypeDesc Attribute::type |
Definition at line 52 of file attribute.h.
Referenced by AttributeSet::add(), add_with_weight(), Attribute(), data_sizeof(), get_uv_tiles(), set_data_from(), AttributeSet::update(), update_attribute_element_size(), and update_device_flags_attribute().