Skip to content

Commit cb41a71

Browse files
committed
Improve javadoc of aabb model.
1 parent d557402 commit cb41a71

File tree

1 file changed

+39
-9
lines changed

1 file changed

+39
-9
lines changed

chunky/src/java/se/llbit/chunky/model/AABBModel.java

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,72 @@
1212
import java.util.Random;
1313

1414
/**
15-
* A block model that is made out of textured AABBs.
15+
* A block model that is made out of textured axis-aligned bounding boxes (AABBs).
1616
*/
1717
@PluginApi
1818
public abstract class AABBModel implements BlockModel {
1919

2020
/**
2121
* Different UV mapping methods.
22-
* - None: No change in mapping
23-
* - ROTATE_90: Rotate 90 degrees clockwise
24-
* - ROTATE_180: Rotate 180 degrees
25-
* - ROTATE_270: Rotate 270 degrees clockwise (90 degrees counterclockwise)
26-
* - FLIP_U: Flip along the X axis (u = 1 - u)
27-
* - FLIP_V: Flip along the Y axis (v = 1 - v)
28-
* <p>
29-
* Note: a value of {@code null} is equivalent to {@code NONE}
3022
*/
3123
public enum UVMapping {
24+
/**
25+
* No change in mapping.
26+
*/
3227
NONE,
28+
/**
29+
* Rotate by 90 degrees clockwise.
30+
*/
3331
ROTATE_90,
32+
/**
33+
* Rotate by 180 degrees.
34+
*/
3435
ROTATE_180,
36+
/**
37+
* Rotate 270 degrees clockwise (90 degrees counter clockwise).
38+
*/
3539
ROTATE_270,
40+
/**
41+
* Mirror horizontally (u = 1 - u).
42+
*/
3643
FLIP_U,
44+
/**
45+
* Mirror vertically (v = 1 - v).
46+
*/
3747
FLIP_V
3848
}
3949

50+
/**
51+
* Get the boxes for this model.
52+
*
53+
* @return An array of boxes.
54+
*/
4055
@PluginApi
4156
public abstract AABB[] getBoxes();
4257

58+
/**
59+
* Get textures for the boxes.
60+
*
61+
* @return An array of textures for the boxes, each in north, east, south, west, top, bottom order.
62+
*/
4363
@PluginApi
4464
public abstract Texture[][] getTextures();
4565

66+
/**
67+
* Get tints for the boxes. If an entry is <code>null</code> or this method returns <code>null</code>, it is equivalent to {@link Tint#NONE}.
68+
*
69+
* @return An array of tints for the boxes, each in north, east, south, west, top, bottom order.
70+
*/
4671
@PluginApi
4772
public Tint[][] getTints() {
4873
return null;
4974
}
5075

76+
/**
77+
* Get UV mappings for the boxes. If an entry is <code>null</code> or this method returns <code>null</code>, it is equivalent to {@link UVMapping#NONE}.
78+
*
79+
* @return An array of UV mappings for the boxes, each in north, east, south, west, top, bottom order.
80+
*/
5181
@PluginApi
5282
public UVMapping[][] getUVMapping() {
5383
return null;

0 commit comments

Comments
 (0)