style: autoformat
This commit is contained in:
parent
df59522366
commit
ac2837a7af
|
@ -5,6 +5,7 @@ import algebra.*;
|
|||
/**
|
||||
* The Fragment class represents an attributed 'pixel' as generated
|
||||
* by a Rasterizer.
|
||||
*
|
||||
* @author cdehais
|
||||
*/
|
||||
|
||||
|
@ -13,7 +14,8 @@ public class Fragment {
|
|||
private int y;
|
||||
private int numAttributes;
|
||||
|
||||
/* attributes placement:
|
||||
/*
|
||||
* attributes placement:
|
||||
* 0: depth
|
||||
* 1-3: color
|
||||
* 4-6: normal
|
||||
|
@ -40,7 +42,8 @@ public class Fragment {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets a vector attribute at the given starting location and with the given dimension.
|
||||
* Gets a vector attribute at the given starting location and with the given
|
||||
* dimension.
|
||||
*/
|
||||
public double[] getAttribute(int index, int dimension) {
|
||||
double[] attr = new double[dimension];
|
||||
|
@ -62,6 +65,7 @@ public class Fragment {
|
|||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the y pixel coordinate of the Fragment
|
||||
*/
|
||||
|
@ -95,7 +99,7 @@ public class Fragment {
|
|||
}
|
||||
|
||||
public Vector3 getNormal() {
|
||||
return new Vector3 (attributes[0], attributes[1], attributes[2]);
|
||||
return new Vector3(attributes[4], attributes[5], attributes[6]);
|
||||
}
|
||||
|
||||
public void setNormal(Vector normal) {
|
||||
|
@ -129,7 +133,6 @@ public class Fragment {
|
|||
attributes[3] = b;
|
||||
}
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "(" + x + "," + y + ")";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue