User Guide

259
If the style parameter is set to #flat, each vertex receives a normal for each face to which it
belongs. Furthermore, all three of the vertices of a face will have the same normal. For example, if
the vertices of
face[1] all receive normal[1] and the vertices of face[2] all receive normal[2],
and the two faces share
vertex[8], then the normal of vertex[8] is normal[1] in face[1] and
normal[2] in face[2]. Use of the #flat parameter results in very clear delineation of the
faces of the mesh.
If the
style parameter is set to #smooth, each vertex receives only one normal, regardless of the
number of faces to which it belongs, and the three vertices of a face can have different normals.
Each vertex normal is the average of the face normals of all of the faces that share the vertex. Use
of the
#smooth parameter results in a more rounded appearance of the faces of the mesh, except at
the outer edges of the faces at the silhouette of the mesh, which are still sharp.
A vertex normal is a direction vector which indicates theforward” direction of a vertex. If the
vertex normal points toward the camera, the colors displayed in the area of the mesh controlled by
that normal are determined by the shader. If the vertex normal points away from the camera, the
area of the mesh controlled by that normal will be non-visible.
After using the
generateNormals() command, you must use the build() command to rebuild
the mesh.
Example
The following statement calculates vertex normals for the model resource named FloorMesh. The
style parameter is set to #smooth, so each vertex in the mesh will receive only one normal.
member("Room").modelResource("FloorMesh").generateNormals(#smooth)
See also
build(), face, normalList, normals, flat
getaProp
Syntax
propertyList.propertyName
getaProp(list, item)
list[listPosition]
propertyList [ #propertyName ]
propertyList [ "propertyName" ]
Description
List command; for linear and property lists, identifies the value associated with the item specified
by
item, listPosition, or propertyName in the list specified by list.
When the list is a linear list, replace item with the number for an items position in a list as
shown by
listPosition. The result is the value at that position.
When the list is a property list, replace item with a property in the list as in propertyName.
The result is the value associated with the property.
The
getaProp command returns VOID when the specified value is not in the list.
When used with linear lists, the
getaProp command has the same function as the getAt command.