Borrowed 3D signed-distance field for cross-module collision queries. 更多...
#include <SdfField3D.h>
Public 成员函数 | |
| virtual | ~ISdfField3D ()=default |
| I sdf field 3 d. | |
| virtual float | sample (float x, float y, float z) const =0 |
| Sample signed distance at a world-space position. | |
| virtual SdfField3DGradientStatus | gradient (float x, float y, float z, float &outNx, float &outNy, float &outNz) const =0 |
| Approximate outward unit gradient at a world-space position. | |
| virtual unsigned | revision () const =0 |
| Monotonic revision incremented after each successful field mutation. | |
| virtual void | bounds (float &minX, float &minY, float &minZ, float &maxX, float &maxY, float &maxZ) const =0 |
| Axis-aligned world bounds of the sampled lattice (inclusive corners). | |
静态 Public 属性 | |
| static constexpr const char * | capabilityName = "ISdfField3D" |
详细描述
Borrowed 3D signed-distance field for cross-module collision queries.
Negative samples are inside the solid. Providers live in higher modules (physics, fluids, gameplay) and register through capability wiring; consumers only sample this interface and never include provider headers.
@ownership Borrowed for the duration of the consumer binding. Callers must clear the binding before destroying the field. @thread Owner thread only; not reentrant from unknown callbacks.
在文件 SdfField3D.h 第 39 行定义.
构造及析构函数说明
◆ ~ISdfField3D()
|
virtualdefault |
I sdf field 3 d.
成员函数说明
◆ bounds()
|
pure virtual |
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::fluids::MeshSdfField , 以及 eve::physics::DistanceField3DSdf 内被实现.
◆ gradient()
|
pure virtual |
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::fluids::MeshSdfField , 以及 eve::physics::DistanceField3DSdf 内被实现.
◆ revision()
|
pure virtual |
Monotonic revision incremented after each successful field mutation.
Consumers use this to detect stale GPU uploads or cached contacts.
在 eve::fluids::MeshSdfField , 以及 eve::physics::DistanceField3DSdf 内被实现.
◆ sample()
|
pure virtual |
Sample signed distance at a world-space position.
- 返回
- Finite signed distance in world units, or +inf when unsupported.
在 eve::fluids::MeshSdfField , 以及 eve::physics::DistanceField3DSdf 内被实现.
类成员变量说明
◆ capabilityName
|
staticconstexpr |
在文件 SdfField3D.h 第 41 行定义.
该类的文档由以下文件生成:
- src/engine/common/SdfField3D.h