Cleanup: avoid openvdb include in general in common header
This commit is contained in:
@@ -16,10 +16,6 @@
|
||||
|
||||
#include "node_util.hh"
|
||||
|
||||
#ifdef WITH_OPENVDB
|
||||
# include <openvdb/Types.h>
|
||||
#endif
|
||||
|
||||
struct BVHTreeFromMesh;
|
||||
struct GeometrySet;
|
||||
namespace blender::nodes {
|
||||
@@ -65,17 +61,6 @@ void get_closest_in_bvhtree(BVHTreeFromMesh &tree_data,
|
||||
|
||||
int apply_offset_in_cyclic_range(IndexRange range, int start_index, int offset);
|
||||
|
||||
#ifdef WITH_OPENVDB
|
||||
/**
|
||||
* Initializes the VolumeComponent of a GeometrySet with a new Volume from points.
|
||||
* The grid class should be either openvdb::GRID_FOG_VOLUME or openvdb::GRID_LEVEL_SET.
|
||||
*/
|
||||
void initialize_volume_component_from_points(GeoNodeExecParams ¶ms,
|
||||
const NodeGeometryPointsToVolume &storage,
|
||||
GeometrySet &r_geometry_set,
|
||||
openvdb::GridClass gridClass);
|
||||
#endif
|
||||
|
||||
class EvaluateAtIndexInput final : public bke::GeometryFieldInput {
|
||||
private:
|
||||
Field<int> index_field_;
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
#include "UI_interface.hh"
|
||||
#include "UI_resources.hh"
|
||||
|
||||
namespace blender::nodes::node_geo_points_to_volume_cc {
|
||||
|
||||
#ifdef WITH_OPENVDB
|
||||
namespace blender::nodes {
|
||||
|
||||
static void gather_point_data_from_component(Field<float> radius_field,
|
||||
const GeometryComponent &component,
|
||||
Vector<float3> &r_positions,
|
||||
@@ -80,10 +82,14 @@ static void convert_to_grid_index_space(const float voxel_size,
|
||||
}
|
||||
}
|
||||
|
||||
void initialize_volume_component_from_points(GeoNodeExecParams ¶ms,
|
||||
const NodeGeometryPointsToVolume &storage,
|
||||
GeometrySet &r_geometry_set,
|
||||
openvdb::GridClass gridClass)
|
||||
/**
|
||||
* Initializes the VolumeComponent of a GeometrySet with a new Volume from points.
|
||||
* The grid class should be either openvdb::GRID_FOG_VOLUME or openvdb::GRID_LEVEL_SET.
|
||||
*/
|
||||
static void initialize_volume_component_from_points(GeoNodeExecParams ¶ms,
|
||||
const NodeGeometryPointsToVolume &storage,
|
||||
GeometrySet &r_geometry_set,
|
||||
openvdb::GridClass gridClass)
|
||||
{
|
||||
Vector<float3> positions;
|
||||
Vector<float> radii;
|
||||
@@ -137,10 +143,8 @@ void initialize_volume_component_from_points(GeoNodeExecParams ¶ms,
|
||||
r_geometry_set.keep_only_during_modify({GeometryComponent::Type::Volume});
|
||||
r_geometry_set.replace_volume(volume);
|
||||
}
|
||||
} // namespace blender::nodes
|
||||
#endif
|
||||
|
||||
namespace blender::nodes::node_geo_points_to_volume_cc {
|
||||
#endif /* WITH_OPENVDB */
|
||||
|
||||
NODE_STORAGE_FUNCS(NodeGeometryPointsToVolume)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user