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

TransparencyAttributes
public class TransparencyAttributes extends NodeComponent (Code)
The TransparencyAttributes object defines all attributes affecting transparency of the object. The transparency attributes are:

  • Transparency mode - defines how transparency is applied to this Appearance component object:
    • FASTEST - uses the fastest available method for transparency.
    • NICEST - uses the nicest available method for transparency.
    • SCREEN_DOOR - uses screen-door transparency. This is done using an on/off stipple pattern in which the percentage of transparent pixels is approximately equal to the value specified by the transparency parameter.
    • BLENDED - uses alpha blended transparency. The blend equation is specified by the srcBlendFunction and dstBlendFunction attributes. The default equation is:
        alphasrc*src + (1-alphasrc)*dst
      where alphasrc is 1-transparency. When this mode is used with a Raster object or with a Geometry that contains per-vertex colors with alpha, the alpha values in the Raster's image or in the Geometry's per-vertex colors are combined with the transparency value in this TransparencyAttributes object to perform blending. In this case, the alpha value used for blending at each pixel is:
        alphasrc = alphapix * (1-transparency).
    • NONE - no transparency; opaque object.
  • Transparency value - the amount of transparency to be applied to this Appearance component object. The transparency values are in the range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being fully transparent.
  • Blend function - used in blended transparency and antialiasing operations. The source function specifies the factor that is multiplied by the source color. This value is added to the product of the destination factor and the destination color. The default source blend function is BLEND_SRC_ALPHA. The source blend function is one of the following:
    • BLEND_ZERO - the blend function is f = 0
    • BLEND_ONE - the blend function is f = 1
    • BLEND_SRC_ALPHA - the blend function is f = alphasrc
    • BLEND_ONE_MINUS_SRC_ALPHA - the blend function is f = 1 - alphasrc
    • BLEND_DST_COLOR - the blend function is f = colordst
    • BLEND_ONE_MINUS_DST_COLOR - the blend function is f = 1 - colordst
    • BLEND_SRC_COLOR - the blend function is f = colorsrc
    • BLEND_ONE_MINUS_SRC_COLOR - the blend function is f = 1 - colorsrc


Field Summary
final public static  intALLOW_BLEND_FUNCTION_READ
     Specifies that this TransparencyAttributes object allows reading its blend function.
final public static  intALLOW_BLEND_FUNCTION_WRITE
     Specifies that this TransparencyAttributes object allows writing its blend function.
final public static  intALLOW_MODE_READ
     Specifies that this TransparencyAttributes object allows reading its transparency mode component information.
final public static  intALLOW_MODE_WRITE
     Specifies that this TransparencyAttributes object allows writing its transparency mode component information.
final public static  intALLOW_VALUE_READ
     Specifies that this TransparencyAttributes object allows reading its transparency value.
final public static  intALLOW_VALUE_WRITE
     Specifies that this TransparencyAttributes object allows writing its transparency value.
final public static  intBLENDED
     Use alpha blended transparency.
final static  intBLEND_CONSTANT_COLOR
    
final public static  intBLEND_DST_COLOR
     Blend function: f = colordst.
final public static  intBLEND_ONE
     Blend function: f = 1.
final public static  intBLEND_ONE_MINUS_DST_COLOR
     Blend function: f = 1-colordst.
final public static  intBLEND_ONE_MINUS_SRC_ALPHA
     Blend function: f = 1-alphasrc.
final public static  intBLEND_ONE_MINUS_SRC_COLOR
     Blend function: f = 1-colorsrc.
final public static  intBLEND_SRC_ALPHA
     Blend function: f = alphasrc.
final public static  intBLEND_SRC_COLOR
     Blend function: f = colorsrc.
final public static  intBLEND_ZERO
     Blend function: f = 0.
final public static  intFASTEST
     Use the fastest available method for transparency.
final static  intMAX_BLEND_FUNC_TABLE_SIZE
    
