protected override void InitializeInner() { DeviceContextHolder.Set <IMaterialsFactory>(new DepthMaterialsFactory()); DeviceContextHolder.Set <IAlphaTexturesProvider>(new AlphaTexturesProvider(Kn5)); CarNode = (RenderableList)Kn5RenderableDepthOnlyObject.Convert(Kn5.RootNode); Scene.Add(CarNode); ApplyCarState(); Scene.UpdateBoundingBox(); }
private void LoadAndAdjustKn5() { DeviceContextHolder.Set <IMaterialsFactory>(new DepthMaterialsFactory()); _carNode = (RenderableList)Kn5RenderableDepthOnlyObject.Convert(_kn5.RootNode); _scene.Add(_carNode); _carNode.UpdateBoundingBox(); _carNode.LocalMatrix = Matrix.Translation(0, UpDelta - (_carNode.BoundingBox?.Minimum.Y ?? 0f), 0) * _carNode.LocalMatrix; _scene.UpdateBoundingBox(); }