|
Blender V4.3
|
#include <geometry.h>
Public Types | |
| enum | : uint32_t { UV_PASS_NEEDED = (1 << 0) , MOTION_PASS_NEEDED = (1 << 1) , GEOMETRY_MODIFIED = (1 << 2) , OBJECT_MANAGER = (1 << 3) , MESH_ADDED = (1 << 4) , MESH_REMOVED = (1 << 5) , HAIR_ADDED = (1 << 6) , HAIR_REMOVED = (1 << 7) , POINT_ADDED = (1 << 12) , POINT_REMOVED = (1 << 13) , SHADER_ATTRIBUTE_MODIFIED = (1 << 8) , SHADER_DISPLACEMENT_MODIFIED = (1 << 9) , GEOMETRY_ADDED = MESH_ADDED | HAIR_ADDED | POINT_ADDED , GEOMETRY_REMOVED = MESH_REMOVED | HAIR_REMOVED | POINT_REMOVED , TRANSFORM_MODIFIED = (1 << 10) , VISIBILITY_MODIFIED = (1 << 11) , UPDATE_ALL = ~0u , UPDATE_NONE = 0u } |
Public Member Functions | |
| GeometryManager () | |
| ~GeometryManager () | |
| void | device_update_preprocess (Device *device, Scene *scene, Progress &progress) |
| void | device_update (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
| void | device_free (Device *device, DeviceScene *dscene, bool force_free) |
| void | tag_update (Scene *scene, uint32_t flag) |
| bool | need_update () const |
| void | collect_statistics (const Scene *scene, RenderStats *stats) |
Public Attributes | |
| bool | need_flags_update |
Protected Member Functions | |
| bool | displace (Device *device, Scene *scene, Mesh *mesh, Progress &progress) |
| void | create_volume_mesh (const Scene *scene, Volume *volume, Progress &progress) |
| void | update_osl_globals (Device *device, Scene *scene) |
| void | update_svm_attributes (Device *device, DeviceScene *dscene, Scene *scene, vector< AttributeRequestSet > &geom_attributes, vector< AttributeRequestSet > &object_attributes) |
| void | geom_calc_offset (Scene *scene, BVHLayout bvh_layout) |
| void | device_update_object (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
| void | device_update_mesh (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
| void | device_update_attributes (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
| void | device_update_bvh (Device *device, DeviceScene *dscene, Scene *scene, Progress &progress) |
| void | device_update_displacement_images (Device *device, Scene *scene, Progress &progress) |
| void | device_update_volume_images (Device *device, Scene *scene, Progress &progress) |
Definition at line 197 of file scene/geometry.h.
| anonymous enum : uint32_t |
Definition at line 201 of file scene/geometry.h.
| GeometryManager::GeometryManager | ( | ) |
Definition at line 182 of file scene/geometry.cpp.
References need_flags_update, and UPDATE_ALL.
| GeometryManager::~GeometryManager | ( | ) |
Definition at line 188 of file scene/geometry.cpp.
| void GeometryManager::collect_statistics | ( | const Scene * | scene, |
| RenderStats * | stats ) |
Definition at line 1117 of file scene/geometry.cpp.
References NamedSizeStats::add_entry(), MeshStats::geometry, and RenderStats::mesh.
Referenced by Scene::collect_statistics().
|
protected |
Definition at line 636 of file scene/volume.cpp.
References Attribute::add(), VolumeMeshBuilder::add_padding(), ATTR_ELEMENT_VOXEL, ATTR_STD_FACE_NORMAL, ATTR_STD_VOLUME_VELOCITY, VolumeMeshBuilder::create_mesh(), device_memory::data_elements, Attribute::data_float3(), Attribute::data_voxel(), Attribute::element, VolumeMeshBuilder::empty_grid(), hash_string(), hash_uint_to_float(), indices, int, max, Scene::MOTION_NONE, node, NULL, Progress::set_status(), Attribute::std, string_printf(), VLOG_WORK, VOLUME_INTERPOLATION_CUBIC, and VOLUME_INTERPOLATION_LINEAR.
| void GeometryManager::device_free | ( | Device * | device, |
| DeviceScene * | dscene, | ||
| bool | force_free ) |
Definition at line 1058 of file scene/geometry.cpp.
References DeviceScene::attributes_float, DeviceScene::attributes_float2, DeviceScene::attributes_float3, DeviceScene::attributes_float4, DeviceScene::attributes_map, DeviceScene::attributes_uchar4, BVH_LAYOUT_NONE, DeviceScene::bvh_leaf_nodes, DeviceScene::bvh_nodes, DeviceScene::curve_keys, DeviceScene::curve_segments, DeviceScene::curves, DeviceScene::data, device_vector< T >::free_if_need_realloc(), Device::get_cpu_osl_memory(), DeviceScene::object_node, DeviceScene::patches, DeviceScene::points, DeviceScene::points_shader, DeviceScene::prim_index, DeviceScene::prim_object, DeviceScene::prim_time, DeviceScene::prim_type, DeviceScene::prim_visibility, DeviceScene::tri_patch, DeviceScene::tri_patch_uv, DeviceScene::tri_shader, DeviceScene::tri_verts, DeviceScene::tri_vindex, and DeviceScene::tri_vnormal.
Referenced by Scene::free_memory().
| void GeometryManager::device_update | ( | Device * | device, |
| DeviceScene * | dscene, | ||
| Scene * | scene, | ||
| Progress & | progress ) |
Definition at line 710 of file scene/geometry.cpp.
References Mesh::add_face_normals(), ATTR_STD_POSITION_UNDISPLACED, Geometry::geometry_type, Progress::get_cancel(), Geometry::HAIR, Node::is_modified(), Geometry::MESH, need_update(), timer, VLOG_INFO, and Geometry::VOLUME.
Referenced by Scene::device_update().
|
protected |
Definition at line 485 of file geometry_attributes.cpp.
References Attribute::add(), device_vector< T >::alloc(), ATTR_ELEMENT_OBJECT, ATTR_PRIM_GEOMETRY, ATTR_PRIM_SUBD, ATTR_STD_SHADOW_TRANSPARENCY, Geometry::attributes, DeviceScene::attributes_float, DeviceScene::attributes_float2, DeviceScene::attributes_float3, DeviceScene::attributes_float4, DeviceScene::attributes_uchar4, Attribute::buffer, device_vector< T >::copy_to_device_if_modified(), AttributeRequest::desc, AttributeRequestSet::find(), AttributeSet::find(), Progress::get_cancel(), Geometry::index, Geometry::is_hair(), Geometry::is_mesh(), Attribute::kernel_type(), Attribute::modified, device_vector< T >::need_realloc(), node, NUM, Progress::set_status(), AttributeRequest::subd_desc, AttributeRequest::subd_type, AttributeRequest::type, update_attribute_element_size(), update_osl_globals(), and update_svm_attributes().
|
protected |
Definition at line 106 of file geometry_bvh.cpp.
References BVHParams::best_bvh_layout(), Device::build_bvh(), BVHParams::bvh_layout, BVH_LAYOUT_BVH2, bvh_layout_name(), DeviceScene::bvh_leaf_nodes, DeviceScene::bvh_nodes, BVHParams::bvh_type, device_vector< T >::copy_to_device(), BVH::create(), BVHParams::curve_subdivisions, DeviceScene::data, Device::get_bvh_layout_mask(), Progress::get_cancel(), PackedBVH::leaf_nodes, PackedBVH::nodes, BVHParams::num_motion_curve_steps, BVHParams::num_motion_point_steps, BVHParams::num_motion_triangle_steps, DeviceScene::object_node, PackedBVH::object_node, DeviceScene::prim_index, PackedBVH::prim_index, DeviceScene::prim_object, PackedBVH::prim_object, DeviceScene::prim_time, PackedBVH::prim_time, DeviceScene::prim_type, PackedBVH::prim_type, DeviceScene::prim_visibility, PackedBVH::prim_visibility, PackedBVH::root_index, Progress::set_status(), array< T, alignment >::size(), device_vector< T >::steal_data(), BVHParams::top_level, BVHParams::use_spatial_split, BVHParams::use_unaligned_nodes, and VLOG_INFO.
|
protected |
Definition at line 608 of file scene/geometry.cpp.
References ImageManager::device_update_slot(), DISPLACE_BUMP, function_bind, Geometry::geometry_type, Geometry::HAIR, ImageSlotTextureNode::handle, Node::is_modified(), Hair::need_shadow_transparency(), node, ImageHandle::num_tiles(), TaskPool::push(), Progress::set_status(), SHADER_SPECIAL_TYPE_IMAGE_SLOT, SHADER_SPECIAL_TYPE_OSL, ImageHandle::svm_slot(), and TaskPool::wait_work().
|
protected |
Definition at line 39 of file geometry_mesh.cpp.
References device_vector< T >::alloc(), device_vector< T >::copy_to_device(), device_vector< T >::copy_to_device_if_modified(), DeviceScene::curve_keys, DeviceScene::curve_segments, DeviceScene::curves, Geometry::geometry_type, Progress::get_cancel(), Geometry::is_hair(), Geometry::is_mesh(), Geometry::is_pointcloud(), Geometry::MESH, device_vector< T >::need_realloc(), Hair::num_curves(), PointCloud::num_points(), Mesh::SubdFace::num_ptex_faces(), Mesh::num_triangles(), PointCloud::pack(), Hair::pack_curves(), Mesh::pack_patches(), Mesh::pack_shaders(), DeviceScene::patches, DeviceScene::points, DeviceScene::points_shader, Geometry::prim_offset, Mesh::SubdFace::ptex_offset, Progress::set_status(), DeviceScene::tri_patch, DeviceScene::tri_patch_uv, DeviceScene::tri_shader, DeviceScene::tri_verts, DeviceScene::tri_vindex, DeviceScene::tri_vnormal, and Geometry::VOLUME.
|
protected |
| void GeometryManager::device_update_preprocess | ( | Device * | device, |
| Scene * | scene, | ||
| Progress & | progress ) |
Definition at line 352 of file scene/geometry.cpp.
References need_flags_update, need_update(), and timer.
Referenced by Scene::device_update().
|
protected |
Definition at line 674 of file scene/geometry.cpp.
References ATTR_ELEMENT_VOXEL, AttributeSet::attributes, Geometry::attributes, Attribute::data_voxel(), ImageManager::device_update_slot(), Attribute::element, function_bind, Node::is_modified(), TaskPool::push(), Progress::set_status(), ImageHandle::svm_slot(), and TaskPool::wait_work().
|
protected |
Definition at line 156 of file mesh_displace.cpp.
References ATTR_STD_FACE_NORMAL, ATTR_STD_MOTION_VERTEX_NORMAL, ATTR_STD_MOTION_VERTEX_POSITION, ATTR_STD_VERTEX_NORMAL, compute_face_normal(), Attribute::data_float3(), DISPLACE_TRUE, ShaderEval::eval(), fill_shader_input(), function_bind, node, normalize(), OBJECT_NONE, pos, read_shader_output(), Progress::set_status(), SHADER_EVAL_DISPLACE, string_printf(), v, verts, and zero_float3().
Definition at line 273 of file scene/geometry.cpp.
References BVH_LAYOUT_MULTI_OPTIX, BVH_LAYOUT_MULTI_OPTIX_EMBREE, BVH_LAYOUT_OPTIX, Hair::curve_key_offset, Geometry::geometry_type, Geometry::is_hair(), Geometry::is_pointcloud(), Geometry::MESH, Geometry::need_update_bvh_for_offset, Geometry::need_update_rebuild, PointCloud::num_points(), Mesh::SubdFace::num_ptex_faces(), Geometry::prim_offset, Mesh::SubdFace::ptex_offset, and Geometry::VOLUME.
| bool GeometryManager::need_update | ( | ) | const |
Definition at line 1112 of file scene/geometry.cpp.
References UPDATE_NONE.
Referenced by device_update(), device_update_preprocess(), and Scene::need_data_update().
Definition at line 1102 of file scene/geometry.cpp.
References flag, ObjectManager::GEOMETRY_MANAGER, and OBJECT_MANAGER.
Referenced by Scene::create_node(), Scene::delete_node_impl(), Scene::delete_node_impl(), Scene::delete_node_impl(), Scene::delete_node_impl(), Scene::delete_node_impl(), Scene::delete_nodes(), and Scene::reset().
Definition at line 190 of file scene/geometry.cpp.
References Device::get_cpu_osl_memory().
Referenced by device_update_attributes().
|
protected |
Definition at line 158 of file geometry_attributes.cpp.
References device_vector< T >::alloc(), Geometry::attr_map_offset, Object::attr_map_offset, ATTR_PRIM_TYPES, ATTR_STD_NONE, DeviceScene::attributes_map, device_vector< T >::copy_to_device(), emit_attribute_map_terminator(), emit_attribute_mapping(), AttributeRequest::name, device_vector< T >::need_realloc(), device_vector< T >::size(), size(), and AttributeRequest::std.
Referenced by device_update_attributes().
| bool GeometryManager::need_flags_update |
Definition at line 230 of file scene/geometry.h.
Referenced by device_update_preprocess(), and GeometryManager().