Blender
V3.3
|
#include <attribute.h>
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 44 of file scene/attribute.h.
CCL_NAMESPACE_BEGIN Attribute::Attribute | ( | ustring | name, |
TypeDesc | type, | ||
AttributeElement | element, | ||
Geometry * | geom, | ||
AttributePrimitive | prim | ||
) |
Definition at line 18 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, element, resize(), type, TypeFloat2(), and TypeRGBA().
|
default |
|
delete |
Attribute::~Attribute | ( | ) |
Definition at line 37 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, data_voxel(), element, and ImageHandle::~ImageHandle().
void Attribute::add | ( | const char * | data | ) |
Definition at line 130 of file scene/attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
Definition at line 65 of file scene/attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
Referenced by Mesh::add_vertex_normals(), export_pointcloud(), and ExportCurveSegments().
Definition at line 91 of file scene/attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
Definition at line 104 of file scene/attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
Definition at line 117 of file scene/attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
Definition at line 78 of file scene/attribute.cpp.
References buffer, data(), data_sizeof(), modified, and size().
Definition at line 289 of file scene/attribute.cpp.
References ATTR_ELEMENT_CORNER_BYTE, element, same_storage(), src, type, and TypeFloat2().
Referenced by Mesh::tessellate().
size_t Attribute::buffer_size | ( | Geometry * | geom, |
AttributePrimitive | prim | ||
) | const |
Definition at line 264 of file scene/attribute.cpp.
References data_sizeof(), and element_size().
Referenced by Mesh::add_undisplaced(), and resize().
|
inline |
Definition at line 74 of file scene/attribute.h.
Referenced by add(), ApplyPrimvars(), data_float(), data_float2(), data_float3(), data_float4(), data_transform(), data_uchar4(), data_voxel(), set_data_from(), and Mesh::tessellate().
|
inline |
Definition at line 116 of file scene/attribute.h.
|
inline |
Definition at line 93 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_generic(), copy_attributes(), export_hair_curves(), mikk_compute_tangents(), and Hair::update_shadow_transparency().
|
inline |
Definition at line 135 of file scene/attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 78 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_generic(), attr_create_subd_uv_map(), attr_create_uv(), attr_create_uv_map(), copy_attributes(), get_uv_tiles(), MikkUserData::MikkUserData(), and xml_read_mesh().
|
inline |
Definition at line 120 of file scene/attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 83 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by Mesh::add_face_normals(), BVHBuild::add_reference_curves(), BVHBuild::add_reference_points(), BVHBuild::add_reference_triangles(), Mesh::add_undisplaced(), Mesh::add_vertex_normals(), Mesh::apply_transform(), attr_create_generic(), attr_create_motion(), Hair::compute_bounds(), Mesh::compute_bounds(), PointCloud::compute_bounds(), copy_attributes(), Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), PointCloud::copy_center_to_motion_step(), create_mesh(), GeometryManager::create_volume_mesh(), GeometryManager::displace(), export_pointcloud_motion(), MikkUserData::MikkUserData(), Mesh::pack_normals(), read_shader_output(), BVH2::refit_primitives(), EdgeDice::reserve(), Mesh::tessellate(), and xml_read_mesh().
|
inline |
Definition at line 125 of file scene/attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 88 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by Hair::apply_transform(), PointCloud::apply_transform(), attr_create_generic(), copy_attributes(), export_hair_curves_motion(), export_hair_motion_validate_attribute(), and ExportCurveSegmentsMotion().
|
inline |
Definition at line 130 of file scene/attribute.h.
References data(), and data_sizeof().
size_t Attribute::data_sizeof | ( | ) | const |
Definition at line 158 of file scene/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 103 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by create_mesh().
|
inline |
Definition at line 140 of file scene/attribute.h.
References data(), and data_sizeof().
|
inline |
Definition at line 98 of file scene/attribute.h.
References data(), and data_sizeof().
Referenced by attr_create_generic().
|
inline |
Definition at line 110 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 145 of file scene/attribute.h.
References data(), and data_sizeof().
size_t Attribute::element_size | ( | Geometry * | geom, |
AttributePrimitive | prim | ||
) | const |
Definition at line 174 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, element, flags, Geometry::geometry_type, Mesh::get_num_subd_faces(), Mesh::get_num_subd_verts(), Geometry::HAIR, Geometry::MESH, mesh, Hair::num_curves(), PointCloud::num_points(), Mesh::num_triangles(), Geometry::POINTCLOUD, 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 418 of file scene/attribute.cpp.
References data_float2(), element_size(), tiles, type, TypeFloat2(), v, float2::x, x, float2::y, and y.
Referenced by Hair::get_uv_tiles(), Mesh::get_uv_tiles(), and PointCloud::get_uv_tiles().
|
static |
Definition at line 397 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 384 of file scene/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 46 of file scene/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 58 of file scene/attribute.cpp.
References ATTR_ELEMENT_VOXEL, buffer, data_sizeof(), and element.
|
static |
Definition at line 269 of file scene/attribute.cpp.
References Freestyle::a, and usdtokens::b().
Referenced by add_with_weight().
void Attribute::set | ( | ustring | name, |
TypeDesc | type, | ||
AttributeElement | element | ||
) |
Definition at line 140 of file scene/attribute.cpp.
References buffer, data(), element, flags, modified, and type.
Referenced by AttributeSet::update().
|
static |
Definition at line 310 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, and ATTR_STD_VOLUME_VELOCITY_Z.
Referenced by AttributeSet::add(), BlenderSmokeLoader::load_pixels(), BlenderSmokeLoader::name(), name_standard(), sync_volume_object(), and GeometryManager::update_osl_attributes().
Definition at line 284 of file scene/attribute.cpp.
References data_sizeof().
Referenced by Mesh::tessellate().
vector<char> Attribute::buffer |
Definition at line 50 of file scene/attribute.h.
Referenced by add(), ApplyPrimvars(), Attribute(), data(), GeometryManager::device_update_attributes(), element_size(), resize(), set_data_from(), and ~Attribute().
AttributeElement Attribute::element |
Definition at line 51 of file scene/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(), AttributeSet::find_matching(), Geometry::has_voxel_attributes(), kernel_type(), resize(), set_data_from(), Mesh::tessellate(), AttributeSet::update(), update_attribute_element_size(), and ~Attribute().
uint Attribute::flags |
Definition at line 52 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 54 of file scene/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 46 of file scene/attribute.h.
Referenced by AttributeSet::find(), AttributeSet::find_matching(), name_standard(), and AttributeSet::update().
AttributeStandard Attribute::std |
Definition at line 47 of file scene/attribute.h.
Referenced by AttributeSet::add(), ApplyPrimvars(), attr_create_generic(), GeometryManager::create_volume_mesh(), AttributeSet::find(), AttributeSet::find_matching(), name_standard(), and AttributeSet::update().
TypeDesc Attribute::type |
Definition at line 49 of file scene/attribute.h.
Referenced by AttributeSet::add(), add_with_weight(), Attribute(), data_sizeof(), AttributeSet::find_matching(), get_uv_tiles(), kernel_type(), set_data_from(), AttributeSet::update(), and update_attribute_element_size().