Exemplo n.º 1
0
    public void TestLockUnlockTriangleData()
    {
        Flex.Library    lib    = Flex.Init(Flex.FLEX_VERSION, ErrorCallback);
        Flex.SolverDesc slvDsc = default(Flex.SolverDesc);
        Flex.SetSolverDescDefaults(ref slvDsc);
        slvDsc.maxParticles = 1000;
        Flex.Solver       solver    = Flex.CreateSolver(lib, ref slvDsc);
        FlexExt.Container container = FlexExt.CreateContainer(lib, solver, 1000);

        FlexExt.TriangleData data = FlexExt.MapTriangleData(container);
        data = default(FlexExt.TriangleData); // @@@

        Assert.AreEqual(IntPtr.Zero, data.indices);

        FlexExt.UnmapTriangleData(container);

        FlexExt.DestroyContainer(container);
        Flex.DestroySolver(solver);
        Flex.Shutdown(lib);
    }