载入中...
搜索中...
未找到
SdfField3D.h
浏览该文件的文档.
60 [[nodiscard]] virtual SdfField3DGradientStatus gradient(float x, float y, float z, float& outNx, float& outNy,
110[[nodiscard]] EVENGINE_API_FOUNDATION Result<Value> encodeSdfField3DBlob(const SdfField3DBlob& blob);
116[[nodiscard]] EVENGINE_API_FOUNDATION Result<SdfField3DBlob> decodeSdfField3DBlob(const Value& value);
121[[nodiscard]] EVENGINE_API_FOUNDATION Result<void> validateSdfField3DBlob(const SdfField3DBlob& blob);
#define EVENGINE_API_FOUNDATION_INLINE
仅供"只有内联成员"的类型使用的组宏:拥有者 dllexport,消费方不导入。
Definition Export.h:170
Move-only, checked operation results for the common layer.
Owning, renderer-independent dynamic values.
Borrowed 3D signed-distance field for cross-module collision queries.
Definition SdfField3D.h:39
virtual float sample(float x, float y, float z) const =0
Sample signed distance at a world-space position.
virtual unsigned revision() const =0
Monotonic revision incremented after each successful field mutation.
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 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).
SdfField3DSampleKind
Dense regular-grid sample layout used by the shared SDF interchange blob.
Definition SdfField3D.h:24
@ VertexGrid
Result< Value > encodeSdfField3DBlob(const SdfField3DBlob &blob)
Encode a validated SDF blob to a Value object. @cost Copies the distance sample buffer into the Value...
Definition SdfField3D.cpp:35
Result< void > validateSdfField3DBlob(const SdfField3DBlob &blob)
Validate dimensions, finiteness and sample count without encoding.
Definition SdfField3D.cpp:17
@ Defined
Finite outward unit gradient written to the output components.
@ Undefined
Empty field or singularity; output components are unspecified.
Result< SdfField3DBlob > decodeSdfField3DBlob(const Value &value)
Decode a Value object into an owning SDF blob. @cost Allocates and copies the distance sample buffer ...
Definition SdfField3D.cpp:54
Portable dense SDF asset blob (schema id + version + samples).
Definition SdfField3D.h:89
std::vector< float > distances
Sample buffer in x-fastest, then y, then z order.
Definition SdfField3D.h:103