Java Doc for ColoringAttributes.java in  » 6.0-JDK-Modules » java-3d » javax » media » j3d » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » java 3d » javax.media.j3d 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.media.j3d.SceneGraphObject
      javax.media.j3d.NodeComponent
         javax.media.j3d.ColoringAttributes

ColoringAttributes
public class ColoringAttributes extends NodeComponent (Code)
The ColoringAttributes object defines attributes used in color selection and shading model.

Color

The setColor methods set the current intrinsic red, green, and blue color values of this ColoringAttributes component object. This color is only used for unlit geometry. If lighting is enabled, the material colors are used in the lighting equation to produce the final color. When vertex colors are present in unlit geometry, those vertex colors are used in place of this ColoringAttributes color, unless the vertex colors are ignored.

There are two variations on the setColor methods, one that takes a Color3f and one that takes three floats. No alpha value is allowed (it's automatically set to 1.0). The float values range between 0.0 and 1.0, with 1.0 being full intensity of the color. A color value of (1.0, 1.0, 1.0) is white.

Shading Model

The setShadeModel method sets the shade model for this ColoringAttributes component object. The shade model may be one of the following:

  • FASTEST - use the fastest available method for shading. This shading mode maps to whatever shading model the Java 3D implementor defines as the "fastest," which may be hardware-dependent.
  • NICEST - use the nicest (highest quality) available method for shading. This shading mode maps to whatever shading model the Java 3D implementor defines as the "nicest," shading model, which may be hardware-dependent.
  • SHADE_FLAT - use the flat shading model. This shading model does not interpolate color across the primitive. The primitive is drawn with a single color and the color of one vertex of the primitive is duplicated across all the vertices of the primitive.
  • SHADE_GOURAUD - use the Gouraud (smooth) shading model. This shading model smoothly interpolates the color at each vertex across the primitive. The primitive is drawn with many different colors and the color at each vertex is treated individually. For lines, the colors along the line segment are interpolated between the vertex colors. This is the default shade model if no other is specified.

See Also:   Appearance


Field Summary
final public static  intALLOW_COLOR_READ
     Specifies that this ColoringAttributes object allows reading its color component information.
final public static  intALLOW_COLOR_WRITE
     Specifies that this ColoringAttributes object allows writing its color component information.
final public static  intALLOW_SHADE_MODEL_READ
     Specifies that this ColoringAttributes object allows reading its shade model component information.
final public static  intALLOW_SHADE_MODEL_WRITE
     Specifies that this ColoringAttributes object allows writing its shade model component information.
final public static  intFASTEST
     Use the fastest available method for shading.
final public static  intNICEST
     Use the nicest available method for shading.
final public static  intSHADE_FLAT
     Do not interpolate color across the primitive.
final public static  intSHADE_GOURAUD
     Smoothly interpolate the color at each vertex across the primitive.

Constructor Summary
public  ColoringAttributes()
     Constructs a ColoringAttributes node with default parameters.
public  ColoringAttributes(Color3f color, int shadeModel)
     Construct ColoringAttributes object with specified values.
public  ColoringAttributes(float red, float green, float blue, int shadeModel)
     Construct ColoringAttributes object with specified values.

Method Summary
public  NodeComponentcloneNodeComponent()
    
 voidcreateRetained()
     Creates a retained mode ColoringAttributesRetained object that this ColoringAttributes component object will point to.
 voidduplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)
     Copies all node information from originalNodeComponent into the current node.
public  voidgetColor(Color3f color)
     Gets the intrinsic color of this ColoringAttributes component object.
public  intgetShadeModel()
     Gets the shade mode for this ColoringAttributes component object.
public  voidsetColor(Color3f color)
     Sets the intrinsic color of this ColoringAttributes component object.
public  voidsetColor(float r, float g, float b)
     Sets the intrinsic color of this ColoringAttributes component object.
public  voidsetShadeModel(int shadeModel)
     Sets the shade mode for this ColoringAttributes component object.
public  StringtoString()
     Returns a String representation of this ColoringAttributes object.

Field Detail
ALLOW_COLOR_READ
final public static int ALLOW_COLOR_READ(Code)
Specifies that this ColoringAttributes object allows reading its color component information.



ALLOW_COLOR_WRITE
final public static int ALLOW_COLOR_WRITE(Code)
Specifies that this ColoringAttributes object allows writing its color component information.



ALLOW_SHADE_MODEL_READ
final public static int ALLOW_SHADE_MODEL_READ(Code)
Specifies that this ColoringAttributes object allows reading its shade model component information.



ALLOW_SHADE_MODEL_WRITE
final public static int ALLOW_SHADE_MODEL_WRITE(Code)
Specifies that this ColoringAttributes object allows writing its shade model component information.



FASTEST
final public static int FASTEST(Code)
Use the fastest available method for shading.



NICEST
final public static int NICEST(Code)
Use the nicest available method for shading.



SHADE_FLAT
final public static int SHADE_FLAT(Code)
Do not interpolate color across the primitive.



SHADE_GOURAUD
final public static int SHADE_GOURAUD(Code)
Smoothly interpolate the color at each vertex across the primitive.




Constructor Detail
ColoringAttributes
public ColoringAttributes()(Code)
Constructs a ColoringAttributes node with default parameters. The default values are as follows:
    color = white (1,1,1)
    shade model = SHADE_GOURAUD



ColoringAttributes
public ColoringAttributes(Color3f color, int shadeModel)(Code)
Construct ColoringAttributes object with specified values.
Parameters:
  color - the intrisic color
Parameters:
  shadeModel - the shade model used; one of FASTEST, NICEST,SHADE_FLAT, or SHADE_GOURAUD



