Git Refactoring

This commit is contained in:
MrDev023 2016-09-15 12:41:15 +02:00
parent c700911190
commit 55fcb82edd
35 changed files with 2338 additions and 2361 deletions

View file

@ -0,0 +1,18 @@
package fr.technicalgames.light;
import fr.technicalgames.math.*;
public class DirectionalLight extends Light{
public DirectionalLight(Vector3f position, Vector3f intensities,float ambientCoefficient) {
super(new Vector4f(position,0), intensities, 1.0f, ambientCoefficient, 0.0f, new Vector3f());
}
@Override
public void update() {
}
}

View file

@ -0,0 +1,76 @@
package fr.technicalgames.light;
import fr.technicalgames.math.*;
import fr.technicalgames.shadow.*;
public abstract class Light extends Shadow{
public Vector4f position;//w == 0 si c une directional light
public Vector3f intensities;
public float attenuation;
public float ambientCoefficient;
public float coneAngle;
public Vector3f coneDirection;
public Light(Vector4f position,Vector3f intensities,float attenuation,float ambientCoefficient,float coneAngle,Vector3f coneDirection){
super();
this.position = position;
this.intensities = intensities;
this.attenuation = attenuation;
this.ambientCoefficient = ambientCoefficient;
this.coneAngle = coneAngle;
this.coneDirection = coneDirection;
}
public abstract void update();
public Vector4f getPosition() {
return position;
}
public void setPosition(Vector4f position) {
this.position = position;
}
public Vector3f getIntensities() {
return intensities;
}
public void setIntensities(Vector3f intensities) {
this.intensities = intensities;
}
public float getAttenuation() {
return attenuation;
}
public void setAttenuation(float attenuation) {
this.attenuation = attenuation;
}
public float getAmbientCoefficient() {
return ambientCoefficient;
}
public void setAmbientCoefficient(float ambientCoefficient) {
this.ambientCoefficient = ambientCoefficient;
}
public float getConeAngle() {
return coneAngle;
}
public void setConeAngle(float coneAngle) {
this.coneAngle = coneAngle;
}
public Vector3f getConeDirection() {
return coneDirection;
}
public void setConeDirection(Vector3f coneDirection) {
this.coneDirection = coneDirection;
}
}

View file

@ -0,0 +1,17 @@
package fr.technicalgames.light;
import fr.technicalgames.math.*;
public class SpotLight extends Light{
public SpotLight(Vector3f position, Vector3f intensities, float attenuation, float ambientCoefficient,
float coneAngle, Vector3f coneDirection) {
super(new Vector4f(position,1), intensities, attenuation, ambientCoefficient, coneAngle, coneDirection);
}
@Override
public void update() {
}
}