final public static  intNICEST
     Use the nicest available method for transparency.
final public static  intNONE
     No transparency, opaque object.
final public static  intSCREEN_DOOR
     Use screen-door transparency.

Constructor Summary
public  TransparencyAttributes()
     Constructs a TransparencyAttributes object with default parameters.
public  TransparencyAttributes(int tMode, float tVal)
     Construct TransparencyAttributes object with specified values.
public  TransparencyAttributes(int tMode, float tVal, int srcBlendFunction, int dstBlendFunction)
     Construct TransparencyAttributes object with specified values.

Method Summary
public  NodeComponentcloneNodeComponent()
    
 voidcreateRetained()
     Creates a retained mode TransparencyAttributesRetained object that this TransparencyAttributes component object will point to.
 voidduplicateAttributes(NodeComponent originalNodeComponent, boolean forceDuplicate)
     Copies all node information from originalNodeComponent into the current node.
public  intgetDstBlendFunction()
     Gets the destination blend function for this TransparencyAttributes object.
public  intgetSrcBlendFunction()
     Gets the source blend function for this TransparencyAttributes object.
public  floatgetTransparency()
     Retrieves this appearance's transparency.
public  intgetTransparencyMode()
     Gets the transparency mode for this appearance component object.
public  voidsetDstBlendFunction(int blendFunction)
     Sets the destination blend function used in blended transparency and antialiasing operations.
public  voidsetSrcBlendFunction(int blendFunction)
     Sets the source blend function used in blended transparency and antialiasing operations.
public  voidsetTransparency(float transparency)
     Sets this appearance's transparency.
public  voidsetTransparencyMode(int transparencyMode)
     Sets the transparency mode for this appearance component object.

Field Detail
ALLOW_BLEND_FUNCTION_READ
final public static int ALLOW_BLEND_FUNCTION_READ(Code)
Specifies that this TransparencyAttributes object allows reading its blend function.
since:
   Java 3D 1.2



ALLOW_BLEND_FUNCTION_WRITE
final public static int ALLOW_BLEND_FUNCTION_WRITE(Code)
Specifies that this TransparencyAttributes object allows writing its blend function.
since:
   Java 3D 1.2



ALLOW_MODE_READ
final public static int ALLOW_MODE_READ(Code)
Specifies that this TransparencyAttributes object allows reading its transparency mode component information.



ALLOW_MODE_WRITE
final public static int ALLOW_MODE_WRITE(Code)
Specifies that this TransparencyAttributes object allows writing its transparency mode component information.



ALLOW_VALUE_READ
final public static int ALLOW_VALUE_READ(Code)
Specifies that this TransparencyAttributes object allows reading its transparency value.



ALLOW_VALUE_WRITE
final public static int ALLOW_VALUE_WRITE(Code)
Specifies that this TransparencyAttributes object allows writing its transparency value.



BLENDED
final public static int BLENDED(Code)
Use alpha blended transparency. The blend equation is specified by the srcBlendFunction and dstBlendFunction attributes. The default equation is:
    alphasrc*src + (1-alphasrc)*dst
where alphasrc is 1-transparency. When this mode is used with a Raster object or with a Geometry that contains per-vertex colors with alpha, the alpha values in the Raster's image or in the Geometry's per-vertex colors are combined with the transparency value in this TransparencyAttributes object to perform blending. In this case, the alpha value used for blending at each pixel is:
    alphasrc = alphapix * (1-transparency).

See Also:   TransparencyAttributes.setTransparencyMode
See Also:   TransparencyAttributes.setSrcBlendFunction
See Also:   TransparencyAttributes.setDstBlendFunction



BLEND_CONSTANT_COLOR
final static int BLEND_CONSTANT_COLOR(Code)



BLEND_DST_COLOR
final public static int BLEND_DST_COLOR(Code)
Blend function: f = colordst.

