public BoundingBox3D(D3DEngine d3dEngine, WorldFocusManager worldFocusManager, Vector3 BBDimension, HLSLVertexPositionColor effect, ByteColor color) { _d3dEngine = d3dEngine; _worldFocusManager = worldFocusManager; _wrappedEffect = effect; CreateBBShape(BBDimension, ref color); }
public override void LoadContent() { _renderRasterId = StatesRepository.AddRasterStates(new RasterizerStateDescription() { CullMode = SharpDX.Direct3D11.CullMode.None, FillMode = FillMode.Solid }); _wrappedEffect = new HLSLVertexPositionColor(_d3dEngine, @"D3D\Effects\Basics\VertexPositionColor.hlsl", VertexPositionColor.VertexDeclaration); //_wrappedEffect.CurrentTechnique = _wrappedEffect.Effect.GetTechniqueByIndex(0); ==> Optional, defaulted to 0 ! CreateVertexBuffer(); base.LoadContent(); }
public VisualChunkBase( D3DEngine d3DEngine, WorldFocusManager worldFocusManager, VisualWorldParameters visualWorldParameter, Range3I cubeRange, CameraManager <ICameraFocused> cameraManager, WorldChunks worldChunkManager, VoxelModelManager voxelModelManager, IChunkEntityImpactManager chunkEntityImpactManager, ChunkDataProvider provider = null) : base(provider) { _cachedTrees = new Dictionary <TreeBpSeed, VisualVoxelModel>(); Graphics = new ChunkGraphics(this, d3DEngine); _d3DEngine = d3DEngine; _worldFocusManager = worldFocusManager; _worldChunkManager = worldChunkManager; _chunkEntityImpactManager = chunkEntityImpactManager; #if DEBUG _blockpickedUPEffect = new HLSLVertexPositionColor(_d3DEngine.Device); #endif _visualWorldParameters = visualWorldParameter; _cameraManager = cameraManager; _voxelModelManager = voxelModelManager; _visualVoxelEntities = new Dictionary <string, List <VisualVoxelEntity> >(); EmitterStaticEntities = new List <EntityMetaData>(); OutOfChunkLightSourceStaticEntities = new List <ILightEmitterEntity>(); SoundStaticEntities = new List <IItem>(); CubeRange = cubeRange; State = ChunkState.Empty; Entities.EntityAdded += EntitiesEntityAdded; Entities.EntityRemoved += EntitiesEntityRemoved; Entities.CollectionCleared += EntitiesCollectionCleared; }
public static void Init(D3DEngine d3dEngine) { _debugEffect = new HLSLVertexPositionColor(d3dEngine.Device); }
public override void LoadContent(DeviceContext context) { _blockpickedUPEffect = new HLSLVertexPositionColor(_engine.Device); _pickedCube = new BoundingBox3D(_engine, _focusManager, new Vector3(1.000f, 1.000f, 1.000f), _blockpickedUPEffect, _cursorColor); }
public BoundingBox3D(D3DEngine d3dEngine, Vector3 BBDimension, HLSLVertexPositionColor effect, ByteColor color) { _d3dEngine = d3dEngine; _wrappedEffect = effect; CreateBBShape(BBDimension / 2, ref color); }