Firelight Technologies FMOD Studio API
System::createGeometry
Geometry creation function. This function will create a base geometry object which can then have polygons added to it.
C++ Syntax
FMOD_RESULT System::createGeometry(
int maxpolygons,
int maxvertices,
FMOD::Geometry **geometry
);
C Syntax
FMOD_RESULT FMOD_System_CreateGeometry(
FMOD_SYSTEM *system,
int maxpolygons,
int maxvertices,
FMOD_GEOMETRY **geometry
);
C# Syntax
RESULT System.createGeometry(
int maxpolygons,
int maxvertices,
out Geometry geometry
);
JavaScript Syntax
System.createGeometry(
maxpolygons,
maxvertices,
geometry // writes value to geometry.val
);
Parameters
- maxpolygons
- Maximum number of polygons within this object.
- maxvertices
- Maximum number of vertices within this object.
- geometry
- Address of a variable to receive a newly created FMOD::Geometry object.
Return Values
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.
Remarks
Polygons can be added to a geometry object using Geometry::addPolygon.
A geometry object stores its list of polygons in a structure optimized for quick line intersection testing and efficient insertion and updating.
The structure works best with regularly shaped polygons with minimal overlap.
Many overlapping polygons, or clusters of long thin polygons may not be handled efficiently.
Axis aligned polygons are handled most efficiently.
The same type of structure is used to optimize line intersection testing with multiple geometry objects.
It is important to set the value of maxworldsize to an appropriate value using System::setGeometrySettings.
Objects or polygons outside the range of maxworldsize will not be handled efficiently.
Conversely, if maxworldsize is excessively large, the structure may lose precision and efficiency may drop.
See Also
Version 1.10.03 Built on Feb 1, 2018