Java Doc for PolygonAttributes.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.PolygonAttributes

PolygonAttributes
public class PolygonAttributes extends NodeComponent (Code)
The PolygonAttributes object defines attributes for rendering polygon primitives. Polygon primitives include triangles, triangle strips, triangle fans, and quads. The polygon attributes that can be defined are:

  • Rasterization mode - defines how the polygon is drawn: as points, outlines, or filled.

    • POLYGON_POINT - the polygon is rendered as points drawn at the vertices.
    • POLYGON_LINE - the polygon is rendered as lines drawn between consecutive vertices.
    • POLYGON_FILL - the polygon is rendered by filling the interior between the vertices. The default mode.
  • Face culling - defines which polygons are culled (discarded) before they are converted to screen coordinates.

    • CULL_NONE - disables face culling.
    • CULL_BACK - culls all back-facing polygons. The default.
    • CULL_FRONT - culls all front-facing polygons.
  • Back-face normal flip - specifies whether vertex normals of back-facing polygons are flipped (negated) prior to lighting. The setting is either true, meaning to flip back-facing normals, or false. The default is false.
  • Offset - the depth values of all pixels generated by polygon rasterization can be offset by a value that is computed for that polygon. Two values are used to specify the offset:
    • Offset bias - the constant polygon offset that is added to the final device coordinate Z value of polygon primitives.
    • Offset factor - the factor to be multiplied by the slope of the polygon and then added to the final, device coordinate Z value of the polygon primitives.
    These values can be either positive or negative. The default for both of these values is 0.0.


See Also:   Appearance


Field Summary
final public static  intALLOW_CULL_FACE_READ
     Specifies that this PolygonAttributes object allows reading its cull face information.
final public static  intALLOW_CULL_FACE_WRITE
     Specifies that this PolygonAttributes object allows writing its cull face information.
final public static  intALLOW_MODE_READ
     Specifies that this PolygonAttributes object allows reading its polygon mode information.
final public static  intALLOW_MODE_WRITE
     Specifies that this PolygonAttributes object allows writing its polygon mode information.
final public static  intALLOW_NORMAL_FLIP_READ
     Specifies that this PolygonAttributes object allows reading its back face normal flip flag.
final public static  intALLOW_NORMAL_FLIP_WRITE
     Specifies that this PolygonAttributes object allows writing its back face normal flip flag.
final public static  intALLOW_OFFSET_READ
     Specifies that this PolygonAttributes object allows reading its polygon offset information.
final public static  intALLOW_OFFSET_WRITE
     Specifies that this PolygonAttributes object allows writing its polygon offset information.
final public static  intCULL_BACK
     Cull all back-facing polygons.
final public static  intCULL_FRONT
     Cull all front-facing polygons.
final public static  intCULL_NONE
     Don't perform any face culling.
final public static  intPOLYGON_FILL
     Render polygonal primitives by filling the interior of the polygon.
final public static  intPOLYGON_LINE
     Render polygonal primitives as lines drawn between consecutive vertices of the polygon.
final public static  intPOLYGON_POINT
     Render polygonal primitives as points drawn at the vertices of the polygon.

Constructor Summary
public  PolygonAttributes()
     Constructs a PolygonAttributes object with default parameters.
public  PolygonAttributes(int polygonMode, int cullFace, float polygonOffset)
     Constructs a PolygonAttributes object with specified values.
public  PolygonAttributes(int polygonMode, int cullFace, float polygonOffset, boolean backFaceNormalFlip)
     Constructs PolygonAttributes object with specified values.
public  PolygonAttributes(int polygonMode, int cullFace, float polygonOffset, boolean backFaceNormalFlip, float polygonOffsetFactor)
     Constructs PolygonAttributes object with specified values.

Method Summary
public  NodeComponentcloneNodeComponent()
    
 voidcreateRetained()
     Creates a retained mode PolygonAttributesRetained object that this PolygonAttributes component object will point to.
 voidduplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)
     Copies all node information from originalNodeComponent into the current node.
