- int vertexIndex = 0u; // Tracks progress through vertices.
- float scaledX = 0.5f * dimensions.x;
- float scaledY = 0.5f * dimensions.y;
- float scaledZ = 0.5f * dimensions.z;
- float verticalTextureCoord = reflectVerticalUVs ? 0.0f : 1.0f;
-
- vertices.Resize( 4u * 6u ); // 4 vertices x 6 faces
-
- Vector<Vector3> positions; // Stores vertex positions, which are shared between vertexes at the same position but with a different normal.
- positions.Resize( 8u );
- Vector<Vector3> normals; // Stores normals, which are shared between vertexes of the same face.
- normals.Resize( 6u );
-
- positions[0] = Vector3( -scaledX, scaledY, -scaledZ );
- positions[1] = Vector3( scaledX, scaledY, -scaledZ );
- positions[2] = Vector3( scaledX, scaledY, scaledZ );
- positions[3] = Vector3( -scaledX, scaledY, scaledZ );
- positions[4] = Vector3( -scaledX, -scaledY, -scaledZ );
- positions[5] = Vector3( scaledX, -scaledY, -scaledZ );
- positions[6] = Vector3( scaledX, -scaledY, scaledZ );
- positions[7] = Vector3( -scaledX, -scaledY, scaledZ );
-
- normals[0] = Vector3( 0, 1, 0 );
- normals[1] = Vector3( 0, 0, -1 );
- normals[2] = Vector3( 1, 0, 0 );
- normals[3] = Vector3( 0, 0, 1 );
- normals[4] = Vector3( -1, 0, 0 );
- normals[5] = Vector3( 0, -1, 0 );
+ int vertexIndex = 0u; // Tracks progress through vertices.
+ float scaledX = 0.5f * dimensions.x;
+ float scaledY = 0.5f * dimensions.y;
+ float scaledZ = 0.5f * dimensions.z;
+ float verticalTextureCoord = reflectVerticalUVs ? 0.0f : 1.0f;
+
+ vertices.Resize(4u * 6u); // 4 vertices x 6 faces
+
+ Vector<Vector3> positions; // Stores vertex positions, which are shared between vertexes at the same position but with a different normal.
+ positions.Resize(8u);
+ Vector<Vector3> normals; // Stores normals, which are shared between vertexes of the same face.
+ normals.Resize(6u);
+
+ positions[0] = Vector3(-scaledX, scaledY, -scaledZ);
+ positions[1] = Vector3(scaledX, scaledY, -scaledZ);
+ positions[2] = Vector3(scaledX, scaledY, scaledZ);
+ positions[3] = Vector3(-scaledX, scaledY, scaledZ);
+ positions[4] = Vector3(-scaledX, -scaledY, -scaledZ);
+ positions[5] = Vector3(scaledX, -scaledY, -scaledZ);
+ positions[6] = Vector3(scaledX, -scaledY, scaledZ);
+ positions[7] = Vector3(-scaledX, -scaledY, scaledZ);
+
+ normals[0] = Vector3(0, 1, 0);
+ normals[1] = Vector3(0, 0, -1);
+ normals[2] = Vector3(1, 0, 0);
+ normals[3] = Vector3(0, 0, 1);
+ normals[4] = Vector3(-1, 0, 0);
+ normals[5] = Vector3(0, -1, 0);