mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
596 lines
23 KiB
C#
596 lines
23 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Fmod.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.FmodApi
|
|
{
|
|
public static partial class Fmod
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Frees a geometry object and releases its memory.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_release">Geometry::release</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TryRelease(this Geometry geometry) => PInvoke.GeometryRelease(geometry);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Frees a geometry object and releases its memory.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_release">Geometry::release</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void Release(this Geometry geometry) => TryRelease(geometry).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Adds a polygon.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_addpolygon">Geometry::addPolygon</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryAddPolygon(
|
|
this Geometry geometry,
|
|
float directOcclusion,
|
|
float reverbOcclusion,
|
|
Bool32 doubleSided,
|
|
int numVertices,
|
|
in float3 vertices,
|
|
out int polygonIndex
|
|
)
|
|
{
|
|
fixed (float3* verticesPtr = &vertices)
|
|
fixed (int* polygonIndexPtr = &polygonIndex)
|
|
return PInvoke.GeometryAddPolygon(
|
|
geometry,
|
|
directOcclusion,
|
|
reverbOcclusion,
|
|
doubleSided,
|
|
numVertices,
|
|
verticesPtr,
|
|
polygonIndexPtr
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Adds a polygon.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_addpolygon">Geometry::addPolygon</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int AddPolygon(
|
|
this Geometry geometry,
|
|
float directOcclusion,
|
|
float reverbOcclusion,
|
|
Bool32 doubleSided,
|
|
int numVertices,
|
|
in float3 vertices
|
|
)
|
|
{
|
|
TryAddPolygon(
|
|
geometry,
|
|
directOcclusion,
|
|
reverbOcclusion,
|
|
doubleSided,
|
|
numVertices,
|
|
vertices,
|
|
out var polygonIndex
|
|
)
|
|
.Check();
|
|
return polygonIndex;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of polygons in this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getnumpolygons">Geometry::getNumPolygons</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetNumPolygons(this Geometry geometry, out int numPolygons)
|
|
{
|
|
fixed (int* numPolygonsPtr = &numPolygons)
|
|
return PInvoke.GeometryGetNumPolygons(geometry, numPolygonsPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the number of polygons in this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getnumpolygons">Geometry::getNumPolygons</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetNumPolygons(this Geometry geometry)
|
|
{
|
|
TryGetNumPolygons(geometry, out var numPolygons).Check();
|
|
return numPolygons;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the maximum number of polygons and vertices allocatable for this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getmaxpolygons">Geometry::getMaxPolygons</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetMaxPolygons(this Geometry geometry, out int maxPolygons, out int maxVertices)
|
|
{
|
|
fixed (int* maxPolygonsPtr = &maxPolygons)
|
|
fixed (int* maxVerticesPtr = &maxVertices)
|
|
return PInvoke.GeometryGetMaxPolygons(geometry, maxPolygonsPtr, maxVerticesPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the maximum number of polygons and vertices allocatable for this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getmaxpolygons">Geometry::getMaxPolygons</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetMaxPolygons(this Geometry geometry, out int maxPolygons, out int maxVertices) =>
|
|
TryGetMaxPolygons(geometry, out maxPolygons, out maxVertices).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Gets the number of vertices in a polygon.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getpolygonnumvertices">Geometry::getPolygonNumVertices</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPolygonNumVertices(this Geometry geometry, int index, out int numVertices)
|
|
{
|
|
fixed (int* numVerticesPtr = &numVertices)
|
|
return PInvoke.GeometryGetPolygonNumVertices(geometry, index, numVerticesPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Gets the number of vertices in a polygon.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getpolygonnumvertices">Geometry::getPolygonNumVertices</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int GetPolygonNumVertices(this Geometry geometry, int index)
|
|
{
|
|
TryGetPolygonNumVertices(geometry, index, out var numVertices).Check();
|
|
return numVertices;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Alters the position of a polygon's vertex inside a geometry object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setpolygonvertex">Geometry::setPolygonVertex</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySetPolygonVertex(
|
|
this Geometry geometry,
|
|
int index,
|
|
int vertexIndex,
|
|
in float3 vertex
|
|
)
|
|
{
|
|
fixed (float3* vertexPtr = &vertex)
|
|
return PInvoke.GeometrySetPolygonVertex(geometry, index, vertexIndex, vertexPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Alters the position of a polygon's vertex inside a geometry object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setpolygonvertex">Geometry::setPolygonVertex</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetPolygonVertex(this Geometry geometry, int index, int vertexIndex, in float3 vertex) =>
|
|
TrySetPolygonVertex(geometry, index, vertexIndex, vertex).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the position of a vertex.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getpolygonvertex">Geometry::getPolygonVertex</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPolygonVertex(
|
|
this Geometry geometry,
|
|
int index,
|
|
int vertexIndex,
|
|
out float3 vertex
|
|
)
|
|
{
|
|
fixed (float3* vertexPtr = &vertex)
|
|
return PInvoke.GeometryGetPolygonVertex(geometry, index, vertexIndex, vertexPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the position of a vertex.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getpolygonvertex">Geometry::getPolygonVertex</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static float3 GetPolygonVertex(this Geometry geometry, int index, int vertexIndex)
|
|
{
|
|
TryGetPolygonVertex(geometry, index, vertexIndex, out var vertex).Check();
|
|
return vertex;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets individual attributes for a polygon inside a geometry object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setpolygonattributes">Geometry::setPolygonAttributes</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetPolygonAttributes(
|
|
this Geometry geometry,
|
|
int index,
|
|
float directOcclusion,
|
|
float reverbOcclusion,
|
|
Bool32 doubleSided
|
|
) => PInvoke.GeometrySetPolygonAttributes(geometry, index, directOcclusion, reverbOcclusion, doubleSided);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets individual attributes for a polygon inside a geometry object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setpolygonattributes">Geometry::setPolygonAttributes</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetPolygonAttributes(
|
|
this Geometry geometry,
|
|
int index,
|
|
float directOcclusion,
|
|
float reverbOcclusion,
|
|
Bool32 doubleSided
|
|
) => TrySetPolygonAttributes(geometry, index, directOcclusion, reverbOcclusion, doubleSided).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the attributes for a polygon.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getpolygonattributes">Geometry::getPolygonAttributes</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPolygonAttributes(
|
|
this Geometry geometry,
|
|
int index,
|
|
out float directOcclusion,
|
|
out float reverbOcclusion,
|
|
out Bool32 doubleSided
|
|
)
|
|
{
|
|
fixed (float* directOcclusionPtr = &directOcclusion)
|
|
fixed (float* reverbOcclusionPtr = &reverbOcclusion)
|
|
fixed (Bool32* doubleSidedPtr = &doubleSided)
|
|
return PInvoke.GeometryGetPolygonAttributes(
|
|
geometry,
|
|
index,
|
|
directOcclusionPtr,
|
|
reverbOcclusionPtr,
|
|
doubleSidedPtr
|
|
);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the attributes for a polygon.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getpolygonattributes">Geometry::getPolygonAttributes</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetPolygonAttributes(
|
|
this Geometry geometry,
|
|
int index,
|
|
out float directOcclusion,
|
|
out float reverbOcclusion,
|
|
out Bool32 doubleSided
|
|
) =>
|
|
TryGetPolygonAttributes(geometry, index, out directOcclusion, out reverbOcclusion, out doubleSided).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets whether an object is processed by the geometry engine.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setactive">Geometry::setActive</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetActive(this Geometry geometry, Bool32 active) =>
|
|
PInvoke.GeometrySetActive(geometry, active);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets whether an object is processed by the geometry engine.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setactive">Geometry::setActive</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetActive(this Geometry geometry, Bool32 active) => TrySetActive(geometry, active).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves whether an object is processed by the geometry engine.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getactive">Geometry::getActive</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetActive(this Geometry geometry, out Bool32 active)
|
|
{
|
|
fixed (Bool32* activePtr = &active)
|
|
return PInvoke.GeometryGetActive(geometry, activePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves whether an object is processed by the geometry engine.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getactive">Geometry::getActive</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Bool32 GetActive(this Geometry geometry)
|
|
{
|
|
TryGetActive(geometry, out var active).Check();
|
|
return active;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the 3D orientation of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setrotation">Geometry::setRotation</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySetRotation(this Geometry geometry, in float3 forward, in float3 up)
|
|
{
|
|
fixed (float3* forwardPtr = &forward)
|
|
fixed (float3* upPtr = &up)
|
|
return PInvoke.GeometrySetRotation(geometry, forwardPtr, upPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the 3D orientation of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setrotation">Geometry::setRotation</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetRotation(this Geometry geometry, in float3 forward, in float3 up) =>
|
|
TrySetRotation(geometry, forward, up).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the 3D orientation of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getrotation">Geometry::getRotation</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetRotation(this Geometry geometry, out float3 forward, out float3 up)
|
|
{
|
|
fixed (float3* forwardPtr = &forward)
|
|
fixed (float3* upPtr = &up)
|
|
return PInvoke.GeometryGetRotation(geometry, forwardPtr, upPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the 3D orientation of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getrotation">Geometry::getRotation</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void GetRotation(this Geometry geometry, out float3 forward, out float3 up) =>
|
|
TryGetRotation(geometry, out forward, out up).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the 3D position of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setposition">Geometry::setPosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySetPosition(this Geometry geometry, in float3 position)
|
|
{
|
|
fixed (float3* positionPtr = &position)
|
|
return PInvoke.GeometrySetPosition(geometry, positionPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the 3D position of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setposition">Geometry::setPosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetPosition(this Geometry geometry, in float3 position) =>
|
|
TrySetPosition(geometry, position).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the 3D position of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getposition">Geometry::getPosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetPosition(this Geometry geometry, out float3 position)
|
|
{
|
|
fixed (float3* positionPtr = &position)
|
|
return PInvoke.GeometryGetPosition(geometry, positionPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the 3D position of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getposition">Geometry::getPosition</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static float3 GetPosition(this Geometry geometry)
|
|
{
|
|
TryGetPosition(geometry, out var position).Check();
|
|
return position;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the 3D scale of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setscale">Geometry::setScale</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySetScale(this Geometry geometry, in float3 scale)
|
|
{
|
|
fixed (float3* scalePtr = &scale)
|
|
return PInvoke.GeometrySetScale(geometry, scalePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets the 3D scale of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setscale">Geometry::setScale</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetScale(this Geometry geometry, in float3 scale) => TrySetScale(geometry, scale).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the 3D scale of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getscale">Geometry::getScale</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetScale(this Geometry geometry, out float3 scale)
|
|
{
|
|
fixed (float3* scalePtr = &scale)
|
|
return PInvoke.GeometryGetScale(geometry, scalePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves the 3D scale of the object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getscale">Geometry::getScale</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static float3 GetScale(this Geometry geometry)
|
|
{
|
|
TryGetScale(geometry, out var scale).Check();
|
|
return scale;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Saves the geometry object as a serialized binary block to a user memory buffer.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_save">Geometry::save</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TrySave(this Geometry geometry, nint data, out int dataSize)
|
|
{
|
|
fixed (int* dataSizePtr = &dataSize)
|
|
return PInvoke.GeometrySave(geometry, data, dataSizePtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Saves the geometry object as a serialized binary block to a user memory buffer.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_save">Geometry::save</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static int Save(this Geometry geometry, nint data)
|
|
{
|
|
TrySave(geometry, data, out var dataSize).Check();
|
|
return dataSize;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a user value associated with this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setuserdata">Geometry::setUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Result TrySetUserData(this Geometry geometry, nint userData) =>
|
|
PInvoke.GeometrySetUserData(geometry, userData);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Sets a user value associated with this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_setuserdata">Geometry::setUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static void SetUserData(this Geometry geometry, nint userData) =>
|
|
TrySetUserData(geometry, userData).Check();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a user value associated with this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getuserdata">Geometry::getUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static unsafe Result TryGetUserData(this Geometry geometry, out nint userData)
|
|
{
|
|
fixed (nint* userDataPtr = &userData)
|
|
return PInvoke.GeometryGetUserData(geometry, userDataPtr);
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Retrieves a user value associated with this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see href="https://www.fmod.com/docs/2.03/api/core-api-geometry.html#geometry_getuserdata">Geometry::getUserData</see>
|
|
/// </para>
|
|
/// </summary>
|
|
public static nint GetUserData(this Geometry geometry)
|
|
{
|
|
TryGetUserData(geometry, out var userData).Check();
|
|
return userData;
|
|
}
|
|
}
|
|
}
|