public SingleCubeScene(GraphicsDevice graphicsDevice, Vector3 center, float cubeWidth) : base(graphicsDevice, center) { //Create cube cube = new Cube(graphicsDevice, "MainCube" , position: center //We'll rotate around origin so place object there , bounds: new Vector3(cubeWidth, cubeWidth, cubeWidth)); this.AddObject(cube); this.RecommandedSettings.CameraPosition = this.Center + this.cube.Bounds.GetZVector() * 3; this.RecommandedSettings.ArcBallOriginLocked = true; }
public ArrowFieldScene(GraphicsDevice graphicsDevice, Vector3 center) : base(graphicsDevice, center) { for (int i = 0; i < 500; i++) { var cube = new Cube(graphicsDevice, "Cube_" + i.ToString() , new Vector3( (float) (random.NextDouble() - 0.5)*1000, (float) (random.NextDouble() - 0.5)*1000, (float) (random.NextDouble() - 0.5)*1000) , new Vector3(20, 60, 20) , ArrowCubeVertexMultipliers //Enumerable.Range(0, 8).Select(r => (float)random.NextDouble()).ToArray() , null //Enumerable.Range(0,8).Select(r => XnaExtentions.GetRandomColor()).ToArray() ); this.AddObject(cube); this.RecommandedSettings.CameraPosition = new Vector3(0, 0, 500); this.RecommandedSettings.ArcBallOriginLocked = false; } }