Difference between revisions of "Color"

From Web3D.org
Jump to: navigation, search
 
Line 3: Line 3:
  
 
<pre>
 
<pre>
CADAssembly : X3DGroupingNode, X3DProductStructureChildNode {
+
Color : X3DColorNode {  
   MFNode  [in]    addChildren
+
   MFColor [in,out] color    [NULL] [0,1]
  MFNode  [in]    removeChildren
+
   SFNode [in,out] metadata NULL   [X3DMetadataObject]
  MFNode  [in,out] children      []       [X3DProductStructureChildNode]
+
   SFNode   [in,out] metadata       NULL     [X3DMetadataObject]
+
  SFString [in,out] name ""
+
  SFVec3f  []      bboxCenter    0 0 0    (-∞,∞)
+
  SFVec3f  []      bboxSize      -1 -1 -1 [0,∞) or −1 −1 −1
+
 
}
 
}
 
</pre>
 
</pre>
The CADAssembly node holds a set of assemblies or parts grouped together.
 
  
 +
This node defines a set of RGB colours to be used in the fields of another node.
  
The ''children'' field can contain X3DProductStructureChildNode types. Each child will be either a sub-assembly or a part.
 
  
 +
Color nodes are only used to specify multiple colours for a single geometric shape, such as colours for the faces or vertices of an IndexedFaceSet. A Material node is used to specify the overall material parameters of lit geometry. If both a Material node and a Color node are specified for a geometric shape, the colours shall replace the diffuse component of the material.
  
The ''name'' field documents the name of this CADAssembly.
+
 
 +
RGB or RGBA textures take precedence over colours; specifying both an RGB or RGBA texture and a Color node for geometric shape will result in the Color node being ignored. Details on lighting equations can be found in the ''Lighting model'' section of the X3D specification.
  
 
* [[Node Reference]]
 
* [[Node Reference]]

Revision as of 22:53, 1 February 2006

Color

Color : X3DColorNode { 
  MFColor [in,out] color    [NULL] [0,1]
  SFNode  [in,out] metadata NULL   [X3DMetadataObject]
}

This node defines a set of RGB colours to be used in the fields of another node.


Color nodes are only used to specify multiple colours for a single geometric shape, such as colours for the faces or vertices of an IndexedFaceSet. A Material node is used to specify the overall material parameters of lit geometry. If both a Material node and a Color node are specified for a geometric shape, the colours shall replace the diffuse component of the material.


RGB or RGBA textures take precedence over colours; specifying both an RGB or RGBA texture and a Color node for geometric shape will result in the Color node being ignored. Details on lighting equations can be found in the Lighting model section of the X3D specification.