public void Update(long elapsedMilliseconds) { foreach (var primitive in _primitives) { primitive.Rotation += new Vector3(1.0f, 10.0f, 1.0f) * (elapsedMilliseconds / 1000.0f); _renderer.AddCube(primitive); } }
public void Update(long elapsedMilliseconds) { foreach (var cube in _cubes) { cube.Rotation += new Vector3(1.10f, 1.1f, 1.03f) * (elapsedMilliseconds / 1000.0f); _renderer.AddCube(cube); } _renderer.EndFrame(); }
public void Update(long elapsedMilliseconds) { foreach (var primitive in _primitives) { primitive.Rotation += new Vector3(1.0f, 10.0f, 1.0f) * (elapsedMilliseconds / 1000.0f); primitive.Color = _colour; _renderer.AddCube(primitive); } _positionAndColourCoordinator.MoveNext(); }
public void Update(long elapsedMilliseconds) { // TODO: Change the rotation of each of the cubes before adding them to the rendere so that the rotation depends on time. // to achieve this you generally multiply a Vector3 with a scalar that has some some or awareness // of the elapsed time foreach (var cube in _cubes) { _renderer.AddCube(cube); } }
public void Update(long elapsedMilliseconds) { foreach (var primitive in _primitives) { primitive.Rotation += new Vector3(1.0f, 10.0f, 1.0f) * (elapsedMilliseconds / 1000.0f); primitive.Color = _colour; _renderer.AddCube(primitive); } var keyboardState = Keyboard.GetState(); if (keyboardState.IsKeyDown(Keys.A) && _lastState.IsKeyUp(Keys.A)) { _channel.Insert(true); } _lastState = keyboardState; _kernel.Step(); }