Note that this function may only be used as a source blend function.


See Also:   TransparencyAttributes.setSrcBlendFunction
since:
   Java 3D 1.4



BLEND_ONE
final public static int BLEND_ONE(Code)
Blend function: f = 1.
See Also:   TransparencyAttributes.setSrcBlendFunction
See Also:   TransparencyAttributes.setDstBlendFunction
since:
   Java 3D 1.2



BLEND_ONE_MINUS_DST_COLOR
final public static int BLEND_ONE_MINUS_DST_COLOR(Code)
Blend function: f = 1-colordst.

Note that this function may only be used as a source blend function.


See Also:   TransparencyAttributes.setSrcBlendFunction
since:
   Java 3D 1.4



BLEND_ONE_MINUS_SRC_ALPHA
final public static int BLEND_ONE_MINUS_SRC_ALPHA(Code)
Blend function: f = 1-alphasrc.
See Also:   TransparencyAttributes.setSrcBlendFunction
See Also:   TransparencyAttributes.setDstBlendFunction
since:
   Java 3D 1.2



BLEND_ONE_MINUS_SRC_COLOR
final public static int BLEND_ONE_MINUS_SRC_COLOR(Code)
Blend function: f = 1-colorsrc.

Note that this function may only be used as a destination blend function.


See Also:   TransparencyAttributes.setDstBlendFunction
since:
   Java 3D 1.4



BLEND_SRC_ALPHA
final public static int BLEND_SRC_ALPHA(Code)
Blend function: f = alphasrc.
See Also:   TransparencyAttributes.setSrcBlendFunction
See Also:   TransparencyAttributes.setDstBlendFunction
since:
   Java 3D 1.2



BLEND_SRC_COLOR
final public static int BLEND_SRC_COLOR(Code)
Blend function: f = colorsrc.

Note that this function may only be used as a destination blend function.


See Also:   TransparencyAttributes.setDstBlendFunction
since:
   Java 3D 1.4



BLEND_ZERO
final public static int BLEND_ZERO(Code)
Blend function: f = 0.
See Also:   TransparencyAttributes.setSrcBlendFunction
See Also:   TransparencyAttributes.setDstBlendFunction
since:
   Java 3D 1.2



FASTEST
final public static int FASTEST(Code)
Use the fastest available method for transparency.
See Also:   TransparencyAttributes.setTransparencyMode



MAX_BLEND_FUNC_TABLE_SIZE
final static int MAX_BLEND_FUNC_TABLE_SIZE(Code)



NICEST
final public static int NICEST(Code)
Use the nicest available method for transparency.
See Also:   TransparencyAttributes.setTransparencyMode



NONE
final public static int NONE(Code)
No transparency, opaque object.
See Also:   TransparencyAttributes.setTransparencyMode



SCREEN_DOOR
final public static int SCREEN_DOOR(Code)
Use screen-door transparency. This is done using an on/off stipple pattern where the percentage of pixels that are transparent is approximately equal to the value specified by the transparency parameter.
See Also:   TransparencyAttributes.setTransparencyMode




Constructor Detail
TransparencyAttributes
public TransparencyAttributes()(Code)
Constructs a TransparencyAttributes object with default parameters. The default values are as follows:
    transparency mode : NONE
    transparency value : 0.0
    source blend function : BLEND_SRC_ALPHA
    destination blend function : BLEND_ONE_MINUS_SRC_ALPHA



TransparencyAttributes
public TransparencyAttributes(int tMode, float tVal)(Code)
Construct TransparencyAttributes object with specified values.
Parameters:
  tMode - the transparency mode
Parameters:
  tVal - the transparency value
exception:
  IllegalArgumentException - iftMode is a value other thanNONE, FASTEST, NICEST, SCREEN_DOOR, or BLENDED



TransparencyAttributes
public TransparencyAttributes(int tMode, float tVal, int srcBlendFunction, int dstBlendFunction)(Code)
Construct TransparencyAttributes object with specified values.
Parameters:
  tMode - the transparency mode
