// // 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:121 ///
/// HeightFieldShape() ///
///
/// /// /// Constructor /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_Create")] public static partial HeightFieldShape HeightFieldShape_Create(); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:126 ///
/// Ref<HeightFieldShape> Clone() const ///
///
/// /// /// Clone this shape. Can be used to avoid race conditions. See the documentation of this class for more /// information. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_Clone")] public static partial HeightFieldShape HeightFieldShape_Clone(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:129 ///
/// virtual bool MustBeStatic() const override ///
///
/// /// /// See Shape::MustBeStatic /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_MustBeStatic")] public static partial Brutal.Bool8 HeightFieldShape_MustBeStatic(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:132 ///
/// inline uint GetSampleCount() const ///
///
/// /// /// Get the size of the height field. Note that this will always be rounded up to the nearest multiple /// of GetBlockSize(). /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetSampleCount")] public static partial uint HeightFieldShape_GetSampleCount(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:135 ///
/// inline uint GetBlockSize() const ///
///
/// /// /// Get the size of a block /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetBlockSize")] public static partial uint HeightFieldShape_GetBlockSize(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:141 ///
/// virtual uint GetSubShapeIDBitsRecursive() const override ///
///
/// /// /// See Shape::GetSubShapeIDBitsRecursive /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetSubShapeIDBitsRecursive")] public static partial uint HeightFieldShape_GetSubShapeIDBitsRecursive(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:144 ///
/// virtual float GetInnerRadius() const override ///
///
/// /// /// See Shape::GetInnerRadius /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetInnerRadius")] public static partial float HeightFieldShape_GetInnerRadius(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:150 ///
/// virtual const PhysicsMaterial * GetMaterial(const SubShapeID &inSubShapeID) const override ///
///
/// /// /// See Shape::GetMaterial /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMaterial")] public static partial PhysicsMaterial HeightFieldShape_GetMaterial(HeightFieldShape self, uint subShapeID); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:153 ///
/// const PhysicsMaterial * GetMaterial(uint inX, uint inY) const ///
///
/// /// /// Overload to get the material at a particular location /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMaterial_2")] public static partial PhysicsMaterial HeightFieldShape_GetMaterial_2(HeightFieldShape self, uint x, uint y); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:156 ///
/// virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override ///
///
/// /// /// See Shape::GetSurfaceNormal /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetSurfaceNormal")] public static partial float3 HeightFieldShape_GetSurfaceNormal(HeightFieldShape self, uint subShapeID, float3 localSurfacePosition); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:162 ///
/// virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy JPH_IF_DEBUG_RENDERER(, RVec3Arg inBaseOffset)) const override ///
///
/// /// /// See Shape::GetSubmergedVolume /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetSubmergedVolume")] public static partial void HeightFieldShape_GetSubmergedVolume(HeightFieldShape self, float4x4 centerOfMassTransform, float3 scale, Plane surface, out float totalVolume, out float submergedVolume, out float3 centerOfBuoyancy, float3 baseOffset); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:166 ///
/// virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override ///
///
/// /// /// See Shape::Draw /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_Draw")] public static partial void HeightFieldShape_Draw(HeightFieldShape self, DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, Brutal.Bool8 useMaterialColors, Brutal.Bool8 drawWireframe); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:177 ///
/// virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &inVertices, uint inNumVertices, int inCollidingShapeIndex) const override ///
///
/// /// /// See: Shape::CollideSoftBodyVertices /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_CollideSoftBodyVertices")] public static partial void HeightFieldShape_CollideSoftBodyVertices(HeightFieldShape self, float4x4 centerOfMassTransform, float3 scale, CollideSoftBodyVertexIterator vertices, uint numVertices, int collidingShapeIndex); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:180 ///
/// virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override ///
///
/// /// /// See Shape::GetTrianglesStart /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetTrianglesStart")] public static partial void HeightFieldShape_GetTrianglesStart(HeightFieldShape self, ref Shape.GetTrianglesContext context, AABox box, float3 positionCOM, floatQuat rotation, float3 scale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:187 ///
/// Vec3 GetPosition(uint inX, uint inY) const ///
///
/// /// /// Get height field position at sampled location (inX, inY). /// where inX and inY are integers in the range inX e [0, mSampleCount - 1] and inY e [0, mSampleCount - 1]. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetPosition")] public static partial float3 HeightFieldShape_GetPosition(HeightFieldShape self, uint x, uint y); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:190 ///
/// bool IsNoCollision(uint inX, uint inY) const ///
///
/// /// /// Check if height field at sampled location (inX, inY) has collision (has a hole or not) /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_IsNoCollision")] public static partial Brutal.Bool8 HeightFieldShape_IsNoCollision(HeightFieldShape self, uint x, uint y); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:194 ///
/// bool ProjectOntoSurface(Vec3Arg inLocalPosition, Vec3 &outSurfacePosition, SubShapeID &outSubShapeID) const ///
///
/// /// /// Projects inLocalPosition (a point in the space of the shape) along the Y axis onto the surface and returns it in outSurfacePosition. /// When there is no surface position (because of a hole or because the point is outside the heightfield) the function will return false. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_ProjectOntoSurface")] public static partial Brutal.Bool8 HeightFieldShape_ProjectOntoSurface(HeightFieldShape self, float3 localPosition, out float3 surfacePosition, out uint subShapeID); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:204 ///
/// float GetMinHeightValue() const ///
///
/// /// /// Get the range of height values that this height field can encode. Can be used to determine the /// allowed range when setting the height values with SetHeights. /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMinHeightValue")] public static partial float HeightFieldShape_GetMinHeightValue(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:205 ///
/// float GetMaxHeightValue() const ///
///
[LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMaxHeightValue")] public static partial float HeightFieldShape_GetMaxHeightValue(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:215 ///
/// void GetHeights(uint inX, uint inY, uint inSizeX, uint inSizeY, float *outHeights, intptr_t inHeightsStride) const ///
///
/// /// /// Get the height values of a block of data. /// Note that the height values are decompressed so will be slightly different from what the shape was originally created with. /// @param inX Start X position, must be a multiple of mBlockSize and in the range [0, mSampleCount - 1] /// @param inY Start Y position, must be a multiple of mBlockSize and in the range [0, mSampleCount - 1] /// @param inSizeX Number of samples in X direction, must be a multiple of mBlockSize and in the range [0, mSampleCount - inX] /// @param inSizeY Number of samples in Y direction, must be a multiple of mBlockSize and in the range [0, mSampleCount - inY] /// @param outHeights Returned height values, must be at least inSizeX * inSizeY floats. Values are returned in x-major order and can be cNoCollisionValue. /// @param inHeightsStride Stride in floats between two consecutive rows of outHeights (can be negative if the data is upside down). /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetHeights")] public static partial void HeightFieldShape_GetHeights(HeightFieldShape self, uint x, uint y, uint sizeX, uint sizeY, float* heights, long heightsStride); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:228 ///
/// void SetHeights(uint inX, uint inY, uint inSizeX, uint inSizeY, const float *inHeights, intptr_t inHeightsStride, TempAllocator &inAllocator, float inActiveEdgeCosThresholdAngle = 0.996195f) ///
///
/// /// /// Set the height values of a block of data. /// Note that this requires decompressing and recompressing a border of size mBlockSize in the negative x/y direction so will cause some precision loss. /// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information. /// @param inX Start X position, must be a multiple of mBlockSize and in the range [0, mSampleCount - 1] /// @param inY Start Y position, must be a multiple of mBlockSize and in the range [0, mSampleCount - 1] /// @param inSizeX Number of samples in X direction, must be a multiple of mBlockSize and in the range [0, mSampleCount - inX] /// @param inSizeY Number of samples in Y direction, must be a multiple of mBlockSize and in the range [0, mSampleCount - inY] /// @param inHeights The new height values to set, must be an array of inSizeX * inSizeY floats, can be cNoCollisionValue. Values outside of the range [GetMinHeightValue(), GetMaxHeightValue()] will be clamped. /// @param inHeightsStride Stride in floats between two consecutive rows of inHeights (can be negative if the data is upside down). /// @param inAllocator Allocator to use for temporary memory /// @param inActiveEdgeCosThresholdAngle 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). /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_SetHeights")] public static partial void HeightFieldShape_SetHeights(HeightFieldShape self, uint x, uint y, uint sizeX, uint sizeY, float* heights, long heightsStride, TempAllocator allocator, float activeEdgeCosThresholdAngle); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:240 ///
/// void GetMaterials(uint inX, uint inY, uint inSizeX, uint inSizeY, uint8 *outMaterials, intptr_t inMaterialsStride) const ///
///
/// /// /// Get the material indices of a block of data. /// @param inX Start X position, must in the range [0, mSampleCount - 1] /// @param inY Start Y position, must in the range [0, mSampleCount - 1] /// @param inSizeX Number of samples in X direction /// @param inSizeY Number of samples in Y direction /// @param outMaterials Returned material indices, must be at least inSizeX * inSizeY uint8s. Values are returned in x-major order. /// @param inMaterialsStride Stride in uint8s between two consecutive rows of outMaterials (can be negative if the data is upside down). /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetMaterials")] public static partial void HeightFieldShape_GetMaterials(HeightFieldShape self, uint x, uint y, uint sizeX, uint sizeY, byte* materials, long materialsStride); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:256 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const override ///
///
/// /// /// See Shape /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_SaveBinaryState")] public static partial void HeightFieldShape_SaveBinaryState(HeightFieldShape self, StreamOut stream); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:264 ///
/// virtual float GetVolume() const override ///
///
/// /// /// See Shape::GetVolume /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetVolume")] public static partial float HeightFieldShape_GetVolume(HeightFieldShape self); /// /// /// C++: /// Jolt/Physics/Collision/Shape/HeightFieldShape.h:272 ///
/// static void sRegister() ///
///
/// /// /// Register shape functions with the registry /// /// [LibraryImport("jolt", EntryPoint = "HeightFieldShape_sRegister")] public static partial void HeightFieldShape_sRegister(); [LibraryImport("jolt", EntryPoint = "HeightFieldShape_AddRef")] public static partial void HeightFieldShape_AddRef(HeightFieldShape self); [LibraryImport("jolt", EntryPoint = "HeightFieldShape_Release")] public static partial void HeightFieldShape_Release(HeightFieldShape self); [LibraryImport("jolt", EntryPoint = "HeightFieldShape_GetRefCount")] public static partial uint HeightFieldShape_GetRefCount(HeightFieldShape self); [LibraryImport("jolt", EntryPoint = "HeightFieldShape_AsShape")] public static partial Shape HeightFieldShape_AsShape(HeightFieldShape self); } } }