|
12 | 12 | import java.util.Random; |
13 | 13 |
|
14 | 14 | /** |
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). |
16 | 16 | */ |
17 | 17 | @PluginApi |
18 | 18 | public abstract class AABBModel implements BlockModel { |
19 | 19 |
|
20 | 20 | /** |
21 | 21 | * 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} |
30 | 22 | */ |
31 | 23 | public enum UVMapping { |
| 24 | + /** |
| 25 | + * No change in mapping. |
| 26 | + */ |
32 | 27 | NONE, |
| 28 | + /** |
| 29 | + * Rotate by 90 degrees clockwise. |
| 30 | + */ |
33 | 31 | ROTATE_90, |
| 32 | + /** |
| 33 | + * Rotate by 180 degrees. |
| 34 | + */ |
34 | 35 | ROTATE_180, |
| 36 | + /** |
| 37 | + * Rotate 270 degrees clockwise (90 degrees counter clockwise). |
| 38 | + */ |
35 | 39 | ROTATE_270, |
| 40 | + /** |
| 41 | + * Mirror horizontally (u = 1 - u). |
| 42 | + */ |
36 | 43 | FLIP_U, |
| 44 | + /** |
| 45 | + * Mirror vertically (v = 1 - v). |
| 46 | + */ |
37 | 47 | FLIP_V |
38 | 48 | } |
39 | 49 |
|
| 50 | + /** |
| 51 | + * Get the boxes for this model. |
| 52 | + * |
| 53 | + * @return An array of boxes. |
| 54 | + */ |
40 | 55 | @PluginApi |
41 | 56 | public abstract AABB[] getBoxes(); |
42 | 57 |
|
| 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 | + */ |
43 | 63 | @PluginApi |
44 | 64 | public abstract Texture[][] getTextures(); |
45 | 65 |
|
| 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 | + */ |
46 | 71 | @PluginApi |
47 | 72 | public Tint[][] getTints() { |
48 | 73 | return null; |
49 | 74 | } |
50 | 75 |
|
| 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 | + */ |
51 | 81 | @PluginApi |
52 | 82 | public UVMapping[][] getUVMapping() { |
53 | 83 | return null; |
|
0 commit comments