Beispiel #1
0
		public RESULT loadGeometry(IntPtr data, int datasize, ref Geometry geometry)
		{
			RESULT result           = RESULT.OK;
			IntPtr      geometryraw    = new IntPtr();
			Geometry    geometrynew    = null;

			try
			{
				result = FMOD_System_LoadGeometry(systemraw, data, datasize, ref geometryraw);
			}
			catch
			{
				result = RESULT.ERR_INVALID_PARAM;
			}
			if (result != RESULT.OK)
			{
				return result;
			}

			if (geometry == null)
			{
				geometrynew = new Geometry();
				geometrynew.setRaw(geometryraw);
				geometry = geometrynew;
			}
			else
			{
				geometry.setRaw(geometryraw);
			}

			return result;
		} 
Beispiel #2
0
		// Geometry api 
		public RESULT createGeometry         (int maxpolygons, int maxvertices, ref Geometry geometry)
		{
			RESULT result           = RESULT.OK;
			IntPtr geometryraw      = new IntPtr();
			Geometry geometrynew    = null;

			try
			{
				result = FMOD_System_CreateGeometry(systemraw, maxpolygons, maxvertices, ref geometryraw);
			}
			catch
			{
				result = RESULT.ERR_INVALID_PARAM;
			}
			if (result != RESULT.OK)
			{
				return result;
			}

			if (geometry == null)
			{
				geometrynew = new Geometry();
				geometrynew.setRaw(geometryraw);
				geometry = geometrynew;
			}
			else
			{
				geometry.setRaw(geometryraw);
			}

			return result;
		}