vertex_normal

Set the surface normal for the vertex.

语法:

vertex_normal(buffer, nx, ny, nz);


参数 描述
buffer The buffer to write the information to.
nx The x component of the surface normal.
ny The y component of the surface normal.
nz The z component of the surface normal.


返回: N/A(无返回值)


描述

This function will add surface normal data to the vertex currently being defined for the custom primitive. You supply the buffer to write the data into as well as the x, y and z component parts of the normal.


例如:

vertex_normal(buff, 0, 1, 1);

The above code will set the surface normal of the vertex being defined.


上一页: Building Primitives
下一页: vertex_position
© Copyright YoYo Games Ltd. 2018 All Rights Reserved