Beispiel #1
0
 public static DirectionalLight setSunLight(
     World world, float r, float g, float b, float intensity, float x, float y, float z) {
   DirectionalLight sun =
       new DirectionalLight(new Vector3f(r, g, b), intensity, new Vector3f(x, y, z));
   world.getSceneLight().setSun(sun);
   return sun;
 }
Beispiel #2
0
 public static SpotLight addSpotLight(
     World world,
     float r,
     float g,
     float b,
     float x,
     float y,
     float z,
     float intensity,
     float constantA,
     float linearAtt,
     float quadraticAtt,
     float xcone,
     float ycone,
     float zcone,
     float cutoffAngle,
     int pos) {
   SpotLight sl =
       new SpotLight(
           new Vector3f(r, g, b),
           new Vector3f(x, y, z),
           intensity,
           constantA,
           linearAtt,
           quadraticAtt,
           new Vector3f(xcone, ycone, zcone),
           cutoffAngle);
   world.getSceneLight().setSpotLight(sl, pos);
   return sl;
 }
Beispiel #3
0
 public static PointLight addPointLight(
     World world,
     float r,
     float g,
     float b,
     float x,
     float y,
     float z,
     float intensity,
     float constantA,
     float linearAtt,
     float quadraticAtt,
     int pos) {
   PointLight pl =
       new PointLight(
           new Vector3f(r, g, b),
           new Vector3f(x, y, z),
           intensity,
           constantA,
           linearAtt,
           quadraticAtt);
   world.getSceneLight().setPointLight(pl, pos);
   return pl;
 }
Beispiel #4
0
 public static void setAmbientLight(World world, float r, float g, float b, float intensity) {
   AmbientLight ambiant = new AmbientLight(new Vector3f(r, g, b), intensity);
   world.getSceneLight().setAmbient(ambiant);
   // return ambiant;
 }
Beispiel #5
0
 public static DirectionalLight removeSunLight(World world) {
   world.getSceneLight().removeSun();
   return world.getSceneLight().getSun();
 }