| 构造器 | 说明 |
|---|---|
ThreeDimView() |
A constructor used to create a
ThreeDimView instance. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
applyToCanvas(Canvas canvas) |
Applies 3D transformation to the specified canvas.
|
void |
getMatrix(Matrix matrix) |
Obtains the current transformation matrix.
|
void |
rotateX(float degree) |
Rotates the matrix by specified degrees around the X axis.
|
void |
rotateY(float degree) |
Rotates the matrix by specified degrees around the Y axis.
|
void |
rotateZ(float degree) |
Rotates the matrix by specified degrees around the Z axis.
|
public ThreeDimView()
ThreeDimView instance.public void getMatrix(Matrix matrix)
matrix - Indicates the Matrix instance that stores the current transformation matrix.public void rotateX(float degree)
degree - Indicates the degrees that the matrix is rotated around the X axis.public void rotateY(float degree)
degree - Indicates the degrees that the matrix is rotated around the Y axis.public void rotateZ(float degree)
degree - Indicates the degrees that the matrix is rotated around the Z axis.public void applyToCanvas(Canvas canvas)
This method transforms the 3D coordinates and applies the transformed results to the canvas, so as to implement 3D effects on the 2D canvas.
canvas - Indicates the target canvas.