Adds documentation to appearance file

This commit is contained in:
Vicilu 2016-10-14 11:00:11 -03:00 committed by GitHub
parent 38f21e1b05
commit 466619d296

View File

@ -16,26 +16,48 @@ public class Appearance {
private final double shine; private final double shine;
private final Decal texture; private final Decal texture;
/**
* Main constructor
*
* @param paint the color to be used
* @param shine shine of the appearance, will be clamped between 0 and 1
* @param texture The appearance texture
*/
public Appearance(final Color paint, final double shine, final Decal texture) { public Appearance(final Color paint, final double shine, final Decal texture) {
this.paint = paint; this.paint = paint;
this.shine = MathUtil.clamp(shine, 0, 1); this.shine = MathUtil.clamp(shine, 0, 1);
this.texture = texture; this.texture = texture;
} }
/**
* Main constructor
*
* @param paint the color to be used
* @param shine shine of the appearance, will be clamped between 0 and 1
*/
public Appearance(final Color paint, final double shine) { public Appearance(final Color paint, final double shine) {
this.paint = paint; this.paint = paint;
this.shine = MathUtil.clamp(shine, 0, 1); this.shine = MathUtil.clamp(shine, 0, 1);
this.texture = null; this.texture = null;
} }
/**
* @return colr of the appearance
*/
public Color getPaint() { public Color getPaint() {
return paint; return paint;
} }
/**
* @return Shine of appearance
*/
public double getShine() { public double getShine() {
return shine; return shine;
} }
/**
* @return Texture used in appearance
*/
public Decal getTexture() { public Decal getTexture() {
return texture; return texture;
} }