public StaticPlanetObject(Vector3 position, float size, float rotSpeed = 0.003f) : base(position, size) { var rand = new Random(); _model = ModelLoader.LoadModel<LightShaderParameters>("sphere.bin", "Planets/planet" + rand.Next(1,4)); _model.InitStandardLights(); _rotationDelta = new Vector3(rand.NextDouble(-rotSpeed, rotSpeed), rand.NextDouble(-rotSpeed, rotSpeed), rand.NextDouble(-rotSpeed, rotSpeed)); }
public StaticHiResObject(Vector3 position, String texture, float size, float rotSpeed, Vector3 rotationAxis) : base(position, size) { var rand = new Random(); _model = ModelLoader.LoadModel<LightShaderParameters>("planet.bin", texture); _model.InitStandardLights(); _rotationDelta = Matrix.CreateFromAxisAngle(rotationAxis, rotSpeed); }
public OrbitingPlanetObject(Orbit orbit, float size) : base(orbit, size) { var rand = new Random(); _model = ModelLoader.LoadModel<LightShaderParameters>("sphere.bin", "Planets/planet" + rand.Next(1,4)); _model.InitStandardLights(); _rotationDelta = new Vector3((float) (rand.NextDouble() * 0.06 - 0.03), (float) (rand.NextDouble() * 0.06 - 0.03), (float) (rand.NextDouble() * 0.06 - 0.03)); _rotationDelta /= 10; }