首页 > 文档 > applyMatrix()矩阵乘法
2017
07-13

applyMatrix()矩阵乘法

applyMatrix()矩阵乘法

 
 

applyMatrix()矩阵乘法 - 第1张  | Processing编程艺术

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的矩阵与之相乘。



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。