applyMatrix()矩阵乘法 |
|
size(100, 100, P3D); noFill(); translate(50, 50, 0); rotateY(PI/6); stroke(153); box(35); //设置旋转角度 float ct = cos(PI/9.0); float st = sin(PI/9.0); // Matrix for rotation around the Y axis applyMatrix( ct, 0.0, st, 0.0, 0.0, 1.0, 0.0, 0.0,-st, 0.0, ct, 0.0,0.0, 0.0,0.0, 1.0); stroke(255); box(50); |
|
描述 |
将当前矩阵乘以指定的参数。在OpenGL的等效功能是glmultmatrix()。 |
语法 |
applyMatrix(source) applyMatrix(n00, n01, n02, n10, n11, n12) applyMatrix(n00, n01, n02, n03, n10, n11, n12, n13, n20, n21, n22, n23, n30, n31, n32, n33)
n00~n33每一个参数都是float类型,这个参数定义了一个4X4的矩阵与之相乘。 |
- 本文固定链接: http://iprocessing.cn/2017/07/13/applymatrix矩阵乘法/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表