Name |
normal()设置当前正常向量 |
||||||
Examples |
size(100, 100, P3D); noStroke(); background(0); pointLight(150, 250, 150, 10, 30, 50); beginShape(); normal(0, 0, 1); vertex(20, 20, -10); vertex(80, 20, 10); vertex(80, 80, -10); vertex(20, 80, 10); endShape(CLOSE); |
||||||
Description |
Sets the current normal vector. Used for drawing three dimensional shapes and surfaces, normal()specifies a vector perpendicular to a shape’s surface which, in turn, determines how lighting affects it. Processing attempts to automatically assign normals to shapes, but since that’s imperfect, this is a better option when you want more control. This function is identical to glNormal3f() in OpenGL. 设置当前正常向量。用于绘制三维形状和曲面, 法线 () 指定一个垂直于形状表面的向量, 它反过来决定光照对它的影响。处理尝试自动为形状分配法线, 但由于这是不完善的, 所以当您需要更多的控制时, 这是一个更好的选择。此函数与 OpenGL 中的 glNormal3f () 相同。 |
||||||
Syntax |
normal(nx, ny, nz) |
||||||
Parameters |
|
||||||
Returns |
void |
||||||
Related |
beginShape() |
- 本文固定链接: http://iprocessing.cn/2017/08/05/normal设置当前正常向量/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表