Nodes Home Page  
Node Directory  
Node Hierarchy
Shout3D Nodes Reference
|
The Mesh node is an abstract class that provides fields required by all mesh geometry.
Link to Javadocs.
ccw
BooleanField ccw
USAGE = ANY DEFAULT = true
Determines the direction of the renderable side of the mesh. Changing the value from true to false, or vice versa, "flips the normals" and causes the opposite site of the mesh to render.
More technically, The ccw
field defines the ordering of the vertex coordinates of the geometry with respect to the automatically generated normal vectors used in the lighting model equations. If the value is true, the normals follow the right hand rule; the orientation of each normal with respect to the vertices (taken in order) will be such that the vertices appear to be oriented in a counterclockwise order when the vertices are viewed (in the local coordinate system of the Shape) from the opposite direction as the normal. If the value is false, the normals are oriented in the opposite direction.
colorIndex
IntArrayField colorIndex
USAGE = INDEX_ARRAY DEFAULT = {}
Used, optionally, to apply the list of colors in the Color node of the color
field to specific vertices or faces.If this field is empty, only the coordIndex
field is used for this purpose. In the case of color per polygon (colorPerVertex=false
), the colors in Color node are applied to each polygon in the order in which polygons are specified in thecoordIndex
field. Thus there must be at least as many colors in the Color node as there are polygons in thecoordIndex
field. In the case of vertex color (colorPerVertex=true
), the colors in the Color node are applied to each vertex in each polygon in the order in which vertices are listed in thecoordIndex
field. Thus there must be at least as many colors in the Color node as there are indices (vertices) in thecoordIndex
field.If this field is not empty, the order of polygons or vertices in the coordIndex
field is still used, but the specific color to be assigned is determined by the values in thecolorIndex
. In the case of color per polygon (colorPerVertex=false
), each polygon in thecoordIndex
field is assigned a color using the corresponding index value in thecolorIndex
array. For example, acolorIndex
array beginning [2,0,...] indicates that the third color in the Color node (indexed as 2) is to be applied to the first polygon specified in thecoordIndex
field, and that the first color in the Color node (indexed as 0) is to be applied to the second polygon specified in thecoordIndex
field. In the case of vextex color (colorPerVertex=true
), each vertex in each polygon thecoordIndex
field is assigned a color using the corresponding index value in thecolorIndex
array. For example, acolorIndex
array beginning [2 0 3 -1, ...] indicates that the third color in the Color node is to be applied to the first vertex of first polygon specified in thecoordIndex
field, the first color in the Color node is to be applied to the second vertex of the first polygon, and the fourth color in the Color node is to be applied to the third vertex of the first polygon.
colorPerVertex
BooleanField colorPerVertex
USAGE = ANY DEFAULT = true
If true, the values in the color
field are applied to vertices ("color per vertex" or "vertex colors"). If false, the values in thecolor
field are applied to polygons ("color per polygon"). Applies only if the value in thecolor
field is not null
coordIndex
IntArrayField coordIndex
USAGE = INDEX_ARRAY DEFAULT = {}
Specifies each polygon (or polyline) in the mesh by reference to the vertices in the Coordinate node in the coord
field. -1 and -2 are delimiters indicating the end of a polygon (or polyline). For example, the array {0, 1, 3, -1, 3, 0, 2, -1} specifies two triangular polygons (or polylines). The first one is created by connecting the first, second and fourth vertices listed in the Coordinate array. The second is created by connecting the fourth, first and third vertices listed in the Coordinate array.
color
NodeField color
Inherited from Geometry
USAGE = COLOR_NODE DEFAULT = null
A Color node containing a list of RBG color values.
If this field is null, the geometry is rendered normally, using the material and texture values in the applicable Appearance or MultiAppearance node.
coord
NodeField coord
Inherited from Geometry
USAGE = COORDINATE_NODE DEFAULT = null
Contains a Coordinate node specifying the vertices.
onFieldChange
void onFieldChange(Field theField, java.lang.Object userData)
Copyright© 1999-2001, Shout3D LLC.