public  booleangetBackFaceNormalFlip()
     Gets the back face normal flip flag.
public  intgetCullFace()
     Gets the face culling for this appearance component object.
public  intgetPolygonMode()
     Gets the polygon rasterization mode for this appearance component object.
public  floatgetPolygonOffset()
     Gets the constant polygon offset.
public  floatgetPolygonOffsetFactor()
     Gets the polygon offset factor.
public  voidsetBackFaceNormalFlip(boolean backFaceNormalFlip)
     Sets the back face normal flip flag to the specified value. This flag indicates whether vertex normals of back facing polygons should be flipped (negated) prior to lighting.
public  voidsetCullFace(int cullFace)
     Sets the face culling for this appearance component object.
public  voidsetPolygonMode(int polygonMode)
     Sets the polygon rasterization mode for this appearance component object.
public  voidsetPolygonOffset(float polygonOffset)
     Sets the constant polygon offset to the specified value.
public  voidsetPolygonOffsetFactor(float polygonOffsetFactor)
     Sets the polygon offset factor to the specified value.

Field Detail
ALLOW_CULL_FACE_READ
final public static int ALLOW_CULL_FACE_READ(Code)
Specifies that this PolygonAttributes object allows reading its cull face information.



ALLOW_CULL_FACE_WRITE
final public static int ALLOW_CULL_FACE_WRITE(Code)
Specifies that this PolygonAttributes object allows writing its cull face information.



ALLOW_MODE_READ
final public static int ALLOW_MODE_READ(Code)
Specifies that this PolygonAttributes object allows reading its polygon mode information.



ALLOW_MODE_WRITE
final public static int ALLOW_MODE_WRITE(Code)
Specifies that this PolygonAttributes object allows writing its polygon mode information.



ALLOW_NORMAL_FLIP_READ
final public static int ALLOW_NORMAL_FLIP_READ(Code)
Specifies that this PolygonAttributes object allows reading its back face normal flip flag.



ALLOW_NORMAL_FLIP_WRITE
final public static int ALLOW_NORMAL_FLIP_WRITE(Code)
Specifies that this PolygonAttributes object allows writing its back face normal flip flag.



ALLOW_OFFSET_READ
final public static int ALLOW_OFFSET_READ(Code)
Specifies that this PolygonAttributes object allows reading its polygon offset information.



ALLOW_OFFSET_WRITE
final public static int ALLOW_OFFSET_WRITE(Code)
Specifies that this PolygonAttributes object allows writing its polygon offset information.



CULL_BACK
final public static int CULL_BACK(Code)
Cull all back-facing polygons. This is the default mode.



CULL_FRONT
final public static int CULL_FRONT(Code)
Cull all front-facing polygons.



CULL_NONE
final public static int CULL_NONE(Code)
Don't perform any face culling.



POLYGON_FILL
final public static int POLYGON_FILL(Code)
Render polygonal primitives by filling the interior of the polygon.



POLYGON_LINE
final public static int POLYGON_LINE(Code)
Render polygonal primitives as lines drawn between consecutive vertices of the polygon.



POLYGON_POINT
final public static int POLYGON_POINT(Code)
Render polygonal primitives as points drawn at the vertices of the polygon.




Constructor Detail
PolygonAttributes
public PolygonAttributes()(Code)
Constructs a PolygonAttributes object with default parameters. The default values are as follows:
    cull face : CULL_BACK
    back face normal flip : false
    polygon mode : POLYGON_FILL
    polygon offset : 0.0
    polygon offset factor : 0.0



PolygonAttributes
public PolygonAttributes(int polygonMode, int cullFace, float polygonOffset)(Code)
Constructs a PolygonAttributes object with specified values.
Parameters:
  polygonMode - polygon rasterization mode; one of POLYGON_POINT,POLYGON_LINE, or POLYGON_FILL
Parameters:
  cullFace - polygon culling mode; one of CULL_NONE,CULL_BACK, or CULL_FRONT
