// // 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/TransformedShape.h:25 ///
/// class TransformedShape ///
///
/// /// /// 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. /// /// [InteropHandle] public readonly partial struct TransformedShape : IDisposable { /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:31 ///
/// TransformedShape() = default ///
///
/// /// /// Constructor /// /// public static TransformedShape Create() => Jolt.PInvoke.TransformedShape_Create(); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:32 ///
/// TransformedShape(RVec3Arg inPositionCOM, QuatArg inRotation, const Shape *inShape, const BodyID &inBodyID, const SubShapeIDCreator &inSubShapeIDCreator = SubShapeIDCreator()) ///
///
public static TransformedShape Create(float3 positionCOM, floatQuat rotation, Shape shape, uint bodyID, SubShapeIDCreator subShapeIDCreator) => Jolt.PInvoke.TransformedShape_Create_2(positionCOM, rotation, shape, bodyID, subShapeIDCreator); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:78 ///
/// void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, RVec3Arg inBaseOffset) const ///
///
/// /// /// 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 /// /// public void GetTrianglesStart(ref Shape.GetTrianglesContext context, AABox box, float3 baseOffset) => Jolt.PInvoke.TransformedShape_GetTrianglesStart(this, ref context, box, baseOffset); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:89 ///
/// inline Vec3 GetShapeScale() const ///
///
/// /// /// Get/set the scale of the shape as a Vec3 /// /// public float3 GetShapeScale() => Jolt.PInvoke.TransformedShape_GetShapeScale(this); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:90 ///
/// inline void SetShapeScale(Vec3Arg inScale) ///
///
public void SetShapeScale(float3 scale) => Jolt.PInvoke.TransformedShape_SetShapeScale(this, scale); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:93 ///
/// inline RMat44 GetCenterOfMassTransform() const ///
///
/// /// /// Calculates the transform for this shape's center of mass (excluding scale) /// /// public float4x4 GetCenterOfMassTransform() => Jolt.PInvoke.TransformedShape_GetCenterOfMassTransform(this); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:96 ///
/// inline RMat44 GetInverseCenterOfMassTransform() const ///
///
/// /// /// Calculates the inverse of the transform for this shape's center of mass (excluding scale) /// /// public float4x4 GetInverseCenterOfMassTransform() => Jolt.PInvoke.TransformedShape_GetInverseCenterOfMassTransform(this); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:99 ///
/// inline void SetWorldTransform(RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inScale) ///
///
/// /// /// Sets the world transform (including scale) of this transformed shape (not from the center of mass but in /// the space the shape was created) /// /// public void SetWorldTransform(float3 position, floatQuat rotation, float3 scale) => Jolt.PInvoke.TransformedShape_SetWorldTransform(this, position, rotation, scale); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:107 ///
/// inline void SetWorldTransform(RMat44Arg inTransform) ///
///
/// /// /// Sets the world transform (including scale) of this transformed shape (not from the center of mass but in /// the space the shape was created) /// /// public void SetWorldTransform(float4x4 transform) => Jolt.PInvoke.TransformedShape_SetWorldTransform_2(this, transform); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:115 ///
/// inline RMat44 GetWorldTransform() const ///
///
/// /// /// Calculates the world transform including scale of this shape (not from the center of mass but in the /// space the shape was created) /// /// public float4x4 GetWorldTransform() => Jolt.PInvoke.TransformedShape_GetWorldTransform(this); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:126 ///
/// inline SubShapeID MakeSubShapeIDRelativeToShape(const SubShapeID &inSubShapeID) const ///
///
/// /// /// Make inSubShapeID relative to mShape. When mSubShapeIDCreator is not empty, this is needed in order to /// get the correct path to the sub shape. /// /// public uint MakeSubShapeIDRelativeToShape(uint subShapeID) => Jolt.PInvoke.TransformedShape_MakeSubShapeIDRelativeToShape(this, subShapeID); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:138 ///
/// inline Vec3 GetWorldSpaceSurfaceNormal(const SubShapeID &inSubShapeID, RVec3Arg inPosition) const ///
///
/// /// /// 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). /// /// public float3 GetWorldSpaceSurfaceNormal(uint subShapeID, float3 position) => Jolt.PInvoke.TransformedShape_GetWorldSpaceSurfaceNormal(this, subShapeID, position); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:158 ///
/// inline const PhysicsMaterial *GetMaterial(const SubShapeID &inSubShapeID) const ///
///
/// /// /// Get material of a particular sub shape /// /// public PhysicsMaterial GetMaterial(uint subShapeID) => Jolt.PInvoke.TransformedShape_GetMaterial(this, subShapeID); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:164 ///
/// inline uint64 GetSubShapeUserData(const SubShapeID &inSubShapeID) const ///
///
/// /// /// Get the user data of a particular sub shape /// /// public ulong GetSubShapeUserData(uint subShapeID) => Jolt.PInvoke.TransformedShape_GetSubShapeUserData(this, subShapeID); /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:181 ///
/// inline static BodyID sGetBodyID(const TransformedShape *inTS) ///
///
/// /// /// Helper function to return the body id from a transformed shape. If the transformed shape is null an /// invalid body ID will be returned. /// /// public static uint sGetBodyID(TransformedShape tS) => Jolt.PInvoke.TransformedShape_sGetBodyID(tS); /// /// /// Center of mass world position of the shape /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:183 ///
/// RVec3 mShapePositionCOM ///
///
public float3 GetShapePositionCOM() => Jolt.PInvoke.TransformedShape_GetShapePositionCOM(this); /// /// /// Center of mass world position of the shape /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:183 ///
/// RVec3 mShapePositionCOM ///
///
public void SetShapePositionCOM(float3 value) => Jolt.PInvoke.TransformedShape_SetShapePositionCOM(this, value); /// /// /// Rotation of the shape /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:184 ///
/// Quat mShapeRotation ///
///
public floatQuat GetShapeRotation() => Jolt.PInvoke.TransformedShape_GetShapeRotation(this); /// /// /// Rotation of the shape /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:184 ///
/// Quat mShapeRotation ///
///
public void SetShapeRotation(floatQuat value) => Jolt.PInvoke.TransformedShape_SetShapeRotation(this, value); /// /// /// The shape itself /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:185 ///
/// RefConst<Shape> mShape ///
///
public Shape GetShape() => Jolt.PInvoke.TransformedShape_GetShape(this); /// /// /// The shape itself /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:185 ///
/// RefConst<Shape> mShape ///
///
public void SetShape(Shape value) => Jolt.PInvoke.TransformedShape_SetShape(this, value); /// /// /// Optional body ID from which this shape comes /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:187 ///
/// BodyID mBodyID ///
///
public uint GetBodyID() => Jolt.PInvoke.TransformedShape_GetBodyID(this); /// /// /// Optional body ID from which this shape comes /// /// /// C++: /// Jolt/Physics/Collision/TransformedShape.h:187 ///
/// BodyID mBodyID ///
///
public void SetBodyID(uint value) => Jolt.PInvoke.TransformedShape_SetBodyID(this, value); public void Dispose() => Jolt.PInvoke.TransformedShape_Destroy(this); } }