|Top Previous Next|
169: Set3DItemColor(Handle, Index, C1, C2, C3);
This intrinsic sets the color of an sub-item in a 3D object. In the case of Mesh objects, it colors individual triangles.
Handle. This argument is an integer handle created by the Add3DObject intrinsic. It specifies which 3D object the intrinsic will operate on.
Index. This item specifies which sub-item will be colored. The exact result depends on the type of 3D object specified by the handle. Here are the details:
Mesh = The index specifies which triangle should be colored.
Lines = The index specifies which line inside a Line List should be colored.
Strings = The index is ignored and all characters in the string are set to the specified color.
C1, C2, C3: These are integer values that specify the RGB Color to be applied. If the object is a Mesh then C1, C2 and C3 specify the color to be applied to each vertex of the face. If the Viewer is in Smooth mode, the three colors will be interpolated and blended across the surface of the triangle.