mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
336 lines
17 KiB
C#
336 lines
17 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using Brutal.Interop;
|
|
using Brutal.Numerics;
|
|
namespace Brutal.JoltApi
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L25">Jolt/Physics/Collision/TransformedShape.h:25</see>
|
|
/// <br/>
|
|
/// <c>class TransformedShape</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Temporary data structure that contains a shape and a transform.
|
|
/// This structure can be obtained from a body (e.g. after a broad phase query) under lock protection.
|
|
/// The lock can then be released and collision detection operations can be safely performed since
|
|
/// the class takes a reference on the shape and does not use anything from the body anymore.
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct TransformedShape : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L31">Jolt/Physics/Collision/TransformedShape.h:31</see>
|
|
/// <br/>
|
|
/// <c>TransformedShape() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// </remarks>
|
|
public static TransformedShape Create() => Jolt.PInvoke.TransformedShape_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L32">Jolt/Physics/Collision/TransformedShape.h:32</see>
|
|
/// <br/>
|
|
/// <c>TransformedShape(RVec3Arg inPositionCOM, QuatArg inRotation, const Shape *inShape, const BodyID &inBodyID, const SubShapeIDCreator &inSubShapeIDCreator = SubShapeIDCreator())</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static TransformedShape Create(float3 positionCOM, floatQuat rotation, Shape shape, uint bodyID, SubShapeIDCreator subShapeIDCreator) => Jolt.PInvoke.TransformedShape_Create_2(positionCOM, rotation, shape, bodyID, subShapeIDCreator);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L78">Jolt/Physics/Collision/TransformedShape.h:78</see>
|
|
/// <br/>
|
|
/// <c>void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, RVec3Arg inBaseOffset) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// To start iterating over triangles, call this function first.
|
|
/// To get the actual triangles call GetTrianglesNext.
|
|
/// @param ioContext A temporary buffer and should remain untouched until the last call to GetTrianglesNext.
|
|
/// @param inBox The world space bounding in which you want to get the triangles.
|
|
/// @param inBaseOffset All hit results will be returned relative to this offset, can be zero to get results in world position, but when you're testing far from the origin you get better precision by picking a position that's closer e.g. inBox.GetCenter() since floats are most accurate near the origin
|
|
/// </code>
|
|
/// </remarks>
|
|
public void GetTrianglesStart(ref Shape.GetTrianglesContext context, AABox box, float3 baseOffset) => Jolt.PInvoke.TransformedShape_GetTrianglesStart(this, ref context, box, baseOffset);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L89">Jolt/Physics/Collision/TransformedShape.h:89</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetShapeScale() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get/set the scale of the shape as a Vec3
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetShapeScale() => Jolt.PInvoke.TransformedShape_GetShapeScale(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L90">Jolt/Physics/Collision/TransformedShape.h:90</see>
|
|
/// <br/>
|
|
/// <c>inline void SetShapeScale(Vec3Arg inScale)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetShapeScale(float3 scale) => Jolt.PInvoke.TransformedShape_SetShapeScale(this, scale);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L93">Jolt/Physics/Collision/TransformedShape.h:93</see>
|
|
/// <br/>
|
|
/// <c>inline RMat44 GetCenterOfMassTransform() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculates the transform for this shape's center of mass (excluding scale)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetCenterOfMassTransform() => Jolt.PInvoke.TransformedShape_GetCenterOfMassTransform(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L96">Jolt/Physics/Collision/TransformedShape.h:96</see>
|
|
/// <br/>
|
|
/// <c>inline RMat44 GetInverseCenterOfMassTransform() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculates the inverse of the transform for this shape's center of mass (excluding scale)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetInverseCenterOfMassTransform() => Jolt.PInvoke.TransformedShape_GetInverseCenterOfMassTransform(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L99">Jolt/Physics/Collision/TransformedShape.h:99</see>
|
|
/// <br/>
|
|
/// <c>inline void SetWorldTransform(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inScale)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Sets the world transform (including scale) of this transformed shape (not from the center of mass but in
|
|
/// the space the shape was created)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetWorldTransform(float3 position, floatQuat rotation, float3 scale) => Jolt.PInvoke.TransformedShape_SetWorldTransform(this, position, rotation, scale);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L107">Jolt/Physics/Collision/TransformedShape.h:107</see>
|
|
/// <br/>
|
|
/// <c>inline void SetWorldTransform(RMat44Arg inTransform)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Sets the world transform (including scale) of this transformed shape (not from the center of mass but in
|
|
/// the space the shape was created)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetWorldTransform(float4x4 transform) => Jolt.PInvoke.TransformedShape_SetWorldTransform_2(this, transform);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L115">Jolt/Physics/Collision/TransformedShape.h:115</see>
|
|
/// <br/>
|
|
/// <c>inline RMat44 GetWorldTransform() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculates the world transform including scale of this shape (not from the center of mass but in the
|
|
/// space the shape was created)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetWorldTransform() => Jolt.PInvoke.TransformedShape_GetWorldTransform(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L126">Jolt/Physics/Collision/TransformedShape.h:126</see>
|
|
/// <br/>
|
|
/// <c>inline SubShapeID MakeSubShapeIDRelativeToShape(const SubShapeID &inSubShapeID) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Make inSubShapeID relative to mShape. When mSubShapeIDCreator is not empty, this is needed in order to
|
|
/// get the correct path to the sub shape.
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint MakeSubShapeIDRelativeToShape(uint subShapeID) => Jolt.PInvoke.TransformedShape_MakeSubShapeIDRelativeToShape(this, subShapeID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L138">Jolt/Physics/Collision/TransformedShape.h:138</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetWorldSpaceSurfaceNormal(const SubShapeID &inSubShapeID, RVec3Arg inPosition) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Get surface normal of a particular sub shape and its world space surface position on this body.
|
|
/// Note: When you have a CollideShapeResult or ShapeCastResult you should use -mPenetrationAxis.Normalized() as contact normal as GetWorldSpaceSurfaceNormal will only return face normals (and not vertex or edge normals).
|
|
/// </code>
|
|
/// </remarks>
|
|
public float3 GetWorldSpaceSurfaceNormal(uint subShapeID, float3 position) => Jolt.PInvoke.TransformedShape_GetWorldSpaceSurfaceNormal(this, subShapeID, position);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L158">Jolt/Physics/Collision/TransformedShape.h:158</see>
|
|
/// <br/>
|
|
/// <c>inline const PhysicsMaterial *GetMaterial(const SubShapeID &inSubShapeID) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get material of a particular sub shape
|
|
/// </para>
|
|
/// </remarks>
|
|
public PhysicsMaterial GetMaterial(uint subShapeID) => Jolt.PInvoke.TransformedShape_GetMaterial(this, subShapeID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L164">Jolt/Physics/Collision/TransformedShape.h:164</see>
|
|
/// <br/>
|
|
/// <c>inline uint64 GetSubShapeUserData(const SubShapeID &inSubShapeID) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the user data of a particular sub shape
|
|
/// </para>
|
|
/// </remarks>
|
|
public ulong GetSubShapeUserData(uint subShapeID) => Jolt.PInvoke.TransformedShape_GetSubShapeUserData(this, subShapeID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L181">Jolt/Physics/Collision/TransformedShape.h:181</see>
|
|
/// <br/>
|
|
/// <c>inline static BodyID sGetBodyID(const TransformedShape *inTS)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Helper function to return the body id from a transformed shape. If the transformed shape is null an
|
|
/// invalid body ID will be returned.
|
|
/// </para>
|
|
/// </remarks>
|
|
public static uint sGetBodyID(TransformedShape tS) => Jolt.PInvoke.TransformedShape_sGetBodyID(tS);
|
|
/// <summary>
|
|
/// <para>
|
|
/// Center of mass world position of the shape
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L183">Jolt/Physics/Collision/TransformedShape.h:183</see>
|
|
/// <br/>
|
|
/// <c>RVec3 mShapePositionCOM</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetShapePositionCOM() => Jolt.PInvoke.TransformedShape_GetShapePositionCOM(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// Center of mass world position of the shape
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L183">Jolt/Physics/Collision/TransformedShape.h:183</see>
|
|
/// <br/>
|
|
/// <c>RVec3 mShapePositionCOM</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetShapePositionCOM(float3 value) => Jolt.PInvoke.TransformedShape_SetShapePositionCOM(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// Rotation of the shape
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L184">Jolt/Physics/Collision/TransformedShape.h:184</see>
|
|
/// <br/>
|
|
/// <c>Quat mShapeRotation</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public floatQuat GetShapeRotation() => Jolt.PInvoke.TransformedShape_GetShapeRotation(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// Rotation of the shape
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L184">Jolt/Physics/Collision/TransformedShape.h:184</see>
|
|
/// <br/>
|
|
/// <c>Quat mShapeRotation</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetShapeRotation(floatQuat value) => Jolt.PInvoke.TransformedShape_SetShapeRotation(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// The shape itself
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L185">Jolt/Physics/Collision/TransformedShape.h:185</see>
|
|
/// <br/>
|
|
/// <c>RefConst<Shape> mShape</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public Shape GetShape() => Jolt.PInvoke.TransformedShape_GetShape(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// The shape itself
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L185">Jolt/Physics/Collision/TransformedShape.h:185</see>
|
|
/// <br/>
|
|
/// <c>RefConst<Shape> mShape</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetShape(Shape value) => Jolt.PInvoke.TransformedShape_SetShape(this, value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// Optional body ID from which this shape comes
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L187">Jolt/Physics/Collision/TransformedShape.h:187</see>
|
|
/// <br/>
|
|
/// <c>BodyID mBodyID</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint GetBodyID() => Jolt.PInvoke.TransformedShape_GetBodyID(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// Optional body ID from which this shape comes
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/TransformedShape.h#L187">Jolt/Physics/Collision/TransformedShape.h:187</see>
|
|
/// <br/>
|
|
/// <c>BodyID mBodyID</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetBodyID(uint value) => Jolt.PInvoke.TransformedShape_SetBodyID(this, value);
|
|
public void Dispose() => Jolt.PInvoke.TransformedShape_Destroy(this);
|
|
}
|
|
}
|