Syntax: Color
A Color node contains a list of RGB values (similar to a Coordinate node):
XML Encoding
1 2 |
<Color color='1.0 0.0 0.0, ...'/> |
Classic Encoding
1 2 3 |
Color { color [ 1.0 0.0 0.0, ... ] } |
Used as the color field value of IndexedFaceSet, IndexedLineSet, PointSet or ElevationGrid nodes.
Syntax: PointSet
A PointSet geometry node creates geometry out of points:
- color - provides a list of colors
- Always binds one color to each point, in order
XML Encoding
1 2 3 4 5 6 7 |
<Shape> <Appearance><!-- ... --></Appearance> <PointSet> <Color ... /> <Coordinate ... /> </PointSet> </Shape> |
Classic Encoding
1 2 3 4 5 6 7 |
Shape { appearance Appearance { ... } geometry PointSet { color Color { ... } coord Coordinate { ... } } } |
Syntax: IndexedLineSet
An IndexedLineSet geometry node creates geometry out of lines:
- color - list of colors
- colorIndex - selects colors from list
- colorPerVertex - control color binding
XML Encoding
1 2 3 4 5 6 7 8 9 10 |
<Shape> <Appearance><!-- ... --></Appearance> <IndexedLineSet colorPerVertex='true' colorIndex='...' coordIndex='...'> <Color ... /> <Coordinate ... /> </IndexedLineSet> </Shape> |
Classic Encoding
1 2 3 4 5 6 7 8 9 10 |
Shape { appearance Appearance { ... } geometry IndexedLineSet { colorPerVertex TRUE colorIndex [ ... ] coordIndex [ ... ] color Color { ... } coord Coordinate { ... } } } |
Syntax: IndexedFaceSet
An IndexedFaceSet geometry node creates geometry out of faces:
- color - list of colors
- colorIndex - selects colors from list
- colorPerVertex - control color binding
XML Encoding
1 2 3 4 5 6 7 8 9 10 |
<Shape> <Appearance><!-- ... --></Appearance> <IndexedFaceSet colorPerVertex='true' colorIndex='...' coordIndex='...'> <Color ... /> <Coordinate ... /> </IndexedFaceSet> </Shape> |
Classic Encoding
1 2 3 4 5 6 7 8 9 10 |
Shape { appearance Appearance { ... } geometry IndexedFaceSet { colorPerVertex TRUE colorIndex [ ... ] coordIndex [ ... ] color Color { ... } coord Coordinate { ... } } } |
Syntax: ElevationGrid
An ElevationGrid geometry node creates terrains:
- color - list of colors
- colorPerVertex - control color binding
- Always binds one color to each grid point or square, in order
XML Encoding
1 2 3 4 5 6 7 8 9 |
<Shape> <Appearance><!-- ... --></Appearance> <ElevationGrid ... colorPerVertex='true' height='...'> <Color ... /> </ElevationGrid> </Shape> |
Classic Encoding
1 2 3 4 5 6 7 8 9 |
Shape { appearance Appearance { ... } geometry ElevationGrid { ... colorPerVertex TRUE color Color { ... } height [ ... ] } } |