public override void Init() { Point3 SunPos = new Point3(); Point3 SunDir = new Point3(); Sun = new oDBSun(SunPos, SunDir, 20f, PlanetAdvanced2.initSunMass, -9.81f); Objects.Add(Sun); Cam.Z = 50000f; }
public oDBPlanet(Point3 Pos, Point3 Dir, oDBSun Central, float mass, float Red, float Green, float Blue) { if (Central == null) { throw new Exception("Kein Zentralmassiv angegeben"); } Position.assign(Pos); Direction.assign(Dir); Center = Central; _Red = Red; _Green = Green; _Blue = Blue; Mass = mass; Size = (float)((Math.Pow(Mass, (double)(1f / 3f)) * 3f) / (4f * Math.PI)); }