PxSdfSample
Defined in include/foundation/PxMathUtils.h
-
inline PxReal PxSdfSample(const PxReal *sdf, const PxVec3 &localPos, const PxVec3 &sdfBoxLower, const PxVec3 &sdfBoxHigher, const PxReal sdfDx, const PxReal invSdfDx, const PxU32 dimX, const PxU32 dimY, const PxU32 dimZ, PxVec3 &gradient, PxReal tolerance = PX_MAX_F32)
Samples the signed distance field (SDF) at a given local position with gradient computation (deprecated).
- Deprecated:
Please use PxSDFSample.
- Parameters
sdf – [in] A pointer to the SDF data
localPos – [in] The local position to sample the SDF
sdfBoxLower – [in] The lower bound of the SDF box
sdfBoxHigher – [in] The upper bound of the SDF box
sdfDx – [in] The spacing between grid points in the SDF
invSdfDx – [in] The inverse of the grid spacing
dimX – [in] The number of grid points along the x-axis
dimY – [in] The number of grid points along the y-axis
dimZ – [in] The number of grid points along the z-axis
gradient – [out] The resulting gradient vector
tolerance – [in] The tolerance for clamping the grid points (default is PX_MAX_F32)
- Returns
The sampled SDF value