// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:34 ///
/// class TriangleShape final : public ConvexShape ///
///
/// /// /// A single triangle, not the most efficient way of creating a world filled with triangles but can be used as a /// query shape for example. /// /// [InteropHandle] public readonly partial struct TriangleShape : IDisposable { /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:40 ///
/// TriangleShape() ///
///
/// /// /// Constructor /// /// public static TriangleShape Create() => Jolt.PInvoke.TriangleShape_Create(); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:45 ///
/// TriangleShape(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3, float inConvexRadius = 0.0f, const PhysicsMaterial *inMaterial = nullptr) ///
///
/// /// /// Create a triangle with points (inV1, inV2, inV3) (counter clockwise) and convex radius inConvexRadius. /// Note that the convex radius is currently only used for shape vs shape collision, for all other purposes the triangle is infinitely thin. /// /// public static TriangleShape Create(float3 v1, float3 v2, float3 v3, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.TriangleShape_Create_2(v1, v2, v3, convexRadius, material); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:48 ///
/// inline Vec3 GetVertex1() const ///
///
/// /// /// Get the vertices of the triangle /// /// public float3 GetVertex1() => Jolt.PInvoke.TriangleShape_GetVertex1(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:49 ///
/// inline Vec3 GetVertex2() const ///
///
public float3 GetVertex2() => Jolt.PInvoke.TriangleShape_GetVertex2(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:50 ///
/// inline Vec3 GetVertex3() const ///
///
public float3 GetVertex3() => Jolt.PInvoke.TriangleShape_GetVertex3(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:53 ///
/// float GetConvexRadius() const ///
///
/// /// /// Convex radius /// /// public float GetConvexRadius() => Jolt.PInvoke.TriangleShape_GetConvexRadius(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:63 ///
/// virtual float GetInnerRadius() const override ///
///
/// /// /// See Shape::GetInnerRadius /// /// public float GetInnerRadius() => Jolt.PInvoke.TriangleShape_GetInnerRadius(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:69 ///
/// virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override ///
///
/// /// /// See Shape::GetSurfaceNormal /// /// public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.TriangleShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:78 ///
/// 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 /// /// public void GetSubmergedVolume(float4x4 centerOfMassTransform, float3 scale, Plane surface, out float totalVolume, out float submergedVolume, out float3 centerOfBuoyancy, float3 baseOffset) => Jolt.PInvoke.TriangleShape_GetSubmergedVolume(this, centerOfMassTransform, scale, surface, out totalVolume, out submergedVolume, out centerOfBuoyancy, baseOffset); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:82 ///
/// virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override ///
///
/// /// /// See Shape::Draw /// /// public void Draw(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, bool useMaterialColors, bool drawWireframe) => Jolt.PInvoke.TriangleShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:93 ///
/// virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &inVertices, uint inNumVertices, int inCollidingShapeIndex) const override ///
///
/// /// /// See: Shape::CollideSoftBodyVertices /// /// public void CollideSoftBodyVertices(float4x4 centerOfMassTransform, float3 scale, CollideSoftBodyVertexIterator vertices, uint numVertices, int collidingShapeIndex) => Jolt.PInvoke.TriangleShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:96 ///
/// virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override ///
///
/// /// /// See Shape::GetTrianglesStart /// /// public void GetTrianglesStart(ref Shape.GetTrianglesContext context, AABox box, float3 positionCOM, floatQuat rotation, float3 scale) => Jolt.PInvoke.TriangleShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:102 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const override ///
///
/// /// /// See Shape /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.TriangleShape_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:108 ///
/// virtual float GetVolume() const override ///
///
/// /// /// See Shape::GetVolume /// /// public float GetVolume() => Jolt.PInvoke.TriangleShape_GetVolume(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:111 ///
/// virtual bool IsValidScale(Vec3Arg inScale) const override ///
///
/// /// /// See Shape::IsValidScale /// /// public bool IsValidScale(float3 scale) => Jolt.PInvoke.TriangleShape_IsValidScale(this, scale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:114 ///
/// virtual Vec3 MakeScaleValid(Vec3Arg inScale) const override ///
///
/// /// /// See Shape::MakeScaleValid /// /// public float3 MakeScaleValid(float3 scale) => Jolt.PInvoke.TriangleShape_MakeScaleValid(this, scale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/TriangleShape.h:117 ///
/// static void sRegister() ///
///
/// /// /// Register shape functions with the registry /// /// public static void sRegister() => Jolt.PInvoke.TriangleShape_sRegister(); public void AddRef() => Jolt.PInvoke.TriangleShape_AddRef(this); public void Release() => Jolt.PInvoke.TriangleShape_Release(this); public uint GetRefCount() => Jolt.PInvoke.TriangleShape_GetRefCount(this); public static implicit operator ConvexShape(TriangleShape value) => Jolt.PInvoke.TriangleShape_AsConvexShape(value); public static implicit operator Shape(TriangleShape value) => Jolt.PInvoke.TriangleShape_AsShape(value); public void Dispose() { if (IsNull()) return; Release(); } } }