Parameters:
  tVal - the transparency value
Parameters:
  srcBlendFunction - the blend function to be used for the sourcecolor, one of BLEND_ZERO, BLEND_ONE,BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA,BLEND_DST_COLOR, or BLEND_ONE_MINUS_DST_COLOR.
Parameters:
  dstBlendFunction - the blend function to be used for thedestinationcolor, one of BLEND_ZERO, BLEND_ONE,BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA,BLEND_SRC_COLOR, or BLEND_ONE_MINUS_SRC_COLOR.
exception:
  IllegalArgumentException - iftMode is a value other thanNONE, FASTEST, NICEST, SCREEN_DOOR, or BLENDED
exception:
  IllegalArgumentException - ifsrcBlendFunction or dstBlendFunctionis a value other than one of the supported functions listed above.
since:
   Java 3D 1.2




Method Detail
cloneNodeComponent
public NodeComponent cloneNodeComponent()(Code)



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



getDstBlendFunction
public int getDstBlendFunction()(Code)
Gets the destination blend function for this TransparencyAttributes object. the destination blend function.
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
since:
   Java 3D 1.2



getSrcBlendFunction
public int getSrcBlendFunction()(Code)
Gets the source blend function for this TransparencyAttributes object. the source blend function.
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
since:
   Java 3D 1.2



getTransparency
public float getTransparency()(Code)
Retrieves this appearance's transparency. the appearance's transparency
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



getTransparencyMode
public int getTransparencyMode()(Code)
Gets the transparency mode for this appearance component object. transparencyMode the transparency mode
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph



setDstBlendFunction
public void setDstBlendFunction(int blendFunction)(Code)
Sets the destination blend function used in blended transparency and antialiasing operations. The destination function specifies the factor that is multiplied by the destination color; this value is added to the product of the source factor and the source color. The default destination blend function is BLEND_ONE_MINUS_SRC_ALPHA.
Parameters:
  blendFunction - the blend function to be used for the destinationcolor, one of BLEND_ZERO, BLEND_ONE,BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA,BLEND_SRC_COLOR, or BLEND_ONE_MINUS_SRC_COLOR.
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
exception:
  IllegalArgumentException - if blendFunctionis a value other than one of the supported functions listed above.
since:
   Java 3D 1.2



setSrcBlendFunction
public void setSrcBlendFunction(int blendFunction)(Code)
Sets the source blend function used in blended transparency and antialiasing operations. The source function specifies the factor that is multiplied by the source color; this value is added to the product of the destination factor and the destination color. The default source blend function is BLEND_SRC_ALPHA.
Parameters:
  blendFunction - the blend function to be used for the sourcecolor, one of BLEND_ZERO, BLEND_ONE,BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA,BLEND_DST_COLOR, or BLEND_ONE_MINUS_DST_COLOR.
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
exception:
  IllegalArgumentException - if blendFunctionis a value other than one of the supported functions listed above.
since:
   Java 3D 1.2



setTransparency
public void setTransparency(float transparency)(Code)
Sets this appearance's transparency.
Parameters:
  transparency - the appearance's transparencyin the range [0.0, 1.0] with 0.0 beingfully opaque and 1.0 being fully transparent
exception:
  CapabilityNotSetException - if appropriate capability isnot set and this object is part of live or compiled scene graph



setTransparencyMode
public void setTransparencyMode(int transparencyMode)(Code)
Sets the transparency mode for this appearance component object.
Parameters:
  transparencyMode - the transparency mode to be used, one ofNONE, FASTEST, NICEST, SCREEN_DOOR, or BLENDED
exception:
  CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
exception:
  IllegalArgumentException - iftransparencyMode is a value other thanNONE, FASTEST, NICEST, SCREEN_DOOR, or BLENDED



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.