Blender
V3.3
|
#include <geometry.h>
Public Types | |
enum | Type { MESH , HAIR , VOLUME , POINTCLOUD } |
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 |
![]() | |
ustring | name |
const NodeType * | type |
InternalNode | internal |
LeafNode | leaf |
Static Public Attributes | |
static const uint | MAX_MOTION_STEPS = 129 |
Additional Inherited Members | |
![]() | |
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 () |
![]() | |
template<typename T > | |
static T & | get_socket_value (const Node *node, const SocketType &socket) |
![]() | |
const NodeOwner * | owner |
int | ref_count {0} |
SocketModifiedFlags | socket_modified |
Definition at line 37 of file scene/geometry.h.
enum Geometry::Type |
Enumerator | |
---|---|
MESH | |
HAIR | |
VOLUME | |
POINTCLOUD |
Definition at line 41 of file scene/geometry.h.
Definition at line 48 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 67 of file scene/geometry.cpp.
References bvh, and Node::dereference_all_used_nodes().
|
pure virtual |
Implemented in PointCloud, Mesh, and Hair.
Reimplemented in PointCloud, Volume, Mesh, and Hair.
Definition at line 73 of file scene/geometry.cpp.
References Node::tag_modified(), transform_applied, transform_identity(), transform_negative_scaled, and transform_normal.
Referenced by Mesh::clear(), Hair::clear(), PointCloud::clear(), and Mesh::clear_non_sockets().
|
pure virtual |
Implemented in PointCloud, Mesh, and Hair.
Referenced by compute_bvh().
void Geometry::compute_bvh | ( | Device * | device, |
DeviceScene * | dscene, | ||
SceneParams * | params, | ||
Progress * | progress, | ||
size_t | n, | ||
size_t | total | ||
) |
Definition at line 182 of file scene/geometry.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, Node::name, 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 PointCloud, Mesh, and Hair.
Referenced by ImageTextureNode::cull_tiles().
bool Geometry::has_motion_blur | ( | ) | const |
Definition at line 249 of file scene/geometry.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, attributes, and AttributeSet::find().
Referenced by BVHBuild::add_reference_curves(), BVHBuild::add_reference_points(), BVHBuild::add_reference_triangles(), Mesh::add_vertex_normals(), GeometryManager::displace(), Hair::primitive_type(), Mesh::primitive_type(), and PointCloud::primitive_type().
bool Geometry::has_true_displacement | ( | ) | const |
Definition at line 170 of file scene/geometry.cpp.
References DISPLACE_BUMP, Shader::has_displacement, and node.
Referenced by ObjectManager::apply_static_transforms(), GeometryManager::device_update(), and GeometryManager::displace().
bool Geometry::has_voxel_attributes | ( | ) | const |
Definition at line 254 of file scene/geometry.cpp.
References ATTR_ELEMENT_VOXEL, AttributeSet::attributes, attributes, and Attribute::element.
|
inline |
Definition at line 141 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 160 of file scene/geometry.cpp.
References has_surface_bssrdf, and transform_applied.
Referenced by need_build_bvh().
|
inline |
Definition at line 136 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(), and Scene::update_kernel_features().
|
inline |
Definition at line 146 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 151 of file scene/geometry.h.
References geometry_type, and VOLUME.
Referenced by ObjectManager::device_update_object_transform().
int Geometry::motion_step | ( | float | time | ) | const |
Definition at line 132 of file scene/geometry.cpp.
References motion_time(), and time.
Referenced by Hair::copy_center_to_motion_step(), Mesh::copy_center_to_motion_step(), and PointCloud::copy_center_to_motion_step().
float Geometry::motion_time | ( | int | step | ) | const |
Definition at line 127 of file scene/geometry.cpp.
Referenced by motion_step().
bool Geometry::need_attribute | ( | Scene * | scene, |
AttributeStandard | std | ||
) |
Definition at line 84 of file scene/geometry.cpp.
References ATTR_STD_NONE, Shader::attributes, AttributeRequestSet::find(), Scene::need_global_attribute(), node, and scene.
Referenced by attr_create_generic(), attr_create_pointiness(), attr_create_random_per_island(), attr_create_subd_uv_map(), attr_create_uv_map(), create_mesh(), GeometryManager::device_update(), export_hair_curves(), export_pointcloud(), ExportCurveSegments(), sync_smoke_volume(), sync_volume_object(), and xml_read_mesh().
Definition at line 101 of file scene/geometry.cpp.
References Shader::attributes, AttributeRequestSet::find(), Node::name, and node.
Definition at line 153 of file scene/geometry.cpp.
References BVH_LAYOUT_METAL, 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 115 of file scene/geometry.cpp.
References Shader::attributes, node, and result.
|
pure virtual |
Implemented in PointCloud, Mesh, and Hair.
Referenced by ObjectManager::device_update_object_transform().
Definition at line 284 of file scene/geometry.cpp.
References need_update_rebuild, and Node::tag_modified().
Definition at line 265 of file scene/geometry.cpp.
References LightManager::EMISSIVE_MESH_MODIFIED, Scene::geometry_manager, GeometryManager::GEOMETRY_MODIFIED, Shader::has_surface_emission, Scene::light_manager, LightManager::MESH_NEED_REBUILD, need_update_rebuild, node, scene, GeometryManager::tag_update(), and LightManager::tag_update().
size_t Geometry::attr_map_offset |
Definition at line 71 of file scene/geometry.h.
Referenced by ObjectManager::device_update_geom_offsets(), Geometry(), and GeometryManager::update_svm_attributes().
AttributeSet Geometry::attributes |
Definition at line 51 of file scene/geometry.h.
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(), Hair::apply_transform(), Mesh::apply_transform(), PointCloud::apply_transform(), attr_create_generic(), attr_create_motion(), attr_create_pointiness(), attr_create_random_per_island(), attr_create_uv_map(), Mesh::clear(), Hair::clear(), PointCloud::clear(), Hair::compute_bounds(), Mesh::compute_bounds(), PointCloud::compute_bounds(), Object::compute_volume_step_size(), 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::device_update_attributes(), ObjectManager::device_update_object_transform(), GeometryManager::device_update_volume_images(), GeometryManager::displace(), EdgeDice::EdgeDice(), export_hair_curves(), export_hair_curves_motion(), export_hair_motion_validate_attribute(), export_pointcloud(), export_pointcloud_motion(), ExportCurveSegments(), ExportCurveSegmentsMotion(), Hair::get_uv_tiles(), Mesh::get_uv_tiles(), PointCloud::get_uv_tiles(), has_motion_blur(), has_voxel_attributes(), mikk_compute_tangents(), MikkUserData::MikkUserData(), Mesh::pack_normals(), read_shader_output(), BVH2::refit_primitives(), EdgeDice::reserve(), PointCloud::reserve(), Hair::reserve_curves(), Mesh::reserve_mesh(), PointCloud::resize(), Hair::resize_curves(), Mesh::resize_mesh(), sync_smoke_volume(), sync_volume_object(), Hair::update_shadow_transparency(), and xml_read_mesh().
BoundBox Geometry::bounds |
Definition at line 57 of file scene/geometry.h.
Referenced by PointCloud::Point::bounds_grow(), Mesh::Triangle::bounds_grow(), Hair::Curve::bounds_grow(), Hair::compute_bounds(), Mesh::compute_bounds(), PointCloud::compute_bounds(), and Geometry().
BVH* Geometry::bvh |
Definition at line 70 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 48 of file scene/geometry.h.
Referenced by AttributeSet::add(), 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(), LightManager::object_usable_as_light(), object_volume_density(), and BVHSpatialSplit::split_object_reference().
bool Geometry::has_surface_bssrdf |
Definition at line 76 of file scene/geometry.h.
Referenced by ObjectManager::apply_static_transforms(), Geometry(), and is_instanced().
bool Geometry::has_volume |
Definition at line 75 of file scene/geometry.h.
Referenced by Object::compute_volume_step_size(), and Geometry().
size_t Geometry::index |
Definition at line 83 of file scene/geometry.h.
Referenced by GeometryManager::device_update_attributes(), Mesh::get_subd_face(), and Hair::pack_curves().
|
static |
Definition at line 67 of file scene/geometry.h.
bool Geometry::need_update_bvh_for_offset |
Definition at line 80 of file scene/geometry.h.
Referenced by compute_bvh(), GeometryManager::geom_calc_offset(), and Geometry().
bool Geometry::need_update_rebuild |
Definition at line 79 of file scene/geometry.h.
Referenced by compute_bvh(), GeometryManager::create_volume_mesh(), GeometryManager::geom_calc_offset(), Geometry(), tag_bvh_update(), and tag_update().
size_t Geometry::prim_offset |
Definition at line 72 of file scene/geometry.h.
Referenced by BakeManager::device_update(), LightManager::device_update_distribution(), GeometryManager::device_update_mesh(), fill_shader_input(), GeometryManager::geom_calc_offset(), Geometry(), Hair::pack_curves(), BVH2::pack_instances(), Mesh::pack_verts(), and BVH2::refit_primitives().
bool Geometry::transform_applied |
Definition at line 58 of file scene/geometry.h.
Referenced by Mesh::add_face_normals(), ObjectManager::apply_static_transforms(), clear(), LightManager::device_update_distribution(), Geometry(), is_instanced(), Mesh::pack_normals(), and AttributeSet::update().
bool Geometry::transform_negative_scaled |
Definition at line 59 of file scene/geometry.h.
Referenced by Mesh::add_vertex_normals(), ObjectManager::apply_static_transforms(), clear(), GeometryManager::displace(), and Geometry().
Transform Geometry::transform_normal |
Definition at line 60 of file scene/geometry.h.
Referenced by Mesh::add_face_normals(), Mesh::apply_transform(), clear(), Geometry(), and Mesh::pack_normals().