sample-page-curl: add comments to variables, etc.

This commit is contained in:
Philip Rideout
2020-07-24 13:39:32 -07:00
parent e34db6fc29
commit 2f4dd0bbd4
4 changed files with 10 additions and 10 deletions

View File

@@ -105,13 +105,13 @@ public class Page {
final float e = 0.01f;
final int count = this.positions.capacity() / 3;
float[] p = new float[3];
float[] p1 = new float[3];
float[] p2 = new float[3];
float[] du = new float[3];
float[] dv = new float[3];
float[] n = new float[3];
float[] q = new float[4];
float[] p = new float[3]; // position of the current vertex
float[] p1 = new float[3]; // position of neighboring vertex along the U axis
float[] p2 = new float[3]; // position of neighboring vertex along the V axis
float[] du = new float[3]; // tangent vector along the U axis
float[] dv = new float[3]; // tangent vector along the V axis
float[] n = new float[3]; // normal vector (du x dv)
float[] q = new float[4]; // quaternion for the tangent frame
for (int i = 0; i < count; i++) {
final float u = this.uvs.get(i * 2);

View File

@@ -46,7 +46,7 @@ public class PageMaterials {
}
public PageMaterials(Engine engine, AssetManager assets) {
ByteBuffer asset = readAsset(assets, "materials/lit.filamat");
ByteBuffer asset = readAsset(assets, "materials/curl.filamat");
assert asset != null;
mMaterial = new Material.Builder()
.payload(asset, asset.remaining())

View File

@@ -1,5 +1,5 @@
material {
name : lit,
name : curl,
shadingModel : lit,
doubleSided: true,
parameters : [

View File

@@ -1,3 +1,3 @@
<resources>
<string name="app_name">Lit Cube</string>
<string name="app_name">Page Curl</string>
</resources>