|
Blender
V2.93
|
#include <BKE_geometry_set.hh>
Public Member Functions | |
| template<typename Component > | |
| Component & | get_component_for_write () |
| template<typename Component > | |
| const Component * | get_component_for_read () const |
| template<typename Component > | |
| bool | has () const |
| template<typename Component > | |
| void | remove () |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const GeometrySet &geometry_set) |
| bool | operator== (const GeometrySet &a, const GeometrySet &b) |
A geometry set contains zero or more geometry components. There is at most one component of each type. Individual components might be shared between multiple geometries. Shared components are copied automatically when write access is requested.
Copying a geometry set is a relatively cheap operation, because it does not copy the referenced geometry components.
Definition at line 278 of file BKE_geometry_set.hh.
| void GeometrySet::add | ( | const GeometryComponent & | component | ) |
Definition at line 151 of file geometry_set.cc.
References BLI_assert, and component().
| void GeometrySet::clear | ( | ) |
Definition at line 209 of file geometry_set.cc.
Referenced by compute_geometry().
| void GeometrySet::compute_boundbox_without_instances | ( | blender::float3 * | r_min, |
| blender::float3 * | r_max | ||
| ) | const |
Definition at line 171 of file geometry_set.cc.
References BKE_mesh_wrapper_minmax(), BKE_pointcloud_minmax(), BKE_volume_min_max(), get_mesh_for_read(), get_pointcloud_for_read(), get_volume_for_read(), and mesh.
Referenced by BKE_pointcloud_boundbox_get(), and blender::nodes::geo_node_bounding_box_exec().
|
static |
Definition at line 277 of file geometry_set.cc.
References component(), get_component_for_write(), and mesh.
Referenced by blender::nodes::geo_node_boolean_exec(), blender::nodes::geo_node_bounding_box_exec(), blender::nodes::geo_node_mesh_primitive_circle_exec(), blender::nodes::geo_node_mesh_primitive_cone_exec(), blender::nodes::geo_node_mesh_primitive_cube_exec(), blender::nodes::geo_node_mesh_primitive_cylinder_exec(), blender::nodes::geo_node_mesh_primitive_grid_exec(), blender::nodes::geo_node_mesh_primitive_ico_sphere_exec(), blender::nodes::geo_node_mesh_primitive_line_exec(), blender::nodes::geo_node_mesh_primitive_uv_sphere_exec(), and modifyMesh().
|
static |
Definition at line 286 of file geometry_set.cc.
References component(), and get_component_for_write().
Referenced by BKE_pointcloud_data_update(), and blender::nodes::geo_node_point_distribute_exec().
| void GeometrySet::ensure_owns_direct_data | ( | ) |
Definition at line 216 of file geometry_set.cc.
References component(), GeometryComponent::ensure_owns_direct_data(), get_component_for_read(), get_component_for_write(), GeometryComponent::owns_direct_data(), and type.
Referenced by log_preview_socket_value().
|
inline |
Definition at line 292 of file BKE_geometry_set.hh.
References BLI_STATIC_ASSERT.
Referenced by ensure_owns_direct_data().
| const GeometryComponent * GeometrySet::get_component_for_read | ( | GeometryComponentType | component_type | ) | const |
Definition at line 131 of file geometry_set.cc.
References component().
Referenced by BKE_geometry_set_has_instances(), blender::nodes::compute_geometry_set_instances_boundbox(), blender::nodes::compute_special_attributes(), blender::nodes::distribute_points_poisson_disk(), blender::nodes::distribute_points_random(), blender::nodes::geo_node_point_instance_exec(), blender::bke::geometry_set_collect_recursive(), blender::bke::geometry_set_gather_instances_attribute_info(), blender::bke::instances_attribute_foreach_recursive(), blender::nodes::interpolate_existing_attributes(), blender::bke::join_attributes(), blender::bke::join_instance_groups_pointcloud(), and make_duplis_instances_component().
|
inline |
Definition at line 285 of file BKE_geometry_set.hh.
References BLI_STATIC_ASSERT.
Referenced by ensure_owns_direct_data().
| GeometryComponent & GeometrySet::get_component_for_write | ( | GeometryComponentType | component_type | ) |
Definition at line 107 of file geometry_set.cc.
References GeometryComponent::create().
Referenced by blender::bke::add_final_mesh_as_geometry_component(), create_with_mesh(), create_with_pointcloud(), blender::nodes::geo_node_align_rotation_to_vector_exec(), blender::nodes::geo_node_attribute_clamp_exec(), blender::nodes::geo_node_attribute_color_ramp_exec(), blender::nodes::geo_node_attribute_combine_xyz_exec(), blender::nodes::geo_node_attribute_compare_exec(), blender::nodes::geo_node_attribute_convert_exec(), blender::nodes::geo_node_attribute_fill_exec(), blender::nodes::geo_node_attribute_map_range_exec(), blender::nodes::geo_node_attribute_math_exec(), blender::nodes::geo_node_attribute_mix_exec(), blender::nodes::geo_node_attribute_proximity_exec(), blender::nodes::geo_node_attribute_remove_exec(), blender::nodes::geo_node_attribute_sample_texture_exec(), blender::nodes::geo_node_attribute_separate_xyz_exec(), blender::nodes::geo_node_attribute_vector_math_exec(), blender::nodes::geo_node_collection_info_exec(), blender::nodes::geo_node_object_info_exec(), blender::nodes::geo_node_point_distribute_exec(), blender::nodes::geo_node_point_rotate_exec(), blender::nodes::geo_node_point_scale_exec(), blender::nodes::geo_node_point_translate_exec(), blender::nodes::geo_node_random_attribute_exec(), blender::nodes::geo_node_subdivide_exec(), blender::nodes::geo_node_subdivision_surface_exec(), blender::nodes::geo_node_transform_exec(), blender::ed::spreadsheet::get_display_geometry_set(), mesh_build_data(), modifier_modify_mesh_and_geometry_set(), modifyMesh(), prepare_geometry_set_for_mesh_modifier(), blender::nodes::separate_geometry_set(), and take_pointcloud_ownership_from_geometry_set().
| Vector< const GeometryComponent * > GeometrySet::get_components_for_read | ( | ) | const |
Get all geometry components in this geometry set for read-only access.
Definition at line 162 of file geometry_set.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), and ptr.
Referenced by blender::bke::instances_attribute_foreach_recursive(), and blender::nodes::separate_geometry_set().
| const Mesh * GeometrySet::get_mesh_for_read | ( | ) | const |
Definition at line 228 of file geometry_set.cc.
References component().
Referenced by blender::nodes::attribute_calc_proximity(), compute_boundbox_without_instances(), blender::nodes::geo_node_boolean_exec(), blender::nodes::geo_node_edge_split_exec(), blender::nodes::geo_node_subdivide_exec(), blender::nodes::geo_node_subdivision_surface_exec(), and blender::bke::join_mesh_topology_and_builtin_attributes().
| Mesh * GeometrySet::get_mesh_for_write | ( | ) |
Definition at line 310 of file geometry_set.cc.
References component().
Referenced by blender::nodes::geo_node_transform_exec(), and blender::nodes::geo_node_triangulate_exec().
| const PointCloud * GeometrySet::get_pointcloud_for_read | ( | ) | const |
Definition at line 242 of file geometry_set.cc.
References component().
Referenced by blender::nodes::attribute_calc_proximity(), compute_boundbox_without_instances(), and blender::bke::join_mesh_topology_and_builtin_attributes().
| PointCloud * GeometrySet::get_pointcloud_for_write | ( | ) |
Definition at line 317 of file geometry_set.cc.
References component().
Referenced by blender::nodes::geo_node_transform_exec().
| const Volume * GeometrySet::get_volume_for_read | ( | ) | const |
Definition at line 249 of file geometry_set.cc.
References component().
Referenced by compute_boundbox_without_instances().
| Volume * GeometrySet::get_volume_for_write | ( | ) |
Definition at line 324 of file geometry_set.cc.
References component().
Referenced by blender::nodes::geo_node_transform_exec().
|
inline |
Definition at line 299 of file BKE_geometry_set.hh.
References BLI_STATIC_ASSERT.
| bool GeometrySet::has | ( | const GeometryComponentType | component_type | ) | const |
Definition at line 141 of file geometry_set.cc.
Referenced by blender::nodes::compute_geometry_set_instances_boundbox(), blender::ed::spreadsheet::data_source_from_geometry(), blender::nodes::geo_node_align_rotation_to_vector_exec(), blender::nodes::geo_node_attribute_clamp_exec(), blender::nodes::geo_node_attribute_color_ramp_exec(), blender::nodes::geo_node_attribute_combine_xyz_exec(), blender::nodes::geo_node_attribute_compare_exec(), blender::nodes::geo_node_attribute_convert_exec(), blender::nodes::geo_node_attribute_fill_exec(), blender::nodes::geo_node_attribute_map_range_exec(), blender::nodes::geo_node_attribute_math_exec(), blender::nodes::geo_node_attribute_mix_exec(), blender::nodes::geo_node_attribute_proximity_exec(), blender::nodes::geo_node_attribute_remove_exec(), blender::nodes::geo_node_attribute_sample_texture_exec(), blender::nodes::geo_node_attribute_separate_xyz_exec(), blender::nodes::geo_node_attribute_vector_math_exec(), blender::nodes::geo_node_point_instance_exec(), blender::nodes::geo_node_point_rotate_exec(), blender::nodes::geo_node_point_scale_exec(), blender::nodes::geo_node_point_translate_exec(), blender::nodes::geo_node_random_attribute_exec(), blender::bke::geometry_set_gather_instances_attribute_info(), blender::bke::join_attributes(), blender::bke::join_instance_groups_pointcloud(), modifier_modify_mesh_and_geometry_set(), and take_pointcloud_ownership_from_geometry_set().
| bool GeometrySet::has_instances | ( | ) | const |
Definition at line 263 of file geometry_set.cc.
References component().
Referenced by blender::nodes::geo_node_bounding_box_exec(), blender::nodes::geo_node_transform_exec(), blender::bke::geometry_set_collect_recursive(), blender::bke::geometry_set_realize_instances(), blender::bke::geometry_set_realize_mesh_for_modifier(), and prepare_geometry_set_for_mesh_modifier().
| bool GeometrySet::has_mesh | ( | ) | const |
Definition at line 235 of file geometry_set.cc.
References component().
Referenced by blender::nodes::attribute_calc_proximity(), blender::nodes::geo_node_edge_split_exec(), blender::nodes::geo_node_point_distribute_exec(), blender::nodes::geo_node_subdivide_exec(), blender::nodes::geo_node_subdivision_surface_exec(), blender::nodes::geo_node_transform_exec(), and blender::bke::join_mesh_topology_and_builtin_attributes().
| bool GeometrySet::has_pointcloud | ( | ) | const |
Definition at line 256 of file geometry_set.cc.
References component().
Referenced by blender::nodes::attribute_calc_proximity(), blender::nodes::geo_node_transform_exec(), blender::bke::geometry_set_realize_mesh_for_modifier(), blender::bke::join_mesh_topology_and_builtin_attributes(), and prepare_geometry_set_for_mesh_modifier().
| bool GeometrySet::has_volume | ( | ) | const |
Definition at line 270 of file geometry_set.cc.
References component().
Referenced by blender::nodes::geo_node_transform_exec().
| uint64_t GeometrySet::hash | ( | ) | const |
Definition at line 203 of file geometry_set.cc.
|
inline |
Definition at line 306 of file BKE_geometry_set.hh.
References BLI_STATIC_ASSERT.
| void GeometrySet::remove | ( | const GeometryComponentType | component_type | ) |
Definition at line 146 of file geometry_set.cc.
Referenced by blender::bke::geometry_set_realize_mesh_for_modifier(), and take_pointcloud_ownership_from_geometry_set().
| void GeometrySet::replace_mesh | ( | Mesh * | mesh, |
| GeometryOwnershipType | ownership = GeometryOwnershipType::Owned |
||
| ) |
Definition at line 296 of file geometry_set.cc.
References component(), and mesh.
Referenced by blender::nodes::geo_node_edge_split_exec(), and blender::nodes::geo_node_triangulate_exec().
| void GeometrySet::replace_pointcloud | ( | PointCloud * | pointcloud, |
| GeometryOwnershipType | ownership = GeometryOwnershipType::Owned |
||
| ) |
Definition at line 303 of file geometry_set.cc.
References PointCloudComponent::replace().
|
friend |
Definition at line 187 of file geometry_set.cc.
|
friend |