Ant*_*kiy 1 android matrix opengl-es-2.0
在android.opengl.Matrix类中有两种旋转矩阵的方法,它们是:
static void rotateM (float[] m, int mOffset, float a, float x, float y, float z)
围绕轴(x,y,z)以角度a(以度为单位)旋转矩阵m
static void setRotateM(float[] rm, int rmOffset, float a, float x, float y, float z)
围绕轴(x,y,z)以角度a(以度为单位)旋转矩阵m
这些方法有点不同,但我不明白确切的区别.你能向我解释这个吗?
以上答案是正确的.不过,我有一个小小的通知.请注意,Matrix.rotateM()分配16个字节,因此不要在绘制每个帧时调用它.如果需要,最好使用预先分配的临时矩阵实现自己的旋转方法.更多信息:https://groups.google.com/forum/?fromgroups#!topic / android-Developers /
sw3SpDfPsHY [1-25]
| 归档时间: |
|
| 查看次数: |
4360 次 |
| 最近记录: |