|
Blender
V2.93
|
#include <geometry.h>
Inherits Node.
Public Types | |
| enum | Type { MESH , HAIR , VOLUME } |
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, int n, int total) |
| virtual void | pack_primitives (PackedBVH *pack, int object, uint visibility, PackFlags pack_flags)=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_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, 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) |
| 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 |
| 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 () |
| void | tag_modified () |
| void | clear_modified () |
| void | print_modified_sockets () const |
| const NodeOwner * | get_owner () const |
| void | set_owner (const NodeOwner *owner_) |
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 |
| size_t | optix_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) |
| template<typename T > | |
| void | set_if_different (const SocketType &input, array< T > &value) |
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 |
| SocketModifiedFlags | socket_modified |
Definition at line 68 of file geometry.h.
| enum Geometry::Type |
| Enumerator | |
|---|---|
| MESH | |
| HAIR | |
| VOLUME | |
Definition at line 72 of file geometry.h.
Definition at line 66 of file geometry.cpp.
References attr_map_offset, bounds, bvh, BoundBox::empty, has_surface_bssrdf, has_volume, need_update_bvh_for_offset, need_update_rebuild, NULL, optix_prim_offset, prim_offset, transform_applied, transform_identity(), transform_negative_scaled, and transform_normal.
|
virtual |
Definition at line 86 of file geometry.cpp.
References bvh.
|
pure virtual |
|
virtual |
Reimplemented in Volume, Mesh, and Hair.
Definition at line 91 of file geometry.cpp.
References Node::tag_modified(), transform_applied, transform_identity(), transform_negative_scaled, and transform_normal.
Referenced by Mesh::clear(), Hair::clear(), and Mesh::clear_non_sockets().
|
pure virtual |
Implemented in Mesh, and Hair.
Referenced by compute_bvh().
| void Geometry::compute_bvh | ( | Device * | device, |
| DeviceScene * | dscene, | ||
| SceneParams * | params, | ||
| Progress * | progress, | ||
| int | n, | ||
| int | total | ||
| ) |
Definition at line 199 of file geometry.cpp.
References BVHParams::best_bvh_layout(), Device::build_bvh(), KernelData::bvh, bvh, BVHParams::bvh_layout, BVHParams::bvh_type, BVHLayout, compute_bounds(), BVH::create(), BVHParams::curve_subdivisions, DeviceScene::data, BVH::geometry, Device::get_bvh_layout_mask(), Progress::get_cancel(), KernelBVH::have_curves, MEM_GUARDED_CALL, Node::name, need_build_bvh(), need_update_bvh_for_offset, need_update_rebuild, BVHParams::num_motion_curve_steps, BVHParams::num_motion_triangle_steps, BVH::objects, params, Progress::set_status(), string_printf(), BVHParams::use_spatial_split, and BVHParams::use_unaligned_nodes.
|
pure virtual |
Implemented in Mesh, and Hair.
Referenced by ImageTextureNode::cull_tiles().
| bool Geometry::has_motion_blur | ( | ) | const |
Definition at line 255 of file geometry.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, attributes, and AttributeSet::find().
Referenced by BVHBuild::add_reference_curves(), BVHBuild::add_reference_triangles(), Mesh::add_vertex_normals(), GeometryManager::displace(), Hair::pack_primitives(), and Mesh::pack_primitives().
| bool Geometry::has_true_displacement | ( | ) | const |
Definition at line 187 of file geometry.cpp.
References DISPLACE_BUMP, node, and shader().
Referenced by ObjectManager::apply_static_transforms(), GeometryManager::device_update(), GeometryManager::displace(), and Scene::get_requested_device_features().
| bool Geometry::has_voxel_attributes | ( | ) | const |
Definition at line 260 of file geometry.cpp.
References ATTR_ELEMENT_VOXEL, AttributeSet::attributes, attributes, and Attribute::element.
|
inline |
Definition at line 175 of file geometry.h.
References geometry_type, and HAIR.
Referenced by GeometryManager::device_update_bvh(), GeometryManager::device_update_mesh(), Scene::get_requested_device_features(), and GeometryManager::mesh_calc_offset().
| bool Geometry::is_instanced | ( | ) | const |
Definition at line 177 of file geometry.cpp.
References has_surface_bssrdf, and transform_applied.
Referenced by GeometryManager::device_update_bvh(), and need_build_bvh().
|
inline |
Definition at line 170 of file geometry.h.
References geometry_type, and MESH.
Referenced by GeometryManager::device_update_attributes(), GeometryManager::device_update_mesh(), emit_attribute_mapping(), Scene::get_requested_device_features(), and BlenderSync::sync_recalc().
|
inline |
Definition at line 180 of file geometry.h.
References geometry_type, and VOLUME.
| int Geometry::motion_step | ( | float | time | ) | const |
Definition at line 150 of file geometry.cpp.
References motion_time(), and time.
Referenced by Hair::copy_center_to_motion_step(), and Mesh::copy_center_to_motion_step().
| float Geometry::motion_time | ( | int | step | ) | const |
Definition at line 145 of file geometry.cpp.
Referenced by motion_step().
| bool Geometry::need_attribute | ( | Scene * | scene, |
| AttributeStandard | std | ||
| ) |
Definition at line 102 of file geometry.cpp.
References ATTR_STD_NONE, Scene::need_global_attribute(), node, scene, and shader().
Referenced by attr_create_generic(), attr_create_pointiness(), attr_create_random_per_island(), attr_create_sculpt_vertex_color(), attr_create_subd_uv_map(), attr_create_uv_map(), attr_create_vertex_color(), create_mesh(), GeometryManager::device_update(), ExportCurveSegments(), sync_smoke_volume(), sync_volume_object(), and xml_read_mesh().
| bool Geometry::need_attribute | ( | Scene * | scene, |
| ustring | name | ||
| ) |
Definition at line 119 of file geometry.cpp.
References Node::name, node, and shader().
| bool Geometry::need_build_bvh | ( | BVHLayout | layout | ) | const |
Definition at line 171 of file geometry.cpp.
References 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 133 of file geometry.cpp.
|
pure virtual |
Implemented in Mesh, and Hair.
Referenced by GeometryManager::device_update_bvh().
| void Geometry::tag_bvh_update | ( | bool | rebuild | ) |
Definition at line 290 of file geometry.cpp.
References need_update_rebuild, and Node::tag_modified().
| void Geometry::tag_update | ( | Scene * | scene, |
| bool | rebuild | ||
| ) |
Definition at line 271 of file geometry.cpp.
References LightManager::EMISSIVE_MESH_MODIFIED, Scene::geometry_manager, GeometryManager::GEOMETRY_MODIFIED, Scene::light_manager, LightManager::MESH_NEED_REBUILD, need_update_rebuild, node, scene, shader(), GeometryManager::tag_update(), and LightManager::tag_update().
| size_t Geometry::attr_map_offset |
Definition at line 101 of file geometry.h.
Referenced by ObjectManager::device_update_mesh_offsets(), Geometry(), and GeometryManager::update_svm_attributes().
| AttributeSet Geometry::attributes |
Definition at line 81 of file geometry.h.
Referenced by Mesh::add_face_normals(), BVHBuild::add_reference_curves(), BVHBuild::add_reference_triangles(), Mesh::add_undisplaced(), Mesh::add_vertex_normals(), Hair::apply_transform(), Mesh::apply_transform(), attr_create_generic(), attr_create_pointiness(), attr_create_random_per_island(), attr_create_sculpt_vertex_color(), attr_create_uv_map(), attr_create_vertex_color(), Mesh::clear(), Hair::clear(), Hair::compute_bounds(), Mesh::compute_bounds(), Object::compute_volume_step_size(), Hair::copy_center_to_motion_step(), Mesh::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_motion_validate_attribute(), ExportCurveSegments(), ExportCurveSegmentsMotion(), Hair::get_uv_tiles(), Mesh::get_uv_tiles(), has_motion_blur(), has_voxel_attributes(), mikk_compute_tangents(), MikkUserData::MikkUserData(), Mesh::pack_normals(), BVH2::refit_primitives(), EdgeDice::reserve(), Hair::reserve_curves(), Mesh::reserve_mesh(), Hair::resize_curves(), Mesh::resize_mesh(), sync_mesh_cached_velocities(), sync_mesh_fluid_motion(), sync_smoke_volume(), sync_volume_object(), and xml_read_mesh().
| BoundBox Geometry::bounds |
Definition at line 87 of file geometry.h.
Referenced by Mesh::Triangle::bounds_grow(), Hair::Curve::bounds_grow(), Hair::compute_bounds(), Mesh::compute_bounds(), and Geometry().
| BVH* Geometry::bvh |
Definition at line 100 of file geometry.h.
Referenced by MultiDevice::build_bvh(), compute_bvh(), Geometry(), BVH2::pack_instances(), and ~Geometry().
| Type Geometry::geometry_type |
Definition at line 78 of file geometry.h.
Referenced by AttributeSet::add(), BVHBuild::add_reference_geometry(), ObjectManager::apply_static_transforms(), count_primitives(), GeometryManager::device_update(), GeometryManager::device_update_bvh(), GeometryManager::device_update_mesh(), ObjectManager::device_update_mesh_offsets(), ObjectManager::device_update_object_transform(), Attribute::element_size(), is_hair(), is_mesh(), is_volume(), GeometryManager::mesh_calc_offset(), LightManager::object_usable_as_light(), object_volume_density(), and BVHSpatialSplit::split_object_reference().
| bool Geometry::has_surface_bssrdf |
Definition at line 107 of file geometry.h.
Referenced by ObjectManager::apply_static_transforms(), Geometry(), and is_instanced().
| bool Geometry::has_volume |
Definition at line 106 of file geometry.h.
Referenced by Object::compute_volume_step_size(), and Geometry().
| size_t Geometry::index |
Definition at line 114 of file geometry.h.
Referenced by GeometryManager::device_update_attributes(), Mesh::get_subd_face(), and Hair::pack_primitives().
|
static |
Definition at line 97 of file geometry.h.
| bool Geometry::need_update_bvh_for_offset |
Definition at line 111 of file geometry.h.
Referenced by compute_bvh(), Geometry(), and GeometryManager::mesh_calc_offset().
| bool Geometry::need_update_rebuild |
Definition at line 110 of file geometry.h.
Referenced by compute_bvh(), GeometryManager::create_volume_mesh(), Geometry(), GeometryManager::mesh_calc_offset(), tag_bvh_update(), and tag_update().
| size_t Geometry::optix_prim_offset |
Definition at line 103 of file geometry.h.
Referenced by Geometry(), GeometryManager::mesh_calc_offset(), Hair::pack_primitives(), and Mesh::pack_primitives().
| size_t Geometry::prim_offset |
Definition at line 102 of file geometry.h.
Referenced by LightManager::device_update_distribution(), GeometryManager::device_update_mesh(), GeometryManager::displace(), Geometry(), GeometryManager::mesh_calc_offset(), BVH2::pack_instances(), Hair::pack_primitives(), Mesh::pack_primitives(), and BVH2::refit_primitives().
| bool Geometry::transform_applied |
Definition at line 88 of file 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 89 of file geometry.h.
Referenced by Mesh::add_vertex_normals(), ObjectManager::apply_static_transforms(), clear(), GeometryManager::displace(), and Geometry().
| Transform Geometry::transform_normal |
Definition at line 90 of file geometry.h.
Referenced by Mesh::add_face_normals(), Mesh::apply_transform(), clear(), Geometry(), and Mesh::pack_normals().