Blender V4.5
BKE_volume_grid_fields.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "FN_field.hh"
8
9#ifdef WITH_OPENVDB
10
11# include "openvdb_fwd.hh"
12
13namespace blender::bke {
14
19class VoxelFieldContext : public fn::FieldContext {
20 private:
21 const openvdb::math::Transform &transform_;
22 Span<openvdb::Coord> voxels_;
23
24 public:
25 VoxelFieldContext(const openvdb::math::Transform &transform, Span<openvdb::Coord> voxels);
26
27 GVArray get_varray_for_input(const fn::FieldInput &field_input,
28 const IndexMask &mask,
29 ResourceScope &scope) const override;
30};
31
36class TilesFieldContext : public fn::FieldContext {
37 private:
38 const openvdb::math::Transform &transform_;
39 Span<openvdb::CoordBBox> tiles_;
40
41 public:
42 TilesFieldContext(const openvdb::math::Transform &transform,
43 const Span<openvdb::CoordBBox> tiles);
44
45 GVArray get_varray_for_input(const fn::FieldInput &field_input,
46 const IndexMask &mask,
47 ResourceScope &scope) const override;
48};
49
50} // namespace blender::bke
51
52#endif
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
ccl_gpu_kernel_postfix ccl_global KernelWorkTile * tiles
ccl_device_inline float2 mask(const MaskType mask, const float2 a)