Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_points_to_volume.cc
| Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | static void gather_point_data_from_component(const GeoNodeExecParams ¶ms, | ||||
| } | } | ||||
| } | } | ||||
| static void convert_to_grid_index_space(const float voxel_size, | static void convert_to_grid_index_space(const float voxel_size, | ||||
| MutableSpan<float3> positions, | MutableSpan<float3> positions, | ||||
| MutableSpan<float> radii) | MutableSpan<float> radii) | ||||
| { | { | ||||
| const float voxel_size_inv = 1.0f / voxel_size; | const float voxel_size_inv = 1.0f / voxel_size; | ||||
| for (const int i : positions.index_range()) { | for (const int i : iter_indices(positions)) { | ||||
| positions[i] *= voxel_size_inv; | positions[i] *= voxel_size_inv; | ||||
| /* Better align generated grid with source points. */ | /* Better align generated grid with source points. */ | ||||
| positions[i] -= float3(0.5f); | positions[i] -= float3(0.5f); | ||||
| radii[i] *= voxel_size_inv; | radii[i] *= voxel_size_inv; | ||||
| } | } | ||||
| } | } | ||||
| static void initialize_volume_component_from_points(const GeometrySet &geometry_set_in, | static void initialize_volume_component_from_points(const GeometrySet &geometry_set_in, | ||||
| ▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines | |||||