@@ -102,7 +102,10 @@ private static IrPolygon[] quadToTri(IrPolygon quad) {
102
102
}
103
103
104
104
/**
105
- * Applies smoothing groups to vertex normals.
105
+ * Applies smoothing groups to vertex normals. XXX not implemented!
106
+ *
107
+ * @param mesh ignored
108
+ * @return null
106
109
*/
107
110
public static IrMesh applySmoothingGroups (IrMesh mesh ) {
108
111
return null ;
@@ -125,6 +128,11 @@ public static void toTangentsWithParity(IrMesh mesh) {
125
128
}
126
129
}
127
130
131
+ /**
132
+ * Removes low bone weights from mesh, leaving only 4 bone weights at max.
133
+ *
134
+ * @param vertex the IrVertex to modify (not null)
135
+ */
128
136
private static void trimBoneWeights (IrVertex vertex ) {
129
137
if (vertex .boneWeightsIndices == null ) {
130
138
return ;
@@ -163,6 +171,8 @@ private static void trimBoneWeights(IrVertex vertex) {
163
171
164
172
/**
165
173
* Removes low bone weights from mesh, leaving only 4 bone weights at max.
174
+ *
175
+ * @param mesh the IrMesh to modify (not null)
166
176
*/
167
177
public static void trimBoneWeights (IrMesh mesh ) {
168
178
for (IrPolygon polygon : mesh .polygons ) {
@@ -174,6 +184,8 @@ public static void trimBoneWeights(IrMesh mesh) {
174
184
175
185
/**
176
186
* Convert mesh from quads / triangles to triangles only.
187
+ *
188
+ * @param mesh the input IrMesh (not null)
177
189
*/
178
190
public static void triangulate (IrMesh mesh ) {
179
191
List <IrPolygon > newPolygons = new ArrayList <>(mesh .polygons .length );
@@ -200,6 +212,9 @@ public static void triangulate(IrMesh mesh) {
200
212
* one material each.
201
213
*
202
214
* Polygons without a material will be added to key = -1.
215
+ *
216
+ * @param mesh the input IrMesh (not null)
217
+ * @return a new IntMap containing the resulting meshes
203
218
*/
204
219
public static IntMap <IrMesh > splitByMaterial (IrMesh mesh ) {
205
220
IntMap <List <IrPolygon >> materialToPolyList = new IntMap <>();
@@ -239,6 +254,9 @@ public static IntMap<IrMesh> splitByMaterial(IrMesh mesh) {
239
254
240
255
/**
241
256
* Convert IrMesh to jME3 mesh.
257
+ *
258
+ * @param mesh the input IrMesh (not null)
259
+ * @return a new Mesh
242
260
*/
243
261
public static Mesh convertIrMeshToJmeMesh (IrMesh mesh ) {
244
262
Map <IrVertex , Integer > vertexToVertexIndex = new HashMap <>();
0 commit comments