Parameters:
  polygonOffset - constant polygon offset



PolygonAttributes
public PolygonAttributes(int polygonMode, int cullFace, float polygonOffset, boolean backFaceNormalFlip)(Code)
Constructs PolygonAttributes object with specified values.
Parameters:
  polygonMode - polygon rasterization mode; one of POLYGON_POINT,POLYGON_LINE, or POLYGON_FILL
Parameters:
  cullFace - polygon culling mode; one of CULL_NONE,CULL_BACK, or CULL_FRONT
Parameters:
  polygonOffset - constant polygon offset
Parameters:
  backFaceNormalFlip - back face normal flip flag; true or false



PolygonAttributes
public PolygonAttributes(int polygonMode, int cullFace, float polygonOffset, boolean backFaceNormalFlip, float polygonOffsetFactor)(Code)
Constructs PolygonAttributes object with specified values.
Parameters:
  polygonMode - polygon rasterization mode; one of POLYGON_POINT,POLYGON_LINE, or POLYGON_FILL
Parameters:
  cullFace - polygon culling mode; one of CULL_NONE,CULL_BACK, or CULL_FRONT
Parameters:
  polygonOffset - constant polygon offset
Parameters:
  backFaceNormalFlip - back face normal flip flag; true or false
Parameters:
  polygonOffsetFactor - polygon offset factor for slope-based polygonoffset
since:
   Java 3D 1.2




Method Detail
cloneNodeComponent
public NodeComponent cloneNodeComponent()(Code)



createRetained
void createRetained()(Code)
Creates a retained mode PolygonAttributesRetained object that this PolygonAttributes 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



getBackFaceNormalFlip
public boolean getBackFaceNormalFlip()(Code)
Gets the back face normal flip flag. the back face normal flip flag
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getCullFace
public int getCullFace()(Code)
Gets the face culling for this appearance component object. the face to be culled
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getPolygonMode
public int getPolygonMode()(Code)
Gets the polygon rasterization mode for this appearance component object. the polygon rasterization mode
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getPolygonOffset
public float getPolygonOffset()(Code)
Gets the constant polygon offset. the constant polygon offset
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getPolygonOffsetFactor
public float getPolygonOffsetFactor()(Code)
Gets the polygon offset factor. the polygon offset factor.
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.2



setBackFaceNormalFlip
public void setBackFaceNormalFlip(boolean backFaceNormalFlip)(Code)
Sets the back face normal flip flag to the specified value. This flag indicates whether vertex normals of back facing polygons should be flipped (negated) prior to lighting. When this flag is set to true and back face culling is disabled, polygons are rendered as if the polygon had two sides with opposing normals. This feature is disabled by default.
Parameters:
  backFaceNormalFlip - the back face normal flip flag
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setCullFace
public void setCullFace(int cullFace)(Code)
Sets the face culling for this appearance component object.
Parameters:
  cullFace - the face to be culled, one of:CULL_NONE, CULL_FRONT, or CULL_BACK
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setPolygonMode
public void setPolygonMode(int polygonMode)(Code)
Sets the polygon rasterization mode for this appearance component object.
Parameters:
  polygonMode - the polygon rasterization mode to be used; one ofPOLYGON_FILL, POLYGON_LINE, or POLYGON_POINT
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setPolygonOffset
public void setPolygonOffset(float polygonOffset)(Code)
Sets the constant polygon offset to the specified value. This screen space offset is added to the final, device coordinate Z value of polygon primitives.
Parameters:
  polygonOffset - the constant polygon offset
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setPolygonOffsetFactor
public void setPolygonOffsetFactor(float polygonOffsetFactor)(Code)
Sets the polygon offset factor to the specified value. This factor is multiplied by the slope of the polygon, and then added to the final, device coordinate Z value of polygon primitives.
Parameters:
  polygonOffsetFactor - the polygon offset factor
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph
since:
   Java 3D 1.2



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.