Blender V4.5
GeometryManager Class Reference

#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, const uint32_t flag)
bool need_update () const
void collect_statistics (const Scene *scene, RenderStats *stats)

Public Attributes

bool need_flags_update
bool first_bvh_build = true

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)

Detailed Description

Definition at line 201 of file scene/geometry.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : uint32_t
Enumerator
UV_PASS_NEEDED 
MOTION_PASS_NEEDED 
GEOMETRY_MODIFIED 
OBJECT_MANAGER 
MESH_ADDED 
MESH_REMOVED 
HAIR_ADDED 
HAIR_REMOVED 
POINT_ADDED 
POINT_REMOVED 
SHADER_ATTRIBUTE_MODIFIED 
SHADER_DISPLACEMENT_MODIFIED 
GEOMETRY_ADDED 
GEOMETRY_REMOVED 
TRANSFORM_MODIFIED 
VISIBILITY_MODIFIED 
UPDATE_ALL 
UPDATE_NONE 

Definition at line 210 of file scene/geometry.h.

Constructor & Destructor Documentation

◆ GeometryManager()

GeometryManager::GeometryManager ( )

Definition at line 168 of file scene/geometry.cpp.

References need_flags_update, and UPDATE_ALL.

◆ ~GeometryManager()

GeometryManager::~GeometryManager ( )
default

References flag, and progress.

Member Function Documentation

◆ collect_statistics()

void GeometryManager::collect_statistics ( const Scene * scene,
RenderStats * stats )

◆ create_volume_mesh()

◆ device_free()

◆ device_update()

void GeometryManager::device_update ( Device * device,
DeviceScene * dscene,
Scene * scene,
Progress & progress )

Definition at line 686 of file scene/geometry.cpp.

References Mesh::add_vertex_normals(), Geometry::attributes, DeviceScene::attributes_float, DeviceScene::attributes_float2, DeviceScene::attributes_float3, DeviceScene::attributes_float4, DeviceScene::attributes_map, DeviceScene::attributes_uchar4, BVHParams::best_bvh_layout(), Scene::bvh, SceneParams::bvh_layout, DeviceScene::bvh_leaf_nodes, DeviceScene::bvh_nodes, SceneParams::bvh_type, BVH_TYPE_STATIC, SubdParams::camera, AttributeSet::clear_modified(), device_vector< T >::clear_modified(), Node::clear_modified(), Geometry::compute_bvh(), Device::const_copy_to(), DeviceInfo::contains_device_type(), DeviceScene::curve_keys, DeviceScene::curve_segments, DeviceScene::curves, DeviceScene::data, device_free(), DEVICE_ONEAPI, device_update_attributes(), device_update_bvh(), device_update_displacement_images(), device_update_mesh(), Scene::dicing_camera, SubdParams::dicing_rate, displace(), first_bvh_build, TaskPool::Summary::full_report(), geom_calc_offset(), Scene::geometry, Device::get_bvh_layout_mask(), Geometry::has_true_displacement(), i, Device::info, Geometry::is_hair(), Geometry::is_mesh(), Node::is_modified(), Geometry::is_volume(), SubdParams::max_level, Scene::MOTION_BLUR, Node::name, Geometry::need_build_bvh(), Scene::need_motion(), Hair::need_shadow_transparency(), Mesh::need_tesselation(), need_update(), Shader::need_update_attribute, Geometry::need_update_bvh_for_offset, Shader::need_update_displacement, Shader::need_update_uvs, Scene::object_manager, DeviceScene::object_node, Scene::objects, SubdParams::objecttoworld, Scene::params, DeviceScene::points, DeviceScene::points_shader, DeviceScene::prim_index, DeviceScene::prim_object, DeviceScene::prim_time, DeviceScene::prim_type, DeviceScene::prim_visibility, progress, Scene::shaders, unique_ptr_vector< T >::size(), string_printf(), Mesh::subd_attributes, Mesh::SUBDIVISION_CATMULL_CLARK, Mesh::tessellate(), timer, TRANSFORM_MODIFIED, DeviceScene::tri_shader, DeviceScene::tri_verts, DeviceScene::tri_vindex, DeviceScene::tri_vnormal, Mesh::update_generated(), UPDATE_NONE, Hair::update_shadow_transparency(), Scene::update_stats, Mesh::update_tangents(), VISIBILITY_MODIFIED, VLOG_INFO, and VLOG_WORK.

