Beispiel #1
0
        public void Compile()
        {
            _epicModel = new Psy.Core.EpicModel.EpicModel();

            var cuboid = Cuboid.CreateCuboid();

            cuboid.Size = new Vector3(1.0f, 1.0f, 1.0f);

            _epicModel.ModelParts.Add(cuboid);

            _compiler      = new EpicModelCompiler(_epicModel);
            _compiledModel = _compiler.Compile();
        }
Beispiel #2
0
        public void SetUp()
        {
            _materialCache = new MaterialCache();
            var testmtl = _materialCache.Add("testmtl");

            _epicModel = new Psy.Core.EpicModel.EpicModel();

            var cuboid = Cuboid.CreateCuboid();

            cuboid.Size       = new Vector3(1.0f, 1.0f, 1.0f);
            cuboid.MaterialId = testmtl.Id;

            _epicModel.ModelParts.Add(cuboid);

            _compiler      = new EpicModelCompiler(_epicModel);
            _compiledModel = _compiler.Compile();

            _modelInstance = new ModelInstance(_compiledModel, _materialCache);

            _modelInstance.Update(1 / 24.0f);
        }