Borrows a MeshSdf as the shared ISdfField3D capability surface. 更多...
#include <MeshSdfField.h>
Public 成员函数 | |
| MeshSdfField ()=default | |
| Constructs an unbound adapter. | |
| void | bind (const MeshSdf &field) |
| Bind a live MeshSdf and bump the adapter revision. | |
| void | clear () |
| Clears the borrowed binding. | |
| bool | isBound () const |
| True when a field is currently bound. | |
| float | sample (float x, float y, float z) const override |
| Sample signed distance at a world-space position. | |
| SdfField3DGradientStatus | gradient (float x, float y, float z, float &outNx, float &outNy, float &outNz) const override |
| Approximate outward unit gradient at a world-space position. | |
| unsigned | revision () const override |
| Monotonic revision incremented after each successful field mutation. | |
| void | bounds (float &minX, float &minY, float &minZ, float &maxX, float &maxY, float &maxZ) const override |
| Axis-aligned world bounds of the sampled lattice (inclusive corners). | |
Public 成员函数 继承自 eve::ISdfField3D | |
| virtual | ~ISdfField3D ()=default |
| I sdf field 3 d. | |
额外继承的成员函数 | |
静态 Public 属性 继承自 eve::ISdfField3D | |
| static constexpr const char * | capabilityName = "ISdfField3D" |
详细描述
Borrows a MeshSdf as the shared ISdfField3D capability surface.
@ownership Borrows the field; clear or destroy the adapter before destroying the field. @thread Simulation-thread affine; no callbacks.
MeshSdf has no built-in revision counter; bind increments a local revision so consumers can invalidate caches when the borrowed field is replaced.
在文件 MeshSdfField.h 第 19 行定义.
构造及析构函数说明
◆ MeshSdfField()
|
default |
Constructs an unbound adapter.
成员函数说明
◆ bind()
Bind a live MeshSdf and bump the adapter revision.
- 参数
-
field Borrowed provider; must outlive this adapter while bound.
在文件 MeshSdfField.cpp 第 31 行定义.
◆ bounds()
|
overridevirtual |
Axis-aligned world bounds of the sampled lattice (inclusive corners).
- 参数
-
[out] minX Minimum X of the sample lattice. [out] minY Minimum Y of the sample lattice. [out] minZ Minimum Z of the sample lattice. [out] maxX Maximum X of the sample lattice. [out] maxY Maximum Y of the sample lattice. [out] maxZ Maximum Z of the sample lattice.
实现了 eve::ISdfField3D.
在文件 MeshSdfField.cpp 第 60 行定义.
引用了 eve::fluids::MeshSdf::cellSize, eve::fluids::MeshSdf::dims, eve::fluids::MeshSdf::origin , 以及 eve::fluids::ocean_script::vector().
◆ clear()
| void eve::fluids::MeshSdfField::clear | ( | ) |
Clears the borrowed binding.
在文件 MeshSdfField.cpp 第 35 行定义.
◆ gradient()
|
overridevirtual |
Approximate outward unit gradient at a world-space position.
- 参数
-
[out] outNx X component of the unit gradient when the status is Defined. [out] outNy Y component of the unit gradient when the status is Defined. [out] outNz Z component of the unit gradient when the status is Defined.
- 返回
- Defined when a finite gradient was written; Undefined at empty fields or singularities.
实现了 eve::ISdfField3D.
在文件 MeshSdfField.cpp 第 45 行定义.
引用了 eve::fluids::MeshSdf::cellSize, eve::Defined, g, eve::fluids::MeshSdf::gradient(), eve::Undefined, eve::fluids::ocean_script::vector(), x, y , 以及 z.
◆ isBound()
|
inline |
True when a field is currently bound.
在文件 MeshSdfField.h 第 34 行定义.
◆ revision()
|
overridevirtual |
Monotonic revision incremented after each successful field mutation.
Consumers use this to detect stale GPU uploads or cached contacts.
实现了 eve::ISdfField3D.
在文件 MeshSdfField.cpp 第 58 行定义.
◆ sample()
Sample signed distance at a world-space position.
- 返回
- Finite signed distance in world units, or +inf when unsupported.
实现了 eve::ISdfField3D.
在文件 MeshSdfField.cpp 第 40 行定义.
引用了 eve::fluids::MeshSdf::sample(), x, y , 以及 z.
该类的文档由以下文件生成:
- src/modules/fluids/MeshSdfField.h
- src/modules/fluids/MeshSdfField.cpp
Public 成员函数 继承自