XML文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.example.myapplication.MyMatrixGLSurfaceView
android:id="@+id/glSurfaceView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="旋转:"
android:textSize="16sp" />
<Button
android:id="@+id/rotateXBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="X轴" />
<Button
android:id="@+id/rotateYBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Y轴" />
<Button
android:id="@+id/rotateZBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Z轴" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="缩放:"
android:textSize="16sp" />
<Button
android:id="@+id/scaleXBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="X轴" />
<Button
android:id="@+id/scaleYBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Y轴" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="位移:"
android:textSize="16sp" />
<Button
android:id="@+id/translateXPosBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="X轴" />
<Button
android:id="@+id/translateYPosBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Y轴" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="正交投影:" />
<Button
android:id="@+id/resetBtn"