SetKn5() public method

public SetKn5 ( Kn5 kn5 ) : void
kn5 AcTools.Kn5File.Kn5
return void
Example #1
0
        protected override void InitializeInner() {
            _materialsProvider = new UvMaterialProvider();
            DeviceContextHolder.Set(_materialsProvider);

            _materialsProvider.SetKn5(_kn5);
            _carNode = (Kn5RenderableList)Kn5Converter.Convert(_kn5.RootNode, DeviceContextHolder);
        }
        private void LoadAndAdjustKn5() {
            _materialsProvider = new DepthMaterialProvider();
            _texturesProvider = new TexturesProvider();
            DeviceContextHolder.Set(_materialsProvider);
            DeviceContextHolder.Set(_texturesProvider);

            _materialsProvider.SetKn5(_kn5);

            _carNode = (Kn5RenderableList)Kn5Converter.Convert(_kn5.RootNode, DeviceContextHolder);
            _scene.Add(_carNode);

            _carNode.UpdateBoundingBox();
            _carNode.LocalMatrix = Matrix.Translation(0, UpDelta - (_carNode.BoundingBox?.Minimum.Y ?? 0f), 0) * _carNode.LocalMatrix;
            _scene.UpdateBoundingBox();
        }
Example #3
0
        protected override void InitializeInner() {
            _materialsProvider = CreateMaterialsProvider();
            DeviceContextHolder.Set(_materialsProvider);
            _materialsProvider.SetKn5(_kn5);

            RootNode = (RenderableList)Kn5Converter.Convert(_kn5.RootNode, DeviceContextHolder);

            _buffer0 = TargetResourceTexture.Create(Format.R8G8B8A8_UNorm);
            _buffer1 = TargetResourceTexture.Create(Format.R8G8B8A8_UNorm);
        }