Exemple #1
0
 public Sphere(double radius, SphereColor color, Position3D position, String name)
 {
     Radius = radius;
     Color = color;
     CurrentPosition = position;
     Name = name;
 }
Exemple #2
0
 public Sphere()
 {
     Radius = 0;
     Color = new SphereColor();
     Name = "";
     CurrentPosition = new Position3D(0, 0, 0);
 }
Exemple #3
0
 private static void SetMaterialForSun(SphereColor col, float shinines)
 {
     float red = col.Red, green = col.Green, blue = col.Blue;
     Gl.glColor3d(red, green, blue);
     float[] mat_sun_dif = { red, green, blue, (1.0).ToFloat() };
     float[] mat_sun_spec = { red, green, blue, (1.0).ToFloat() };
     float[] mat_sun_amb = { red, green, blue, (1.0).ToFloat() };
     float[] mat_sun_em = { red*shinines, green*shinines, blue*shinines, (1.0).ToFloat() };
     Gl.glMaterialfv(Gl.GL_FRONT, Gl.GL_DIFFUSE, mat_sun_dif);
     Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_SPECULAR, mat_sun_spec);
     Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_AMBIENT, mat_sun_amb);
     Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_EMISSION, mat_sun_em);
 }
Exemple #4
0
 private static void ReSetMaterialForSun()
 {
     SphereColor c = new SphereColor();
     Gl.glColor3d(c.Red, c.Green, c.Blue);
     float[] mat_sun_dif = { c.Red, c.Green, c.Blue, (1.0).ToFloat() };
     float[] mat_sun_spec = { c.Red, c.Green, c.Blue, (1.0).ToFloat() };
     float[] mat_sun_amb = { c.Red, c.Green, c.Blue, (1.0).ToFloat() };
     float[] mat_sun_em = { c.Red, c.Green, c.Blue, (1.0).ToFloat() };
     Gl.glMaterialfv(Gl.GL_FRONT, Gl.GL_DIFFUSE, mat_sun_dif);
     Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_SPECULAR, mat_sun_spec);
     Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_AMBIENT, mat_sun_amb);
     Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_EMISSION, mat_sun_em);
 }
Exemple #5
0
 public Sphere(double radius, SphereColor color, String name)
 {
     Radius = radius;
     Color = color;
     Name = name;
 }