Android Open Source - BoxingGame Point Light






From Project

Back to project page BoxingGame.

License

The source code is released under:

Apache License

If you think the Android project BoxingGame listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package uk.co.o2.android.roboexample.opengl.models;
//  www.j  a v  a2 s.  co  m
import org.jetbrains.annotations.NotNull;

/**
 * Created by hostova1 on 08/09/2014.
 */
public class PointLight {

    private float[] mLightAmbient = new float[]{1.0f, 1.0f, 1.0f};
    private float[] mLightDiffuse = new float[]{1.0f, 1.0f, 1.0f};
    private float[] mLightSpecular = new float[]{1.0f, 1.0f, 1.0f};
    private float mSpecularShininess = 5;

    private Vector3 mPosition = new Vector3(0.0f, 0.0f, 0.0f);

    public float[] getAmbientColor() {
        return mLightAmbient;
    }

    public void setAmbientColor(@NotNull float[] ambientColor) {
        this.mLightAmbient = ambientColor;
    }

    public float[] getDiffuseColor() {
        return mLightDiffuse;
    }

    public void setDiffuseColor(@NotNull float[] diffuseColor) {
        this.mLightDiffuse = diffuseColor;
    }

    public float[] getSpecularColor() {
        return mLightSpecular;
    }

    public void setSpecularColor(@NotNull float[] specularColor) {
        this.mLightSpecular = specularColor;
    }

    public void setSpecularShininess(float specularShininess) {
        this.mSpecularShininess = specularShininess;
    }

    public float getSpecularShininess() {
        return mSpecularShininess;
    }


    public Vector3 getPosition() {
        return mPosition;
    }

    public void setPosition(@NotNull Vector3 position) {
        this.mPosition = position;
    }

    public void setPosition(float x, float y, float z) {
        this.mPosition.x = x;
        this.mPosition.y = y;
        this.mPosition.z = z;
    }
}




Java Source Code List

uk.co.o2.android.roboexample.ApplicationTest.java
uk.co.o2.android.roboexample.MyActivity.java
uk.co.o2.android.roboexample.opengl.MyGLRenderer.java
uk.co.o2.android.roboexample.opengl.MyGLSurfaceView.java
uk.co.o2.android.roboexample.opengl.models.Camera.java
uk.co.o2.android.roboexample.opengl.models.CollisionStatus.java
uk.co.o2.android.roboexample.opengl.models.Cube.java
uk.co.o2.android.roboexample.opengl.models.Material.java
uk.co.o2.android.roboexample.opengl.models.MeshEx.java
uk.co.o2.android.roboexample.opengl.models.Object3D.java
uk.co.o2.android.roboexample.opengl.models.Orientation.java
uk.co.o2.android.roboexample.opengl.models.Physics.java
uk.co.o2.android.roboexample.opengl.models.PointLight.java
uk.co.o2.android.roboexample.opengl.models.Shader.java
uk.co.o2.android.roboexample.opengl.models.Texture.java
uk.co.o2.android.roboexample.opengl.models.Vector3.java