applyMatrix()

本参考资料用于Processing 3.0+。 如果你使用的是前一版本,请在使用软件帮助菜单内的参考资料。. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Core Javadoc and Libraries Javadoc.

名称

applyMatrix()

示例
 size(100, 100, P3D);

noFill();

translate(50, 50, 0);

rotateY(PI/6);

stroke(153);

box(35);

// Set rotation anglesfloat 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);

描述 Multiplies the current matrix by the one specified through the parameters. This is very slow because it will try to calculate the inverse of the transform, so a
void it whenever possible. The equivalent function in OpenGL is 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 float: numbers which define the 4×4 matrix to be multiplied
n01 float: numbers which define the 4×4 matrix to be multiplied
n02 float: numbers which define the 4×4 matrix to be multiplied
n10 float: numbers which define the 4×4 matrix to be multiplied
n11 float: numbers which define the 4×4 matrix to be multiplied
n12 float: numbers which define the 4×4 matrix to be multiplied
n03 float: numbers which define the 4×4 matrix to be multiplied
n13 float: numbers which define the 4×4 matrix to be multiplied
n20 float: numbers which define the 4×4 matrix to be multiplied
n21 float: numbers which define the 4×4 matrix to be multiplied
n22 float: numbers which define the 4×4 matrix to be multiplied
n23 float: numbers which define the 4×4 matrix to be multiplied
n30 float: numbers which define the 4×4 matrix to be multiplied
n31 float: numbers which define the 4×4 matrix to be multiplied
n32 float: numbers which define the 4×4 matrix to be multiplied
n33 float: numbers which define the 4×4 matrix to be multiplied
返回值 void
相关 pushMatrix()
popMatrix()
resetMatrix()
printMatrix()

Updated on October 2, 2018 05:02:09pm EDT

applyMatrix()