Skip to content

Commit 5d172ce

Browse files
author
monkstone
committed
update java files
1 parent 2e95242 commit 5d172ce

File tree

124 files changed

+1628
-1328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+1628
-1328
lines changed

ext/toxi/color/LuminanceAccessor.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ public float getComponentValueFor(ReadonlyTColor col) {
5555
* The setter for this accessor is not doing anything, since the luminance
5656
* of a color is a coputed value depending on 3 color channels.
5757
*
58-
* @param col
59-
* @param value
6058
* @see toxi.color.AccessCriteria#setComponentValueFor(toxi.color.TColor,
6159
* float)
6260
*/

ext/toxi/color/TColor.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,7 @@ public TColor adjustRGB(float r, float g, float b) {
568568
*
569569
* @see toxi.color.ReadonlyTColor#alpha()
570570
*/
571+
@Override
571572
public float alpha() {
572573
return alpha;
573574
}
@@ -866,6 +867,7 @@ public TColor getRotatedRYB(float theta) {
866867
*
867868
* @see toxi.color.ReadonlyTColor#getRotatedRYB(int)
868869
*/
870+
@Override
869871
public TColor getRotatedRYB(int angle) {
870872
return new TColor(this).rotateRYB(angle);
871873
}
@@ -875,6 +877,7 @@ public TColor getRotatedRYB(int angle) {
875877
*
876878
* @see toxi.color.ReadonlyTColor#getSaturated(float)
877879
*/
880+
@Override
878881
public TColor getSaturated(float step) {
879882
return new TColor(this).saturate(step);
880883
}
@@ -884,6 +887,7 @@ public TColor getSaturated(float step) {
884887
*
885888
* @see toxi.color.ReadonlyTColor#green()
886889
*/
890+
@Override
887891
public float green() {
888892
return rgb[1];
889893
}
@@ -903,6 +907,7 @@ public int hashCode() {
903907
*
904908
* @see toxi.color.ReadonlyTColor#hue()
905909
*/
910+
@Override
906911
public float hue() {
907912
return hsv[0];
908913
}

ext/toxi/geom/AABB.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,11 @@ public boolean intersectsSphere(Vec3D c, float r) {
317317
return d <= r * r;
318318
}
319319

320+
/**
321+
*
322+
* @param tri
323+
* @return
324+
*/
320325
public boolean intersectsTriangle(Triangle3D tri) {
321326
// use separating axis theorem to test overlap between triangle and box
322327
// need to test for overlap in these directions:
@@ -443,7 +448,7 @@ private boolean planeBoxOverlap(Vec3D normal, float d, Vec3D maxbox) {
443448
if (normal.dot(vmin) + d > 0.0f) {
444449
return false;
445450
}
446-
return normal.dot(vmax) + d >= 0.0f;
451+
return (normal.dot(vmax) + d >= 0.0f); // returns true or false
447452
}
448453

449454
public AABB set(AABB box) {

ext/toxi/geom/Axis3D.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,23 @@ public class Axis3D {
3434

3535
/**
3636
* Creates a new x-Axis3D object from the world origin.
37+
* @return
3738
*/
3839
public static final Axis3D xAxis() {
3940
return new Axis3D(Vec3D.X_AXIS);
4041
}
4142

4243
/**
4344
* Creates a new y-Axis3D object from the world origin.
45+
* @return
4446
*/
4547
public static final Axis3D yAxis() {
4648
return new Axis3D(Vec3D.Y_AXIS);
4749
}
4850

4951
/**
5052
* Creates a new z-Axis3D object from the world origin.
53+
* @return
5154
*/
5255
public static final Axis3D zAxis() {
5356
return new Axis3D(Vec3D.Z_AXIS);

ext/toxi/geom/AxisAlignedCylinder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public float getRadius() {
8282
* @param length
8383
* the length to set
8484
*/
85-
public void setLength(float length) {
85+
public final void setLength(float length) {
8686
this.length = length;
8787
}
8888

@@ -97,7 +97,7 @@ public void setPosition(Vec3D pos) {
9797
/**
9898
* @param radius
9999
*/
100-
public void setRadius(float radius) {
100+
public final void setRadius(float radius) {
101101
this.radius = radius;
102102
this.radiusSquared = radius * radius;
103103
}

ext/toxi/geom/BezierCurve2D.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static Vec2D computeTangentInSegment(Vec2D a, Vec2D b, Vec2D c,
3131
return new Vec2D(x, y).normalize();
3232
}
3333

34-
private List<Vec2D> points;
34+
private final List<Vec2D> points;
3535

3636
public BezierCurve2D() {
3737
points = new ArrayList<Vec2D>();

ext/toxi/geom/BezierCurve3D.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static Vec3D computeTangentInSegment(Vec3D a, Vec3D b, Vec3D c,
3232
return new Vec3D(x, y, z).normalize();
3333
}
3434

35-
private List<Vec3D> points;
35+
private final List<Vec3D> points;
3636

3737
public BezierCurve3D() {
3838
points = new ArrayList<Vec3D>();

ext/toxi/geom/BoxIntersector.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ public AABB getBox() {
1717
return box;
1818
}
1919

20+
@Override
2021
public IsectData3D getIntersectionData() {
2122
return isec;
2223
}
2324

25+
@Override
2426
public boolean intersectsRay(Ray3D ray) {
2527
final Vec3D pos = box.intersectsRay(ray, 0, Float.MAX_VALUE);
2628
isec.pos = pos;

ext/toxi/geom/CircleIntersector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
public class CircleIntersector implements Intersector2D {
3636

37-
private IsectData2D isec = new IsectData2D();
37+
private final IsectData2D isec = new IsectData2D();
3838
private Circle circle;
3939

4040
public CircleIntersector(Circle circle) {

ext/toxi/geom/ConvexPolygonClipper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected boolean isKnownVertex(List<Vec2D> list, Vec2D q) {
101101
return false;
102102
}
103103

104-
public void setBounds(Polygon2D bounds) {
104+
public final void setBounds(Polygon2D bounds) {
105105
this.bounds = bounds;
106106
this.boundsCentroid = bounds.getCentroid();
107107
}

0 commit comments

Comments
 (0)