Skip to content

Commit b91dd70

Browse files
committed
Minor code changes
1 parent a9d4f68 commit b91dd70

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

chapter-19/src/main/java/org/lwjglb/engine/graph/Mesh.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@ public int getNumVertices() {
138138
public final int getVaoId() {
139139
return vaoId;
140140
}
141-
}
141+
}

chapter-20/src/main/java/org/lwjglb/engine/graph/Mesh.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ public void cleanup() {
116116
glDeleteVertexArrays(vaoId);
117117
}
118118

119+
public Vector3f getAabbMax() {
120+
return aabbMax;
121+
}
122+
123+
public Vector3f getAabbMin() {
124+
return aabbMin;
125+
}
126+
119127
public int getNumVertices() {
120128
return numVertices;
121129
}

chapter-20/src/main/java/org/lwjglb/engine/scene/ModelLoader.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ private static List<Model.Animation> processAnimations(AIScene aiScene, List<Bon
194194
animations.add(animation);
195195

196196
for (int j = 0; j < maxFrames; j++) {
197-
Matrix4f[] bonesMatrices = new Matrix4f[MAX_BONES];
198-
Arrays.fill(bonesMatrices, IDENTITY_MATRIX);
199-
Model.AnimatedFrame animatedFrame = new Model.AnimatedFrame(bonesMatrices);
197+
Matrix4f[] boneMatrices = new Matrix4f[MAX_BONES];
198+
Arrays.fill(boneMatrices, IDENTITY_MATRIX);
199+
Model.AnimatedFrame animatedFrame = new Model.AnimatedFrame(boneMatrices);
200200
buildFrameMatrices(aiAnimation, boneList, animatedFrame, j, rootNode,
201201
rootNode.getNodeTransformation(), globalInverseTransformation);
202202
frames.add(animatedFrame);

0 commit comments

Comments
 (0)