Tabnine Logo
PointLight.set
Code IndexAdd Tabnine to your IDE (free)

How to use
set
method
in
com.badlogic.gdx.graphics.g3d.environment.PointLight

Best Java code snippets using com.badlogic.gdx.graphics.g3d.environment.PointLight.set (Showing top 13 results out of 315)

origin: libgdx/libgdx

public PointLight set (final PointLight copyFrom) {
  return set(copyFrom.color, copyFrom.position, copyFrom.intensity);
}
origin: libgdx/libgdx

public PointLight set (final PointLight copyFrom) {
  return set(copyFrom.color, copyFrom.position, copyFrom.intensity);
}
origin: libgdx/libgdx

@Override
public void begin (final Camera camera, final RenderContext context) {
  super.begin(camera, context);
  for (final DirectionalLight dirLight : directionalLights)
    dirLight.set(0, 0, 0, 0, -1, 0);
  for (final PointLight pointLight : pointLights)
    pointLight.set(0, 0, 0, 0, 0, 0, 0);
  for (final SpotLight spotLight : spotLights)
    spotLight.set(0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0);
  lightsSet = false;
  if (has(u_time)) set(u_time, time += Gdx.graphics.getDeltaTime());
}
origin: libgdx/libgdx

@Override
public void begin (final Camera camera, final RenderContext context) {
  super.begin(camera, context);
  for (final DirectionalLight dirLight : directionalLights)
    dirLight.set(0, 0, 0, 0, -1, 0);
  for (final PointLight pointLight : pointLights)
    pointLight.set(0, 0, 0, 0, 0, 0, 0);
  for (final SpotLight spotLight : spotLights)
    spotLight.set(0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0);
  lightsSet = false;
  if (has(u_time)) set(u_time, time += Gdx.graphics.getDeltaTime());
}
origin: libgdx/libgdx

@Override
public void create () {
  super.create();
  environment.clear();
  environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.2f, 0.2f, 0.2f, 1.0f));
  environment.add(dirLight = new DirectionalLight().set(0.8f, 0.2f, 0.2f, -1f, -2f, -0.5f));
  environment.add(pointLight = new PointLight().set(0.2f, 0.8f, 0.2f, 0f, 0f, 0f, 100f));
  ModelBuilder mb = new ModelBuilder();
  lightModel = mb.createSphere(1, 1, 1, 10, 10, new Material(ColorAttribute.createDiffuse(1, 1, 1, 1)), Usage.Position);
  lightModel.nodes.get(0).parts.get(0).setRenderable(pLight = new Renderable());
}
origin: libgdx/libgdx

protected void randomizeLights () {
  int pointLights = MathUtils.random(5);
  int directionalLights = MathUtils.random(5);
  DefaultShader.Config config = new Config();
  config.numDirectionalLights = directionalLights;
  config.numPointLights = pointLights;
  config.numSpotLights = 0;
  modelBatch.dispose();
  modelBatch = new ModelBatch(new DefaultShaderProvider(config));
  environment = new Environment();
  environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1.f));
  for (int i = 0; i < pointLights; i++) {
    environment.add(new PointLight().set(randomColor(), randomPosition(), MathUtils.random(10f)));
  }
  for (int i = 0; i < directionalLights; i++) {
    environment.add(new DirectionalLight().set(randomColor(), randomPosition()));
  }
}
origin: libgdx/libgdx

  continue;
else
  pointLights[i].set(points.get(i));
origin: libgdx/libgdx

  continue;
else
  pointLights[i].set(points.get(i));
origin: com.badlogicgames.gdx/gdx

public PointLight set (final PointLight copyFrom) {
  return set(copyFrom.color, copyFrom.position, copyFrom.intensity);
}
origin: bladecoder/bladecoder-adventure-engine

private void createEnvirontment() {
  environment = new Environment();
  // environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.8f,
  // 0.8f, 0.8f, 1f));
  // environment.add(new DirectionalLight().set(1f, 1f, 1f, 1f, -1f,
  // -1f));
  if (celLight == null) {
    Node n = null;
    if (currentSource != null)
      n = ((ModelCacheEntry) currentSource).modelInstance.getNode(celLightName);
    if (n != null) {
      celLight = new PointLight().set(1f, 1f, 1f, n.translation, 1f);
    } else {
      celLight = new PointLight().set(1f, 1f, 1f, 0.5f, 1f, 1f, 1f);
    }
  }
  environment.add(celLight);
  if (renderShadow) {
    shadowEnvironment = new Environment();
    shadowEnvironment.add(shadowLight);
    shadowEnvironment.shadowMap = shadowLight;
  }
}
origin: com.badlogicgames.gdx/gdx

@Override
public void begin (final Camera camera, final RenderContext context) {
  super.begin(camera, context);
  for (final DirectionalLight dirLight : directionalLights)
    dirLight.set(0, 0, 0, 0, -1, 0);
  for (final PointLight pointLight : pointLights)
    pointLight.set(0, 0, 0, 0, 0, 0, 0);
  for (final SpotLight spotLight : spotLights)
    spotLight.set(0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0);
  lightsSet = false;
  if (has(u_time)) set(u_time, time += Gdx.graphics.getDeltaTime());
}
origin: jsjolund/GdxDemo3D

private void spawnLight(BlenderLight bLight) {
  Vector3 direction = new Vector3(V3_DOWN);
  direction.rotate(Vector3.X, bLight.rotation.x);
  direction.rotate(Vector3.Z, bLight.rotation.z);
  direction.rotate(Vector3.Y, bLight.rotation.y);
  // TODO: Don't know how to map lamp intensity in blender to libgdx correctly
  float intensity = bLight.lamp_energy;
  float cutoffAngle = bLight.lamp_falloff;
  float exponent = 1;
  if (bLight.type.equals("PointLamp")) {
    BaseLight<?> light = new PointLight().set(
        bLight.lamp_color.r, bLight.lamp_color.g, bLight.lamp_color.b,
        bLight.position, bLight.lamp_energy);
    lights.add(light);
  } else if (bLight.type.equals("SpotLamp")) {
    BaseLight<?> light = new SpotLight().set(bLight.lamp_color, bLight.position,
        direction, intensity, cutoffAngle, exponent);
    lights.add(light);
  } else if (bLight.type.equals("SunLamp")) {
    BaseLight<?> light = new DirectionalLight().set(
        bLight.lamp_color.r,
        bLight.lamp_color.g,
        bLight.lamp_color.b,
        direction.x, direction.y, direction.z);
    lights.add(light);
    shadowCameraDirection.set(direction);
  }
}
origin: com.badlogicgames.gdx/gdx

  continue;
else
  pointLights[i].set(points.get(i));
com.badlogic.gdx.graphics.g3d.environmentPointLightset

Popular methods of PointLight

  • <init>
  • equals

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now