Loading tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/simplemodel.rs +10 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,14 @@ static float gZoom; static float gLastX; static float gLastY; static float3 toFloat3(float x, float y, float z) { float3 f; f.x = x; f.y = y; f.z = z; return f; } void onActionDown(float x, float y) { gLastX = x; gLastY = y; Loading Loading @@ -104,8 +112,8 @@ void updateMeshInfo() { rsgMeshComputeBoundingBox(info->mMesh, &minX, &minY, &minZ, &maxX, &maxY, &maxZ); info->bBoxMin = (minX, minY, minZ); info->bBoxMax = (maxX, maxY, maxZ); info->bBoxMin = toFloat3(minX, minY, minZ); info->bBoxMax = toFloat3(maxX, maxY, maxZ); gLookAt += (info->bBoxMin + info->bBoxMax)*0.5f; } gLookAt = gLookAt / (float)size; Loading tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs +10 −2 Original line number Diff line number Diff line Loading @@ -57,6 +57,14 @@ static float gZoom; static float gLastX; static float gLastY; static float3 toFloat3(float x, float y, float z) { float3 f; f.x = x; f.y = y; f.z = z; return f; } void onActionDown(float x, float y) { gLastX = x; gLastY = y; Loading Loading @@ -112,8 +120,8 @@ void updateMeshInfo() { rsgMeshComputeBoundingBox(info->mMesh, &minX, &minY, &minZ, &maxX, &maxY, &maxZ); info->bBoxMin = (minX, minY, minZ); info->bBoxMax = (maxX, maxY, maxZ); info->bBoxMin = toFloat3(minX, minY, minZ); info->bBoxMax = toFloat3(maxX, maxY, maxZ); gLookAt += (info->bBoxMin + info->bBoxMax)*0.5f; } gLookAt = gLookAt / (float)size; Loading Loading
tests/RenderScriptTests/ModelViewer/src/com/android/modelviewer/simplemodel.rs +10 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,14 @@ static float gZoom; static float gLastX; static float gLastY; static float3 toFloat3(float x, float y, float z) { float3 f; f.x = x; f.y = y; f.z = z; return f; } void onActionDown(float x, float y) { gLastX = x; gLastY = y; Loading Loading @@ -104,8 +112,8 @@ void updateMeshInfo() { rsgMeshComputeBoundingBox(info->mMesh, &minX, &minY, &minZ, &maxX, &maxY, &maxZ); info->bBoxMin = (minX, minY, minZ); info->bBoxMax = (maxX, maxY, maxZ); info->bBoxMin = toFloat3(minX, minY, minZ); info->bBoxMax = toFloat3(maxX, maxY, maxZ); gLookAt += (info->bBoxMin + info->bBoxMax)*0.5f; } gLookAt = gLookAt / (float)size; Loading
tests/RenderScriptTests/ShadersTest/src/com/android/shaderstest/shaderstest.rs +10 −2 Original line number Diff line number Diff line Loading @@ -57,6 +57,14 @@ static float gZoom; static float gLastX; static float gLastY; static float3 toFloat3(float x, float y, float z) { float3 f; f.x = x; f.y = y; f.z = z; return f; } void onActionDown(float x, float y) { gLastX = x; gLastY = y; Loading Loading @@ -112,8 +120,8 @@ void updateMeshInfo() { rsgMeshComputeBoundingBox(info->mMesh, &minX, &minY, &minZ, &maxX, &maxY, &maxZ); info->bBoxMin = (minX, minY, minZ); info->bBoxMax = (maxX, maxY, maxZ); info->bBoxMin = toFloat3(minX, minY, minZ); info->bBoxMax = toFloat3(maxX, maxY, maxZ); gLookAt += (info->bBoxMin + info->bBoxMax)*0.5f; } gLookAt = gLookAt / (float)size; Loading