ColoringAttributes
public ColoringAttributes(float red, float green, float blue, int shadeModel)(Code)
Construct ColoringAttributes object with specified values.
Parameters:
  red - red component of the intrisic color
Parameters:
  green - green component of the intrisic color
Parameters:
  blue - blue component of the intrisic color
Parameters:
  shadeModel - the shade model used; one of FASTEST, NICEST,SHADE_FLAT, or SHADE_GOURAUD




Method Detail
cloneNodeComponent
public NodeComponent cloneNodeComponent()(Code)



createRetained
void createRetained()(Code)
Creates a retained mode ColoringAttributesRetained object that this ColoringAttributes component object will point to.



duplicateAttributes
void duplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code)
Copies all node information from originalNodeComponent into the current node. This method is called from the duplicateNode method. This routine does the actual duplication of all "local data" (any data defined in this object).
Parameters:
  originalNodeComponent - the original node to duplicate.
Parameters:
  forceDuplicate - when set to true, causes theduplicateOnCloneTree flag to be ignored. Whenfalse, the value of each node'sduplicateOnCloneTree variable determines whetherNodeComponent data is duplicated or copied.
See Also:   Node.cloneTree
See Also:   NodeComponent.setDuplicateOnCloneTree



getColor
public void getColor(Color3f color)(Code)
Gets the intrinsic color of this ColoringAttributes component object.
Parameters:
  color - the vector that will receive color
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph



getShadeModel
public int getShadeModel()(Code)
Gets the shade mode for this ColoringAttributes component object. shadeModel the shade mode
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph



setColor
public void setColor(Color3f color)(Code)
Sets the intrinsic color of this ColoringAttributes component object. This color is only used for unlit geometry; if lighting is enabled, then the material colors are used in the lighting equation to produce the final color. When vertex colors are present in unlit geometry, those vertex colors are used in place of this ColoringAttributes color unless the vertex colors are ignored.
Parameters:
  color - the color that is used when lighting is disabledor when material is null
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
See Also:   Material
See Also:   RenderingAttributes.setIgnoreVertexColors



setColor
public void setColor(float r, float g, float b)(Code)
Sets the intrinsic color of this ColoringAttributes component object. This color is only used for unlit geometry; if lighting is enabled, then the material colors are used in the lighting equation to produce the final color. When vertex colors are present in unlit geometry, those vertex colors are used in place of this ColoringAttributes color unless the vertex colors are ignored.
Parameters:
  r - the red component of the color
Parameters:
  g - the green component of the color
Parameters:
  b - the blue component of the color
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
See Also:   Material
See Also:   RenderingAttributes.setIgnoreVertexColors



setShadeModel
public void setShadeModel(int shadeModel)(Code)
Sets the shade mode for this ColoringAttributes component object.
Parameters:
  shadeModel - the shade mode to be used; one of FASTEST,NICEST, SHADE_FLAT, or SHADE_GOURAUD
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph



toString
public String toString()(Code)
Returns a String representation of this ColoringAttributes object. If the scene graph is live only those values with their Capability read bit set will be displayed.



Fields inherited from javax.media.j3d.NodeComponent
boolean forceDuplicate(Code)(Java Doc)

Methods inherited from javax.media.j3d.NodeComponent
final void checkDuplicateNodeComponent(NodeComponent originalNodeComponent)(Code)(Java Doc)
public NodeComponent cloneNodeComponent()(Code)(Java Doc)
public NodeComponent cloneNodeComponent(boolean forceDuplicate)(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
void duplicateAttributes(NodeComponent originalNode, boolean forceDuplicate)(Code)(Java Doc)
boolean duplicateChild()(Code)(Java Doc)
public void duplicateNodeComponent(NodeComponent originalNodeComponent)(Code)(Java Doc)
public void duplicateNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate)(Code)(Java Doc)
public boolean getDuplicateOnCloneTree()(Code)(Java Doc)
public void setDuplicateOnCloneTree(boolean duplicate)(Code)(Java Doc)
void validateImageIllegalSharing(ImageComponent image)(Code)(Java Doc)

Fields inherited from javax.media.j3d.SceneGraphObject
Hashtable nodeHashtable(Code)(Java Doc)
SceneGraphObjectRetained retained(Code)(Java Doc)

Methods inherited from javax.media.j3d.SceneGraphObject
final boolean capabilityBitsEmpty()(Code)(Java Doc)
final void checkForLiveOrCompiled()(Code)(Java Doc)
final public void clearCapability(int bit)(Code)(Java Doc)
final public void clearCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void clearLive()(Code)(Java Doc)
void createRetained()(Code)(Java Doc)
protected void duplicateSceneGraphObject(SceneGraphObject originalNode)(Code)(Java Doc)
final public boolean getCapability(int bit)(Code)(Java Doc)
final public boolean getCapabilityIsFrequent(int bit)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
String getNamePrefix()(Code)(Java Doc)
NodeComponent getNodeComponent(NodeComponent originalNodeComponent, boolean forceDuplicate, Hashtable hashtable)(Code)(Java Doc)
public Object getUserData()(Code)(Java Doc)
final public boolean isCompiled()(Code)(Java Doc)
final public boolean isLive()(Code)(Java Doc)
final boolean isLiveOrCompiled()(Code)(Java Doc)
final public void setCapability(int bit)(Code)(Java Doc)
final public void setCapabilityIsFrequent(int bit)(Code)(Java Doc)
final void setCompiled()(Code)(Java Doc)
void setDefaultReadCapabilities(int[] bits)(Code)(Java Doc)
final void setLive()(Code)(Java Doc)
public void setName(String name)(Code)(Java Doc)
public void setUserData(Object userData)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void updateNodeReferences(NodeReferenceTable referenceTable)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.