|
Blender V4.3
|
#include <geometry.h>
Inherits Node.
Inherited by Hair, Mesh, and PointCloud.
Public Types | |
| enum | Type { MESH , HAIR , VOLUME , POINTCLOUD } |
Public Member Functions | |
| Geometry (const NodeType *node_type, const Type type) | |
| virtual | ~Geometry () |
| virtual void | clear (bool preserve_shaders=false) |
| virtual void | compute_bounds ()=0 |
| virtual void | apply_transform (const Transform &tfm, const bool apply_to_motion)=0 |
| bool | need_attribute (Scene *scene, AttributeStandard std) |
| bool | need_attribute (Scene *scene, ustring name) |
| AttributeRequestSet | needed_attributes () |
| virtual void | get_uv_tiles (ustring map, unordered_set< int > &tiles)=0 |
| float | motion_time (int step) const |
| int | motion_step (float time) const |
| void | compute_bvh (Device *device, DeviceScene *dscene, SceneParams *params, Progress *progress, size_t n, size_t total) |
| virtual PrimitiveType | primitive_type () const =0 |
| bool | need_build_bvh (BVHLayout layout) const |
| bool | is_instanced () const |
| bool | has_true_displacement () const |
| bool | has_motion_blur () const |
| bool | has_voxel_attributes () const |
| bool | is_mesh () const |
| bool | is_hair () const |
| bool | is_pointcloud () const |
| bool | is_volume () const |
| void | tag_update (Scene *scene, bool rebuild) |
| void | tag_bvh_update (bool rebuild) |
Public Member Functions inherited from Node | |
| Node (const NodeType *type, ustring name=ustring()) | |
| virtual | ~Node ()=0 |
| void | set (const SocketType &input, bool value) |
| void | set (const SocketType &input, int value) |
| void | set (const SocketType &input, uint value) |
| void | set (const SocketType &input, uint64_t value) |
| void | set (const SocketType &input, float value) |
| void | set (const SocketType &input, float2 value) |
| void | set (const SocketType &input, float3 value) |
| void | set (const SocketType &input, const char *value) |
| void | set (const SocketType &input, ustring value) |
| void | set (const SocketType &input, const Transform &value) |
| void | set (const SocketType &input, Node *value) |
| template<class ValueType , std::enable_if_t< std::is_enum_v< ValueType >, bool > = true> | |
| void | set (const SocketType &input, const ValueType &value) |
| void | set (const SocketType &input, array< bool > &value) |
| void | set (const SocketType &input, array< int > &value) |
| void | set (const SocketType &input, array< float > &value) |
| void | set (const SocketType &input, array< float2 > &value) |
| void | set (const SocketType &input, array< float3 > &value) |
| void | set (const SocketType &input, array< ustring > &value) |
| void | set (const SocketType &input, array< Transform > &value) |
| void | set (const SocketType &input, array< Node * > &value) |
| bool | get_bool (const SocketType &input) const |
| int | get_int (const SocketType &input) const |
| uint | get_uint (const SocketType &input) const |
| uint64_t | get_uint64 (const SocketType &input) const |
| float | get_float (const SocketType &input) const |
| float2 | get_float2 (const SocketType &input) const |
| float3 | get_float3 (const SocketType &input) const |
| ustring | get_string (const SocketType &input) const |
| Transform | get_transform (const SocketType &input) const |
| Node * | get_node (const SocketType &input) const |
| const array< bool > & | get_bool_array (const SocketType &input) const |
| const array< int > & | get_int_array (const SocketType &input) const |
| const array< float > & | get_float_array (const SocketType &input) const |
| const array< float2 > & | get_float2_array (const SocketType &input) const |
| const array< float3 > & | get_float3_array (const SocketType &input) const |
| const array< ustring > & | get_string_array (const SocketType &input) const |
| const array< Transform > & | get_transform_array (const SocketType &input) const |
| const array< Node * > & | get_node_array (const SocketType &input) const |
| bool | has_default_value (const SocketType &input) const |
| void | set_default_value (const SocketType &input) |
| bool | equals_value (const Node &other, const SocketType &input) const |
| void | copy_value (const SocketType &input, const Node &other, const SocketType &other_input) |
| void | set_value (const SocketType &input, const Node &other, const SocketType &other_input) |
| bool | equals (const Node &other) const |
| void | hash (MD5Hash &md5) |
| size_t | get_total_size_in_bytes () const |
| bool | is_a (const NodeType *type) |
| bool | socket_is_modified (const SocketType &input) const |
| bool | is_modified () const |
| void | tag_modified () |
| void | clear_modified () |
| void | print_modified_sockets () const |
| const NodeOwner * | get_owner () const |
| void | set_owner (const NodeOwner *owner_) |
| int | reference_count () const |
| void | reference () |
| void | dereference () |
| void | clear_reference_count () |
Public Attributes | |
| Type | geometry_type |
| AttributeSet | attributes |
| BoundBox | bounds |
| bool | transform_applied |
| bool | transform_negative_scaled |
| Transform | transform_normal |
| BVH * | bvh |
| size_t | attr_map_offset |
| size_t | prim_offset |
| bool | has_volume |
| bool | has_surface_bssrdf |
| bool | need_update_rebuild |
| bool | need_update_bvh_for_offset |
| size_t | index |
Public Attributes inherited from Node | |
| ustring | name |
| const NodeType * | type |
| InternalNode | internal |
| LeafNode | leaf |
Static Public Attributes | |
| static const uint | MAX_MOTION_STEPS = 129 |
Additional Inherited Members | |
Protected Member Functions inherited from Node | |
| template<typename T > | |
| void | set_if_different (const SocketType &input, T value) |
| void | set_if_different (const SocketType &input, Node *value) |
| template<typename T > | |
| void | set_if_different (const SocketType &input, array< T > &value) |
| void | set_if_different (const SocketType &input, array< Node * > &value) |
| void | dereference_all_used_nodes () |
Static Protected Member Functions inherited from Node | |
| template<typename T > | |
| static T & | get_socket_value (const Node *node, const SocketType &socket) |
Protected Attributes inherited from Node | |
| const NodeOwner * | owner |
| int | ref_count {0} |
| SocketModifiedFlags | socket_modified |
Definition at line 70 of file scene/geometry.h.
| enum Geometry::Type |
| Enumerator | |
|---|---|
| MESH | |
| HAIR | |
| VOLUME | |
| POINTCLOUD | |
Definition at line 74 of file scene/geometry.h.
Definition at line 52 of file scene/geometry.cpp.
References attr_map_offset, bounds, bvh, BoundBox::empty, has_surface_bssrdf, has_volume, need_update_bvh_for_offset, need_update_rebuild, NULL, prim_offset, transform_applied, transform_identity(), transform_negative_scaled, and transform_normal.
|
virtual |
Definition at line 71 of file scene/geometry.cpp.
References bvh, and Node::dereference_all_used_nodes().
|
pure virtual |
Implemented in Hair, Mesh, and PointCloud.
|
virtual |
Reimplemented in Hair, Mesh, PointCloud, and Volume.
Definition at line 77 of file scene/geometry.cpp.
References Node::tag_modified(), transform_applied, transform_identity(), transform_negative_scaled, and transform_normal.
Referenced by Hair::clear(), Mesh::clear(), PointCloud::clear(), and Mesh::clear_non_sockets().
|
pure virtual |
Implemented in Hair, Mesh, and PointCloud.
Referenced by compute_bvh().
| CCL_NAMESPACE_BEGIN void Geometry::compute_bvh | ( | Device * | device, |
| DeviceScene * | dscene, | ||
| SceneParams * | params, | ||
| Progress * | progress, | ||
| size_t | n, | ||
| size_t | total ) |
Definition at line 36 of file geometry_bvh.cpp.
References BVHParams::best_bvh_layout(), Device::build_bvh(), bvh, BVHParams::bvh_layout, BVHParams::bvh_type, BVHLayout, compute_bounds(), BVH::create(), BVHParams::curve_subdivisions, DeviceScene::data, Device::get_bvh_layout_mask(), Progress::get_cancel(), MEM_GUARDED_CALL, need_build_bvh(), need_update_bvh_for_offset, need_update_rebuild, BVHParams::num_motion_curve_steps, BVHParams::num_motion_point_steps, BVHParams::num_motion_triangle_steps, params, BVH::replace_geometry(), Progress::set_status(), string_printf(), BVHParams::use_compact_structure, BVHParams::use_spatial_split, and BVHParams::use_unaligned_nodes.
|
pure virtual |
Implemented in Hair, Mesh, and PointCloud.
Referenced by ImageTextureNode::cull_tiles().
| bool Geometry::has_motion_blur | ( | ) | const |
Definition at line 147 of file scene/geometry.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION.
Referenced by BVHBuild::add_reference_points(), Mesh::add_vertex_normals(), Hair::primitive_type(), Mesh::primitive_type(), and PointCloud::primitive_type().
| bool Geometry::has_true_displacement | ( | ) | const |
Definition at line 135 of file scene/geometry.cpp.
References DISPLACE_BUMP, and node.
Referenced by ObjectManager::apply_static_transforms().
| bool Geometry::has_voxel_attributes | ( | ) | const |
Definition at line 84 of file geometry_attributes.cpp.
References ATTR_ELEMENT_VOXEL, and Attribute::element.
|
inline |
Definition at line 174 of file scene/geometry.h.
References geometry_type, and HAIR.
Referenced by GeometryManager::device_update_attributes(), GeometryManager::device_update_mesh(), GeometryManager::geom_calc_offset(), and Scene::update_kernel_features().
| bool Geometry::is_instanced | ( | ) | const |
Definition at line 125 of file scene/geometry.cpp.
References has_surface_bssrdf, and transform_applied.
Referenced by need_build_bvh().
|
inline |
Definition at line 169 of file scene/geometry.h.
References geometry_type, and MESH.
Referenced by GeometryManager::device_update_attributes(), GeometryManager::device_update_mesh(), emit_attribute_mapping(), BlenderSync::sync_recalc(), Scene::update_kernel_features(), and Object::usable_as_light().
|
inline |
Definition at line 179 of file scene/geometry.h.
References geometry_type, and POINTCLOUD.
Referenced by GeometryManager::device_update_mesh(), GeometryManager::geom_calc_offset(), and Scene::update_kernel_features().
|
inline |
Definition at line 184 of file scene/geometry.h.
References geometry_type, and VOLUME.
Referenced by ObjectManager::device_update_object_transform(), and Object::usable_as_light().
Definition at line 94 of file scene/geometry.cpp.
References motion_time().
Referenced by Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), and PointCloud::copy_center_to_motion_step().
Definition at line 89 of file scene/geometry.cpp.
Referenced by motion_step().
| CCL_NAMESPACE_BEGIN bool Geometry::need_attribute | ( | Scene * | scene, |
| AttributeStandard | std ) |
Definition at line 36 of file geometry_attributes.cpp.
References ATTR_STD_NONE, and node.
Referenced by export_pointcloud().
| bool Geometry::need_attribute | ( | Scene * | scene, |
| ustring | name ) |
Definition at line 56 of file geometry_attributes.cpp.
References node.
| bool Geometry::need_build_bvh | ( | BVHLayout | layout | ) | const |
Definition at line 115 of file scene/geometry.cpp.
References BVH_LAYOUT_EMBREEGPU, BVH_LAYOUT_HIPRT, BVH_LAYOUT_METAL, BVH_LAYOUT_MULTI_EMBREEGPU, BVH_LAYOUT_MULTI_EMBREEGPU_EMBREE, BVH_LAYOUT_MULTI_HIPRT, BVH_LAYOUT_MULTI_HIPRT_EMBREE, BVH_LAYOUT_MULTI_METAL, BVH_LAYOUT_MULTI_METAL_EMBREE, BVH_LAYOUT_MULTI_OPTIX, BVH_LAYOUT_MULTI_OPTIX_EMBREE, BVH_LAYOUT_OPTIX, and is_instanced().
Referenced by compute_bvh(), and BVH2::pack_instances().
| AttributeRequestSet Geometry::needed_attributes | ( | ) |
Definition at line 72 of file geometry_attributes.cpp.
|
pure virtual |
Implemented in Hair, Mesh, and PointCloud.
Referenced by ObjectManager::device_update_object_transform().
| void Geometry::tag_bvh_update | ( | bool | rebuild | ) |
Definition at line 171 of file scene/geometry.cpp.
References need_update_rebuild, and Node::tag_modified().
| void Geometry::tag_update | ( | Scene * | scene, |
| bool | rebuild ) |
Definition at line 152 of file scene/geometry.cpp.
References EMISSION_SAMPLING_NONE, LightManager::EMISSIVE_MESH_MODIFIED, GeometryManager::GEOMETRY_MODIFIED, LightManager::MESH_NEED_REBUILD, need_update_rebuild, node, and Shader::tag_update().
| size_t Geometry::attr_map_offset |
Definition at line 104 of file scene/geometry.h.
Referenced by ObjectManager::device_update_geom_offsets(), Geometry(), and GeometryManager::update_svm_attributes().
| AttributeSet Geometry::attributes |
Definition at line 84 of file scene/geometry.h.
Referenced by BVHBuild::add_reference_points(), blender::ed::spreadsheet::GeometryDataSource::apply_selection_filter(), attr_create_motion_from_velocity(), blender::bke::GeometryFieldContext::attributes(), BKE_mesh_calc_loop_tangents(), blender::ed::spreadsheet::MeshDomainViewItem::build_row(), blender::io::obj::OBJMesh::calc_face_order(), blender::ed::sculpt_paint::auto_mask::calc_grids_factors(), blender::ed::sculpt_paint::filter::calc_relax_face_sets_filter(), blender::ed::sculpt_paint::filter::calc_relax_filter(), blender::io::obj::OBJMesh::calc_smooth_groups(), blender::bke::compare_meshes::compare_meshes(), copy_attributes(), GeometryManager::device_update_attributes(), GeometryManager::device_update_volume_images(), blender::draw::draw_subdiv_cache_ensure_mat_offsets(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_pointcloud(), EdgeDice::EdgeDice(), blender::ed::sculpt_paint::expand::enabled_state_to_bitmap(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), export_pointcloud(), export_pointcloud_motion(), blender::draw::extract_attr_viewer(), blender::geometry::extract_pointcloud_points(), blender::draw::extract_sculpt_data_subdiv(), blender::bke::pbvh::Tree::from_grids(), blender::geometry::gather_vert_attributes(), blender::ed::sculpt_paint::auto_mask::init_face_sets_masking(), blender::ed::sculpt_paint::expand::init_from_face_set_boundary(), blender::geometry::mesh_copy_selection(), blender::geometry::mesh_copy_selection_keep_edges(), blender::geometry::mesh_copy_selection_keep_verts(), mesh_merge_transform(), blender::bke::mesh_remesh_reproject_attributes(), blender::draw::overlay::Sculpts::mesh_sync(), multires_reshape_context_create_from_object(), multires_reshape_context_create_from_subdiv(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::io::obj::OBJMesh::OBJMesh(), OVERLAY_sculpt_cache_populate(), OVERLAY_viewer_attribute_text(), blender::geometry::point_merge_by_distance(), blender::draw::pointcloud_extract_attribute(), blender::draw::pointcloud_extract_position_and_radius(), populate_cache_for_geometry(), blender::geometry::preprocess_pointclouds(), BVH2::refit_primitives(), blender::geometry::reorder_mesh_edges_exec(), blender::geometry::reorder_mesh_faces_exec(), blender::geometry::reorder_mesh_verts_exec(), blender::geometry::reorder_points_exec(), blender::ed::sculpt_paint::cloth::sculpt_cloth_filter_modal(), blender::ed::sculpt_paint::expand::sculpt_expand_invoke(), blender::geometry::separate_point_cloud_selection(), blender::bke::bake::serialize_geometry_set(), blender::ed::curves::snap_curves_to_surface::snap_curves_to_surface_exec_object(), and blender::io::obj::OBJWriter::write_face_elements().
| BoundBox Geometry::bounds |
Definition at line 90 of file scene/geometry.h.
Referenced by Hair::Curve::bounds_grow(), Hair::Curve::bounds_grow(), Hair::Curve::bounds_grow(), Hair::Curve::bounds_grow(), Mesh::Triangle::bounds_grow(), PointCloud::Point::bounds_grow(), PointCloud::Point::bounds_grow(), PointCloud::Point::bounds_grow(), Hair::compute_bounds(), Mesh::compute_bounds(), PointCloud::compute_bounds(), and Geometry().
| BVH* Geometry::bvh |
Definition at line 103 of file scene/geometry.h.
Referenced by MultiDevice::build_bvh(), compute_bvh(), Geometry(), BVH2::pack_instances(), and ~Geometry().
| Type Geometry::geometry_type |
Definition at line 81 of file scene/geometry.h.
Referenced by BVHBuild::add_reference_geometry(), ObjectManager::apply_static_transforms(), count_primitives(), BakeManager::device_update(), GeometryManager::device_update(), GeometryManager::device_update_displacement_images(), ObjectManager::device_update_geom_offsets(), GeometryManager::device_update_mesh(), ObjectManager::device_update_object_transform(), Attribute::element_size(), GeometryManager::geom_calc_offset(), is_hair(), is_mesh(), is_pointcloud(), is_volume(), object_volume_density(), and BVHSpatialSplit::split_object_reference().
| bool Geometry::has_surface_bssrdf |
Definition at line 109 of file scene/geometry.h.
Referenced by ObjectManager::apply_static_transforms(), Geometry(), and is_instanced().
| bool Geometry::has_volume |
Definition at line 108 of file scene/geometry.h.
Referenced by Geometry().
| size_t Geometry::index |
Definition at line 116 of file scene/geometry.h.
Referenced by GeometryManager::device_update_attributes(), Mesh::get_subd_face(), and Hair::pack_curves().
|
static |
Definition at line 100 of file scene/geometry.h.
| bool Geometry::need_update_bvh_for_offset |
Definition at line 113 of file scene/geometry.h.
Referenced by compute_bvh(), GeometryManager::geom_calc_offset(), and Geometry().
| bool Geometry::need_update_rebuild |
Definition at line 112 of file scene/geometry.h.
Referenced by compute_bvh(), GeometryManager::geom_calc_offset(), Geometry(), tag_bvh_update(), and tag_update().
| size_t Geometry::prim_offset |
Definition at line 105 of file scene/geometry.h.
Referenced by BakeManager::device_update(), GeometryManager::device_update_mesh(), GeometryManager::geom_calc_offset(), Geometry(), Hair::pack_curves(), BVH2::pack_instances(), and BVH2::refit_primitives().
| bool Geometry::transform_applied |
Definition at line 91 of file scene/geometry.h.
Referenced by Mesh::add_face_normals(), ObjectManager::apply_static_transforms(), clear(), LightManager::device_update_distribution(), Geometry(), is_instanced(), and Mesh::pack_normals().
| bool Geometry::transform_negative_scaled |
Definition at line 92 of file scene/geometry.h.
Referenced by Mesh::add_vertex_normals(), clear(), and Geometry().
| Transform Geometry::transform_normal |
Definition at line 93 of file scene/geometry.h.
Referenced by Mesh::add_face_normals(), Mesh::apply_transform(), clear(), Geometry(), and Mesh::pack_normals().