// // Generated by Brutal.Fmod.Generate; do not edit by hand. #nullable enable namespace Brutal.FmodApi { public static partial class Fmod { /// /// /// Frees a geometry object and releases its memory. /// /// /// Geometry::release /// /// public static Result TryRelease(this Geometry geometry) => PInvoke.GeometryRelease(geometry); /// /// /// Frees a geometry object and releases its memory. /// /// /// Geometry::release /// /// public static void Release(this Geometry geometry) => TryRelease(geometry).Check(); /// /// /// Adds a polygon. /// /// /// Geometry::addPolygon /// /// 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 ); } /// /// /// Adds a polygon. /// /// /// Geometry::addPolygon /// /// 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; } /// /// /// Retrieves the number of polygons in this object. /// /// /// Geometry::getNumPolygons /// /// public static unsafe Result TryGetNumPolygons(this Geometry geometry, out int numPolygons) { fixed (int* numPolygonsPtr = &numPolygons) return PInvoke.GeometryGetNumPolygons(geometry, numPolygonsPtr); } /// /// /// Retrieves the number of polygons in this object. /// /// /// Geometry::getNumPolygons /// /// public static int GetNumPolygons(this Geometry geometry) { TryGetNumPolygons(geometry, out var numPolygons).Check(); return numPolygons; } /// /// /// Retrieves the maximum number of polygons and vertices allocatable for this object. /// /// /// Geometry::getMaxPolygons /// /// 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); } /// /// /// Retrieves the maximum number of polygons and vertices allocatable for this object. /// /// /// Geometry::getMaxPolygons /// /// public static void GetMaxPolygons(this Geometry geometry, out int maxPolygons, out int maxVertices) => TryGetMaxPolygons(geometry, out maxPolygons, out maxVertices).Check(); /// /// /// Gets the number of vertices in a polygon. /// /// /// Geometry::getPolygonNumVertices /// /// public static unsafe Result TryGetPolygonNumVertices(this Geometry geometry, int index, out int numVertices) { fixed (int* numVerticesPtr = &numVertices) return PInvoke.GeometryGetPolygonNumVertices(geometry, index, numVerticesPtr); } /// /// /// Gets the number of vertices in a polygon. /// /// /// Geometry::getPolygonNumVertices /// /// public static int GetPolygonNumVertices(this Geometry geometry, int index) { TryGetPolygonNumVertices(geometry, index, out var numVertices).Check(); return numVertices; } /// /// /// Alters the position of a polygon's vertex inside a geometry object. /// /// /// Geometry::setPolygonVertex /// /// 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); } /// /// /// Alters the position of a polygon's vertex inside a geometry object. /// /// /// Geometry::setPolygonVertex /// /// public static void SetPolygonVertex(this Geometry geometry, int index, int vertexIndex, in float3 vertex) => TrySetPolygonVertex(geometry, index, vertexIndex, vertex).Check(); /// /// /// Retrieves the position of a vertex. /// /// /// Geometry::getPolygonVertex /// /// 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); } /// /// /// Retrieves the position of a vertex. /// /// /// Geometry::getPolygonVertex /// /// public static float3 GetPolygonVertex(this Geometry geometry, int index, int vertexIndex) { TryGetPolygonVertex(geometry, index, vertexIndex, out var vertex).Check(); return vertex; } /// /// /// Sets individual attributes for a polygon inside a geometry object. /// /// /// Geometry::setPolygonAttributes /// /// public static Result TrySetPolygonAttributes( this Geometry geometry, int index, float directOcclusion, float reverbOcclusion, Bool32 doubleSided ) => PInvoke.GeometrySetPolygonAttributes(geometry, index, directOcclusion, reverbOcclusion, doubleSided); /// /// /// Sets individual attributes for a polygon inside a geometry object. /// /// /// Geometry::setPolygonAttributes /// /// public static void SetPolygonAttributes( this Geometry geometry, int index, float directOcclusion, float reverbOcclusion, Bool32 doubleSided ) => TrySetPolygonAttributes(geometry, index, directOcclusion, reverbOcclusion, doubleSided).Check(); /// /// /// Retrieves the attributes for a polygon. /// /// /// Geometry::getPolygonAttributes /// /// 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 ); } /// /// /// Retrieves the attributes for a polygon. /// /// /// Geometry::getPolygonAttributes /// /// 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(); /// /// /// Sets whether an object is processed by the geometry engine. /// /// /// Geometry::setActive /// /// public static Result TrySetActive(this Geometry geometry, Bool32 active) => PInvoke.GeometrySetActive(geometry, active); /// /// /// Sets whether an object is processed by the geometry engine. /// /// /// Geometry::setActive /// /// public static void SetActive(this Geometry geometry, Bool32 active) => TrySetActive(geometry, active).Check(); /// /// /// Retrieves whether an object is processed by the geometry engine. /// /// /// Geometry::getActive /// /// public static unsafe Result TryGetActive(this Geometry geometry, out Bool32 active) { fixed (Bool32* activePtr = &active) return PInvoke.GeometryGetActive(geometry, activePtr); } /// /// /// Retrieves whether an object is processed by the geometry engine. /// /// /// Geometry::getActive /// /// public static Bool32 GetActive(this Geometry geometry) { TryGetActive(geometry, out var active).Check(); return active; } /// /// /// Sets the 3D orientation of the object. /// /// /// Geometry::setRotation /// /// 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); } /// /// /// Sets the 3D orientation of the object. /// /// /// Geometry::setRotation /// /// public static void SetRotation(this Geometry geometry, in float3 forward, in float3 up) => TrySetRotation(geometry, forward, up).Check(); /// /// /// Retrieves the 3D orientation of the object. /// /// /// Geometry::getRotation /// /// 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); } /// /// /// Retrieves the 3D orientation of the object. /// /// /// Geometry::getRotation /// /// public static void GetRotation(this Geometry geometry, out float3 forward, out float3 up) => TryGetRotation(geometry, out forward, out up).Check(); /// /// /// Sets the 3D position of the object. /// /// /// Geometry::setPosition /// /// public static unsafe Result TrySetPosition(this Geometry geometry, in float3 position) { fixed (float3* positionPtr = &position) return PInvoke.GeometrySetPosition(geometry, positionPtr); } /// /// /// Sets the 3D position of the object. /// /// /// Geometry::setPosition /// /// public static void SetPosition(this Geometry geometry, in float3 position) => TrySetPosition(geometry, position).Check(); /// /// /// Retrieves the 3D position of the object. /// /// /// Geometry::getPosition /// /// public static unsafe Result TryGetPosition(this Geometry geometry, out float3 position) { fixed (float3* positionPtr = &position) return PInvoke.GeometryGetPosition(geometry, positionPtr); } /// /// /// Retrieves the 3D position of the object. /// /// /// Geometry::getPosition /// /// public static float3 GetPosition(this Geometry geometry) { TryGetPosition(geometry, out var position).Check(); return position; } /// /// /// Sets the 3D scale of the object. /// /// /// Geometry::setScale /// /// public static unsafe Result TrySetScale(this Geometry geometry, in float3 scale) { fixed (float3* scalePtr = &scale) return PInvoke.GeometrySetScale(geometry, scalePtr); } /// /// /// Sets the 3D scale of the object. /// /// /// Geometry::setScale /// /// public static void SetScale(this Geometry geometry, in float3 scale) => TrySetScale(geometry, scale).Check(); /// /// /// Retrieves the 3D scale of the object. /// /// /// Geometry::getScale /// /// public static unsafe Result TryGetScale(this Geometry geometry, out float3 scale) { fixed (float3* scalePtr = &scale) return PInvoke.GeometryGetScale(geometry, scalePtr); } /// /// /// Retrieves the 3D scale of the object. /// /// /// Geometry::getScale /// /// public static float3 GetScale(this Geometry geometry) { TryGetScale(geometry, out var scale).Check(); return scale; } /// /// /// Saves the geometry object as a serialized binary block to a user memory buffer. /// /// /// Geometry::save /// /// public static unsafe Result TrySave(this Geometry geometry, nint data, out int dataSize) { fixed (int* dataSizePtr = &dataSize) return PInvoke.GeometrySave(geometry, data, dataSizePtr); } /// /// /// Saves the geometry object as a serialized binary block to a user memory buffer. /// /// /// Geometry::save /// /// public static int Save(this Geometry geometry, nint data) { TrySave(geometry, data, out var dataSize).Check(); return dataSize; } /// /// /// Sets a user value associated with this object. /// /// /// Geometry::setUserData /// /// public static Result TrySetUserData(this Geometry geometry, nint userData) => PInvoke.GeometrySetUserData(geometry, userData); /// /// /// Sets a user value associated with this object. /// /// /// Geometry::setUserData /// /// public static void SetUserData(this Geometry geometry, nint userData) => TrySetUserData(geometry, userData).Check(); /// /// /// Retrieves a user value associated with this object. /// /// /// Geometry::getUserData /// /// public static unsafe Result TryGetUserData(this Geometry geometry, out nint userData) { fixed (nint* userDataPtr = &userData) return PInvoke.GeometryGetUserData(geometry, userDataPtr); } /// /// /// Retrieves a user value associated with this object. /// /// /// Geometry::getUserData /// /// public static nint GetUserData(this Geometry geometry) { TryGetUserData(geometry, out var userData).Check(); return userData; } } }