|
Blender V5.3
|
#include <pointcloud.h>
Inherits Geometry.
Classes | |
| struct | Point |
Public Types | |
| enum | RenderAs { RENDER_AS_POINTS , RENDER_AS_GSPLATS } |
| Public Types inherited from Geometry | |
| enum | Type { MESH , HAIR , VOLUME , POINTCLOUD , AREA_LIGHT , BACKGROUND_LIGHT , POINT_LIGHT , SPOT_LIGHT , SUN_LIGHT } |
Public Member Functions | |
| PointCloud () | |
| ~PointCloud () override | |
| void | clear_non_sockets () |
| void | clear (const bool preserve_shaders=false) override |
| void | resize (const int numpoints) |
| void | copy_center_to_motion_step (const int motion_step) |
| void | compute_bounds () override |
| void | apply_transform (const Transform &tfm, const bool apply_to_motion) override |
| Point | get_point (const int i) const |
| size_t | num_points () const |
| size_t | num_attributes () const |
| void | get_uv_tiles (ustring map, unordered_set< int > &tiles) override |
| PrimitiveType | primitive_type () const override |
| void | pack (Scene *scene, uint *packed_shader) |
| void | update_gsplat_radii () |
| void | create_missing_gsplat_attributes () |
| Public Member Functions inherited from Geometry | |
| const packed_float3 * | get_position () const |
| packed_float3 * | get_position_for_write () |
| void | tag_position_modified () |
| bool | position_is_modified () const |
| const float * | get_radius () const |
| float * | get_radius_for_write () |
| void | tag_radius_modified () |
| bool | radius_is_modified () const |
| Geometry (const NodeType *node_type, const Type type) | |
| ~Geometry () override | |
| bool | need_attribute (const Scene *scene, AttributeStandard std) |
| bool | need_attribute (Scene *scene, ustring name) |
| AttributeRequestSet | needed_attributes () |
| float | motion_time (const int step) const |
| int | motion_step (const float time) const |
| void | compute_bvh (Device *device, DeviceScene *dscene, SceneParams *params, Progress *progress, const size_t n, size_t total) |
| bool | need_build_bvh (BVHLayout layout) const |
| bool | is_instanced () const |
| bool | has_true_displacement () const |
| virtual 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 |
| bool | is_light () const |
| void | tag_update (Scene *scene, 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, const int value) |
| void | set (const SocketType &input, const uint value) |
| void | set (const SocketType &input, const uint64_t value) |
| void | set (const SocketType &input, const float value) |
| void | set (const SocketType &input, const float2 value) |
| void | set (const SocketType &input, const 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< packed_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< packed_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 &socket) const |
| void | copy_value (const SocketType &socket, const Node &other, const SocketType &other_socket) |
| void | set_value (const SocketType &socket, const Node &other, const SocketType &other_socket) |
| 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 () |
Static Public Attributes | |
| static const float4 | DEFAULT_GSPLAT_RADIANCE_BASE = make_float4(0.0f, 0.0f, 0.0f, 0.5f) |
| static const float3 | DEFAULT_GSPLAT_SCALE = make_float3(1e-3f, 1e-3f, 1e-3f) |
| Static Public Attributes inherited from Geometry | |
| static const uint | MAX_MOTION_STEPS = 129 |
Friends | |
| class | BVH2 |
| class | BVHBuild |
| class | BVHSpatialSplit |
| class | DiagSplit |
| class | EdgeDice |
| class | GeometryManager |
| class | ObjectManager |
Additional Inherited Members | |
| Public Attributes inherited from Geometry | |
| Type | geometry_type |
| AttributeSet | attributes |
| BoundBox | bounds |
| bool | transform_applied |
| bool | transform_negative_scaled |
| Transform | transform_normal |
| unique_ptr< 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 |
| 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 11 of file scene/pointcloud.h.
| enum PointCloud::RenderAs |
| Enumerator | |
|---|---|
| RENDER_AS_POINTS | |
| RENDER_AS_GSPLATS | |
Definition at line 15 of file scene/pointcloud.h.
| PointCloud::PointCloud | ( | ) |
Definition at line 85 of file scene/pointcloud.cpp.
References Geometry::Geometry(), and Geometry::POINTCLOUD.
|
overridedefault |
|
overridevirtual |
Implements Geometry.
Definition at line 237 of file scene/pointcloud.cpp.
References ATTR_STD_POSITION, ATTR_STD_RADIUS, Geometry::attributes, cross, Attribute::data_for_write(), dot(), fabsf, AttributeSet::find(), Geometry::get_position_for_write(), Geometry::get_radius_for_write(), Attribute::has_motion(), Attribute::motion, num_points(), powf, step, transform_get_column(), and transform_point().
Referenced by ~PointCloud().
|
overridevirtual |
Reimplemented from Geometry.
Definition at line 117 of file scene/pointcloud.cpp.
References Geometry::attributes, AttributeSet::clear(), Geometry::clear(), Geometry::tag_position_modified(), and Geometry::tag_radius_modified().
Referenced by ~PointCloud().
| void PointCloud::clear_non_sockets | ( | ) |
Definition at line 112 of file scene/pointcloud.cpp.
References Geometry::clear().
Referenced by ~PointCloud().
|
overridevirtual |
Implements Geometry.
Definition at line 185 of file scene/pointcloud.cpp.
References ATTR_STD_POSITION, ATTR_STD_RADIUS, Geometry::attributes, Geometry::bounds, Attribute::data(), BoundBox::empty, AttributeSet::find(), Geometry::get_position(), Geometry::get_radius(), BoundBox::grow(), BoundBox::grow_safe(), Attribute::has_motion(), make_float3(), Attribute::num_motion_steps(), num_points(), and BoundBox::valid().
Referenced by ~PointCloud().
| void PointCloud::copy_center_to_motion_step | ( | const int | motion_step | ) |
Definition at line 130 of file scene/pointcloud.cpp.
References ATTR_STD_GSPLAT_RADIANCE_BASE, ATTR_STD_GSPLAT_ROTATION, ATTR_STD_GSPLAT_SCALE, ATTR_STD_POSITION, ATTR_STD_RADIUS, Geometry::attributes, Attribute::data_for_write(), AttributeSet::find(), Geometry::get_position(), Geometry::get_radius(), Attribute::has_motion(), Geometry::motion_step(), and num_points().
Referenced by export_pointcloud_motion(), and ~PointCloud().
| void PointCloud::create_missing_gsplat_attributes | ( | ) |
Definition at line 370 of file scene/pointcloud.cpp.
References AttributeSet::add(), ATTR_STD_GSPLAT_RADIANCE_BASE, ATTR_STD_GSPLAT_ROTATION, ATTR_STD_GSPLAT_SCALE, Geometry::attributes, DEFAULT_GSPLAT_RADIANCE_BASE, DEFAULT_GSPLAT_SCALE, AttributeSet::find(), identity_quaternion(), num_points(), and scale().
Referenced by export_pointcloud_gsplat_attributes().
|
inline |
Definition at line 67 of file scene/pointcloud.h.
Referenced by BVHBuild::add_reference_points(), and BVH2::refit_primitives().
|
overridevirtual |
Implements Geometry.
Definition at line 169 of file scene/pointcloud.cpp.
References ATTR_PRIM_GEOMETRY, ATTR_STD_UV, Geometry::attributes, AttributeSet::find(), Attribute::get_uv_tiles(), and tiles.
|
inline |
Definition at line 79 of file scene/pointcloud.h.
|
inline |
Definition at line 73 of file scene/pointcloud.h.
References ATTR_STD_POSITION, Geometry::attributes, AttributeSet::find(), and Attribute::size.
Referenced by BVHBuild::add_reference_points(), apply_transform(), attr_create_motion_from_velocity(), compute_bounds(), copy_center_to_motion_step(), count_primitives(), create_missing_gsplat_attributes(), ObjectManager::device_update_geom_offsets(), GeometryManager::device_update_mesh(), Attribute::element_size(), export_pointcloud_gsplat_attributes(), export_pointcloud_motion(), export_pointcloud_motion_gsplat_attributes(), GeometryManager::geom_calc_offset(), pack(), BVHSpatialSplit::split_object_reference(), update_gsplat_radii(), and Scene::update_kernel_features().
| void PointCloud::pack | ( | Scene * | scene, |
| uint * | packed_shader ) |
Definition at line 279 of file scene/pointcloud.cpp.
References Scene::default_gsplat, Scene::default_surface, num_points(), PRIMITIVE_GSPLAT, primitive_type(), and Scene::shader_manager.
Referenced by GeometryManager::device_update_mesh().
|
overridevirtual |
Implements Geometry.
Definition at line 395 of file scene/pointcloud.cpp.
References ATTR_STD_GSPLAT_RADIANCE_BASE, ATTR_STD_GSPLAT_ROTATION, ATTR_STD_GSPLAT_SCALE, Geometry::attributes, AttributeSet::find(), Geometry::has_motion_blur(), PRIMITIVE_GSPLAT, PRIMITIVE_MOTION_GSPLAT, PRIMITIVE_MOTION_POINT, PRIMITIVE_POINT, and RENDER_AS_GSPLATS.
Referenced by BVHBuild::add_reference_points(), ObjectManager::apply_static_transforms(), ObjectManager::device_update_geom_offsets(), ObjectManager::device_update_object_transform(), pack(), update_gsplat_radii(), and Scene::update_kernel_features().
| void PointCloud::resize | ( | const int | numpoints | ) |
Definition at line 98 of file scene/pointcloud.cpp.
References AttributeSet::add(), ATTR_STD_POSITION, ATTR_STD_RADIUS, Geometry::attributes, Attribute::resize(), AttributeSet::resize(), Geometry::tag_position_modified(), and Geometry::tag_radius_modified().
Referenced by export_pointcloud(), and ~PointCloud().
| void PointCloud::update_gsplat_radii | ( | ) |
Definition at line 301 of file scene/pointcloud.cpp.
References ATTR_STD_GSPLAT_RADIANCE_BASE, ATTR_STD_GSPLAT_SCALE, ATTR_STD_RADIUS, Geometry::attributes, Attribute::data(), fabs(), AttributeSet::find(), Geometry::get_radius_for_write(), Attribute::has_motion(), logf, num_points(), PRIMITIVE_GSPLAT, primitive_type(), reduce_max(), scale(), sqrtf, step, and w().
Referenced by GeometryManager::device_update().
|
friend |
|
friend |
|
friend |
Definition at line 111 of file scene/pointcloud.h.
References BVHSpatialSplit.
Referenced by BVHSpatialSplit.
|
friend |
|
friend |
|
friend |
Definition at line 114 of file scene/pointcloud.h.
References GeometryManager.
Referenced by GeometryManager.
|
friend |
Definition at line 115 of file scene/pointcloud.h.
References ObjectManager.
Referenced by ObjectManager.
|
inlinestatic |
Definition at line 22 of file scene/pointcloud.h.
Referenced by create_missing_gsplat_attributes(), and export_pointcloud_motion_gsplat_attributes().
|
inlinestatic |
Definition at line 23 of file scene/pointcloud.h.
Referenced by create_missing_gsplat_attributes(), and export_pointcloud_motion_gsplat_attributes().