示例#1
0
文件: fmod.cs 项目: Cram974/noobzone
        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;
        }
示例#2
0
文件: fmod.cs 项目: Cram974/noobzone
        // 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;
        }