Exemple #1
0
        public void VolumeFillDataPasses()
        {
            var obj = new GameObject();
            var ctx = oiContext.Create(obj.GetInstanceID());

            ctx.Load(Const.VDBSampleFilePath);

            oiVolumeSummary summary = default(oiVolumeSummary);

            ctx.volume.GetSummary(ref summary);

            var volumeData = default(oiVolumeData);
            var list       = new PinnedList <Color>(new Color[summary.voxelCount]);

            volumeData.voxels = list;
            ctx.volume.FillData(ref volumeData);
        }
Exemple #2
0
        public void ContextLoadPasses()
        {
            var obj = new GameObject();
            var ctx = oiContext.Create(obj.GetInstanceID());

            Assert.True(ctx.Load(Const.VDBSampleFilePath));
            Assert.NotNull(ctx.volume);

            oiVolumeSummary summary = default(oiVolumeSummary);

            ctx.volume.GetSummary(ref summary);
            Assert.NotZero(summary.width);
            Assert.NotZero(summary.height);
            Assert.NotZero(summary.depth);
            Assert.NotZero(summary.format);
            Assert.NotZero(summary.voxelCount);
            Object.DestroyImmediate(obj);
        }