◆ device_update_attributes()

◆ device_update_bvh()

◆ device_update_displacement_images()

◆ device_update_mesh()

◆ device_update_object()

void GeometryManager::device_update_object ( Device * device,
DeviceScene * dscene,
Scene * scene,
Progress & progress )
protected

References progress.

◆ device_update_preprocess()

void GeometryManager::device_update_preprocess ( Device * device,
Scene * scene,
Progress & progress )

Definition at line 330 of file scene/geometry.cpp.

References ATTR_FLOAT2_MODIFIED, ATTR_FLOAT2_NEEDS_REALLOC, ATTR_FLOAT3_MODIFIED, ATTR_FLOAT3_NEEDS_REALLOC, ATTR_FLOAT4_MODIFIED, ATTR_FLOAT4_NEEDS_REALLOC, ATTR_FLOAT_MODIFIED, ATTR_FLOAT_NEEDS_REALLOC, ATTR_UCHAR4_MODIFIED, ATTR_UCHAR4_NEEDS_REALLOC, Geometry::attributes, DeviceScene::attributes_float, DeviceScene::attributes_float2, DeviceScene::attributes_float3, DeviceScene::attributes_float4, DeviceScene::attributes_map, DeviceScene::attributes_uchar4, ATTRS_NEED_REALLOC, Scene::bvh, DeviceScene::bvh_leaf_nodes, DeviceScene::bvh_nodes, create_volume_mesh(), DeviceScene::curve_keys, DeviceScene::curve_segments, Hair::curve_shape, DeviceScene::curves, DEVICE_CURVE_DATA_MODIFIED, DEVICE_CURVE_DATA_NEEDS_REALLOC, DEVICE_MESH_DATA_MODIFIED, DEVICE_MESH_DATA_NEEDS_REALLOC, DEVICE_POINT_DATA_MODIFIED, DEVICE_POINT_DATA_NEEDS_REALLOC, device_update_volume_images(), Scene::dscene, Scene::geometry, HAIR_ADDED, HAIR_REMOVED, SceneParams::hair_shape, Geometry::has_surface_bssrdf, Shader::has_surface_bssrdf, Geometry::has_volume, Shader::has_volume, Geometry::is_hair(), Geometry::is_mesh(), Node::is_modified(), Geometry::is_pointcloud(), Geometry::is_volume(), MESH_ADDED, MESH_REMOVED, need_flags_update, Mesh::need_tesselation(), need_update(), Shader::need_update_attribute, Shader::need_update_displacement, Geometry::need_update_rebuild, Shader::need_update_uvs, DeviceScene::object_node, Scene::params, POINT_ADDED, POINT_REMOVED, DeviceScene::points, DeviceScene::points_shader, DeviceScene::prim_index, DeviceScene::prim_object, DeviceScene::prim_time, DeviceScene::prim_type, DeviceScene::prim_visibility, progress, Mesh::subd_attributes, device_vector< T >::tag_modified(), Node::tag_modified(), device_vector< T >::tag_realloc(), timer, DeviceScene::tri_shader, DeviceScene::tri_verts, DeviceScene::tri_vindex, DeviceScene::tri_vnormal, update_attribute_realloc_flags(), update_device_flags_attribute(), Scene::update_stats, and VISIBILITY_MODIFIED.

◆ device_update_volume_images()

◆ displace()

◆ geom_calc_offset()

◆ need_update()

bool GeometryManager::need_update ( ) const

Definition at line 1123 of file scene/geometry.cpp.

References UPDATE_NONE.

Referenced by device_update(), and device_update_preprocess().

◆ tag_update()

void GeometryManager::tag_update ( Scene * scene,
const uint32_t flag )

◆ update_osl_globals()

void GeometryManager::update_osl_globals ( Device * device,
Scene * scene )
protected

◆ update_svm_attributes()

Member Data Documentation

◆ first_bvh_build

bool GeometryManager::first_bvh_build = true

Definition at line 240 of file scene/geometry.h.

Referenced by device_update().

◆ need_flags_update

bool GeometryManager::need_flags_update

Definition at line 239 of file scene/geometry.h.

Referenced by device_update_preprocess(), and GeometryManager().


The documentation for this class was generated from the following files: