// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { public static partial class Jolt { public static unsafe partial class PInvoke { /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:45 ///
/// HeightFieldShapeSettings() = default ///
///
/// /// /// Default constructor for deserialization /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_Create")] public static partial HeightFieldShapeSettings HeightFieldShapeSettings_Create(); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:41 ///
/// ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetRTTI")] public static partial RTTI HeightFieldShapeSettings_GetRTTI(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:41 ///
/// ///
///
[LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_CastTo")] public static partial void* HeightFieldShapeSettings_CastTo(HeightFieldShapeSettings self, RTTI rTTI); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:56 ///
/// virtual ShapeResult Create() const override ///
///
/// /// /// See: ShapeSettings /// /// /// Returns a null handle when the operation fails; call Jolt.GetLastError() for Jolt's error message. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_CreateShape")] public static partial Shape HeightFieldShapeSettings_CreateShape(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:62 ///
/// void DetermineMinAndMaxSample(float &outMinValue, float &outMaxValue, float &outQuantizationScale) const ///
///
/// /// /// Determine the minimal and maximal value of mHeightSamples (will ignore cNoCollisionValue) /// @param outMinValue The minimal value of mHeightSamples or FLT_MAX if no samples have collision /// @param outMaxValue The maximal value of mHeightSamples or -FLT_MAX if no samples have collision /// @param outQuantizationScale (value - outMinValue) * outQuantizationScale quantizes a height sample to 16 bits /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_DetermineMinAndMaxSample")] public static partial void HeightFieldShapeSettings_DetermineMinAndMaxSample(HeightFieldShapeSettings self, out float minValue, out float maxValue, out float quantizationScale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:67 ///
/// uint32 CalculateBitsPerSampleForError(float inMaxError) const ///
///
/// /// /// Given mBlockSize, mSampleCount and mHeightSamples, calculate the amount of bits needed to stay below absolute error inMaxError /// @param inMaxError Maximum allowed error in mHeightSamples after compression (note that this does not take mScale.Y into account) /// @return Needed bits per sample in the range [1, 8]. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_CalculateBitsPerSampleForError")] public static partial uint HeightFieldShapeSettings_CalculateBitsPerSampleForError(HeightFieldShapeSettings self, float maxError); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:71 ///
/// Vec3 mOffset = Vec3::sZero() ///
///
/// /// /// The height field is a surface defined by: mOffset + mScale * (x, mHeightSamples[y * mSampleCount + x], y). /// where x and y are integers in the range x and y e [0, mSampleCount - 1]. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetOffset")] public static partial float3 HeightFieldShapeSettings_GetOffset(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:71 ///
/// Vec3 mOffset = Vec3::sZero() ///
///
/// /// /// The height field is a surface defined by: mOffset + mScale * (x, mHeightSamples[y * mSampleCount + x], y). /// where x and y are integers in the range x and y e [0, mSampleCount - 1]. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetOffset")] public static partial void HeightFieldShapeSettings_SetOffset(HeightFieldShapeSettings self, float3 value); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:72 ///
/// Vec3 mScale = Vec3::sOne() ///
///
[LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetScale")] public static partial float3 HeightFieldShapeSettings_GetScale(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:72 ///
/// Vec3 mScale = Vec3::sOne() ///
///
[LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetScale")] public static partial void HeightFieldShapeSettings_SetScale(HeightFieldShapeSettings self, float3 value); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:73 ///
/// uint32 mSampleCount = 0 ///
///
[LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetSampleCount")] public static partial uint HeightFieldShapeSettings_GetSampleCount(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:73 ///
/// uint32 mSampleCount = 0 ///
///
[LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetSampleCount")] public static partial void HeightFieldShapeSettings_SetSampleCount(HeightFieldShapeSettings self, uint value); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:76 ///
/// float mMinHeightValue = cLargeFloat ///
///
/// /// /// Artificial minimal value of mHeightSamples, used for compression and can be used to update the /// terrain after creating with lower height values. If there are any lower values in mHeightSamples, /// this value will be ignored. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetMinHeightValue")] public static partial float HeightFieldShapeSettings_GetMinHeightValue(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:76 ///
/// float mMinHeightValue = cLargeFloat ///
///
/// /// /// Artificial minimal value of mHeightSamples, used for compression and can be used to update the /// terrain after creating with lower height values. If there are any lower values in mHeightSamples, /// this value will be ignored. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetMinHeightValue")] public static partial void HeightFieldShapeSettings_SetMinHeightValue(HeightFieldShapeSettings self, float value); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:79 ///
/// float mMaxHeightValue = -cLargeFloat ///
///
/// /// /// Artificial maximum value of mHeightSamples, used for compression and can be used to update the /// terrain after creating with higher height values. If there are any higher values in mHeightSamples, /// this value will be ignored. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetMaxHeightValue")] public static partial float HeightFieldShapeSettings_GetMaxHeightValue(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:79 ///
/// float mMaxHeightValue = -cLargeFloat ///
///
/// /// /// Artificial maximum value of mHeightSamples, used for compression and can be used to update the /// terrain after creating with higher height values. If there are any higher values in mHeightSamples, /// this value will be ignored. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetMaxHeightValue")] public static partial void HeightFieldShapeSettings_SetMaxHeightValue(HeightFieldShapeSettings self, float value); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:83 ///
/// uint32 mMaterialsCapacity = 0 ///
///
/// /// /// When bigger than mMaterials.size() the internal material list will be preallocated to support this number of materials. /// This avoids reallocations when calling HeightFieldShape::SetMaterials with new materials later. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetMaterialsCapacity")] public static partial uint HeightFieldShapeSettings_GetMaterialsCapacity(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:83 ///
/// uint32 mMaterialsCapacity = 0 ///
///
/// /// /// When bigger than mMaterials.size() the internal material list will be preallocated to support this number of materials. /// This avoids reallocations when calling HeightFieldShape::SetMaterials with new materials later. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetMaterialsCapacity")] public static partial void HeightFieldShapeSettings_SetMaterialsCapacity(HeightFieldShapeSettings self, uint value); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:88 ///
/// uint32 mBlockSize = 2 ///
///
/// /// /// The heightfield is divided in blocks of mBlockSize * mBlockSize * 2 triangles and the acceleration structure culls blocks only, /// bigger block sizes reduce memory consumption but also reduce query performance. Sensible values are [2, 8], does not need to be /// a power of 2. Note that at run-time we'll perform one more grid subdivision, so the effective block size is half of what is provided here. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetBlockSize")] public static partial uint HeightFieldShapeSettings_GetBlockSize(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:88 ///
/// uint32 mBlockSize = 2 ///
///
/// /// /// The heightfield is divided in blocks of mBlockSize * mBlockSize * 2 triangles and the acceleration structure culls blocks only, /// bigger block sizes reduce memory consumption but also reduce query performance. Sensible values are [2, 8], does not need to be /// a power of 2. Note that at run-time we'll perform one more grid subdivision, so the effective block size is half of what is provided here. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetBlockSize")] public static partial void HeightFieldShapeSettings_SetBlockSize(HeightFieldShapeSettings self, uint value); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:93 ///
/// uint32 mBitsPerSample = 8 ///
///
/// /// /// How many bits per sample to use to compress the height field. Can be in the range [1, 8]. /// Note that each sample is compressed relative to the min/max value of its block of mBlockSize * mBlockSize pixels so the effective precision is higher. /// Also note that increasing mBlockSize saves more memory than reducing the amount of bits per sample. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetBitsPerSample")] public static partial uint HeightFieldShapeSettings_GetBitsPerSample(HeightFieldShapeSettings self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:93 ///
/// uint32 mBitsPerSample = 8 ///
///
/// /// /// How many bits per sample to use to compress the height field. Can be in the range [1, 8]. /// Note that each sample is compressed relative to the min/max value of its block of mBlockSize * mBlockSize pixels so the effective precision is higher. /// Also note that increasing mBlockSize saves more memory than reducing the amount of bits per sample. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetBitsPerSample")] public static partial void HeightFieldShapeSettings_SetBitsPerSample(HeightFieldShapeSettings self, uint value); /// /// /// cos(5 degrees) /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:107 ///
/// float mActiveEdgeCosThresholdAngle = 0.996195f ///
///
/// /// /// Cosine of the threshold angle (if the angle between the two triangles is bigger than this, the edge is active, note that a concave edge is always inactive). /// Setting this value too small can cause ghost collisions with edges, setting it too big can cause depenetration artifacts (objects not depenetrating quickly). /// Valid ranges are between cos(0 degrees) and cos(90 degrees). The default value is cos(5 degrees). /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetActiveEdgeCosThresholdAngle")] public static partial float HeightFieldShapeSettings_GetActiveEdgeCosThresholdAngle(HeightFieldShapeSettings self); /// /// /// cos(5 degrees) /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:107 ///
/// float mActiveEdgeCosThresholdAngle = 0.996195f ///
///
/// /// /// Cosine of the threshold angle (if the angle between the two triangles is bigger than this, the edge is active, note that a concave edge is always inactive). /// Setting this value too small can cause ghost collisions with edges, setting it too big can cause depenetration artifacts (objects not depenetrating quickly). /// Valid ranges are between cos(0 degrees) and cos(90 degrees). The default value is cos(5 degrees). /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_SetActiveEdgeCosThresholdAngle")] public static partial void HeightFieldShapeSettings_SetActiveEdgeCosThresholdAngle(HeightFieldShapeSettings self, float value); [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_AddRef")] public static partial void HeightFieldShapeSettings_AddRef(HeightFieldShapeSettings self); [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_Release")] public static partial void HeightFieldShapeSettings_Release(HeightFieldShapeSettings self); [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_GetRefCount")] public static partial uint HeightFieldShapeSettings_GetRefCount(HeightFieldShapeSettings self); [LibraryImport("jolt", EntryPoint = "HeightFieldShapeSettings_AsShapeSettings")] public static partial ShapeSettings HeightFieldShapeSettings_AsShapeSettings(HeightFieldShapeSettings self); } } }