Skip to content

Commit

Permalink
Octasphere: add 2 comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jun 22, 2024
1 parent c98fbd3 commit 250b784
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HeartLibrary/src/main/java/jme3utilities/mesh/Octasphere.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ public Octasphere(int numRefineSteps, float radius) {
midpointCache.clear();
assert faces.size() == vpt << (3 + 2 * numRefineSteps);

// Create and fill a position buffer for the mesh:
int numVertices = locations.size();
int numFloats = numAxes * numVertices;
FloatBuffer posBuffer = BufferUtils.createFloatBuffer(numFloats);
Expand All @@ -260,6 +261,7 @@ public Octasphere(int numRefineSteps, float radius) {
posBuffer.flip();
setBuffer(VertexBuffer.Type.Position, numAxes, posBuffer);

// Create an index buffer for the mesh:
int numIndices = faces.size();
IndexBuffer ib = IndexBuffer.createIndexBuffer(numVertices, numIndices);
for (int vertexIndex : faces) {
Expand Down

0 comments on commit 250b784

Please sign in to comment.