// // 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/PhysicsMaterial.h:22 ///
/// class PhysicsMaterial : public SerializableObject, public RefTarget<PhysicsMaterial> ///
///
/// /// /// This structure describes the surface of (part of) a shape. You should inherit from it to define additional /// information that is interesting for the simulation. The 2 materials involved in a contact could be used /// to decide which sound or particle effects to play. /// /// If you inherit from this material, don't forget to create a suitable default material in sDefault /// /// [InteropHandle] public readonly partial struct PhysicsMaterial : IDisposable { /// /// /// C++: /// Jolt/Physics/Collision/PhysicsMaterial.h:28 ///
/// PhysicsMaterial() = default ///
///
/// /// /// Constructor /// /// public static PhysicsMaterial Create() => Jolt.PInvoke.PhysicsMaterial_Create(); /// /// /// C++: /// Jolt/Physics/Collision/PhysicsMaterial.h:24 ///
/// ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public RTTI GetRTTI() => Jolt.PInvoke.PhysicsMaterial_GetRTTI(this); /// /// /// C++: /// Jolt/Physics/Collision/PhysicsMaterial.h:24 ///
/// ///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.PhysicsMaterial_CastTo(this, rTTI); /// /// /// C++: /// Jolt/Physics/Collision/PhysicsMaterial.h:35 ///
/// virtual const char * GetDebugName() const ///
///
/// /// /// Properties /// /// public unsafe RefString8 GetDebugName() => (Ptr)Jolt.PInvoke.PhysicsMaterial_GetDebugName(this); /// /// /// C++: /// Jolt/Physics/Collision/PhysicsMaterial.h:39 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const ///
///
/// /// /// Saves the contents of the material in binary form to inStream. /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.PhysicsMaterial_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Collision/PhysicsMaterial.h:44 ///
/// static PhysicsMaterialResult sRestoreFromBinaryState(StreamIn &inStream) ///
///
/// /// /// Creates a PhysicsMaterial of the correct type and restores its contents from the binary stream inStream. /// /// /// Throws InvalidOperationException with Jolt's error message when the operation fails. /// /// public static PhysicsMaterial sRestoreFromBinaryState(StreamIn stream) { var _handle = Jolt.PInvoke.PhysicsMaterial_sRestoreFromBinaryState(stream); if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError()); return _handle; } public void AddRef() => Jolt.PInvoke.PhysicsMaterial_AddRef(this); public void Release() => Jolt.PInvoke.PhysicsMaterial_Release(this); public uint GetRefCount() => Jolt.PInvoke.PhysicsMaterial_GetRefCount(this); public void Dispose() { if (IsNull()) return; Release(); } } }