Source Code Cross Referenced for ShaderAttributeBinding.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 Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $RCSfile: ShaderAttributeBinding.java,v $
003:         *
004:         * Copyright 2005-2008 Sun Microsystems, Inc.  All Rights Reserved.
005:         * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
006:         *
007:         * This code is free software; you can redistribute it and/or modify it
008:         * under the terms of the GNU General Public License version 2 only, as
009:         * published by the Free Software Foundation.  Sun designates this
010:         * particular file as subject to the "Classpath" exception as provided
011:         * by Sun in the LICENSE file that accompanied this code.
012:         *
013:         * This code is distributed in the hope that it will be useful, but WITHOUT
014:         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
015:         * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
016:         * version 2 for more details (a copy is included in the LICENSE file that
017:         * accompanied this code).
018:         *
019:         * You should have received a copy of the GNU General Public License version
020:         * 2 along with this work; if not, write to the Free Software Foundation,
021:         * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
022:         *
023:         * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
024:         * CA 95054 USA or visit www.sun.com if you need additional information or
025:         * have any questions.
026:         *
027:         * $Revision: 1.5 $
028:         * $Date: 2008/02/28 20:17:29 $
029:         * $State: Exp $
030:         */
031:
032:        package javax.media.j3d;
033:
034:        import javax.vecmath.*;
035:
036:        /**
037:         * The ShaderAttributeBinding object encapsulates a uniform attribute
038:         * whose value is bound to a Java 3D system attribute. The
039:         * shader variable <code>attrName</code> is implicitly set to the
040:         * value of the corresponding Java&nbsp;3D system attribute
041:         * <code>j3dAttrName</code> during rendering. <code>attrName</code>
042:         * must be the name of a valid uniform attribute in the shader in
043:         * which it is used. Otherwise, the attribute name will be ignored and
044:         * a runtime error may be generated. <code>j3dAttrName</code> must be
045:         * the name of a predefined Java&nbsp;3D system attribute. An
046:         * IllegalArgumentException will be thrown if the specified
047:         * <code>j3dAttrName</code> is not one of the predefined system
048:         * attributes. Further, the type of the <code>j3dAttrName</code>
049:         * attribute must match the type of the corresponding
050:         * <code>attrName</code> variable in the shader in which it is
051:         * used. Otherwise, the shader will not be able to use the attribute
052:         * and a runtime error may be generated.
053:         *
054:         * <p>
055:         * Following is the list of predefined Java&nbsp;3D system attributes:<br>
056:         *
057:         * <ul>
058:         * <font color="#ff0000"><i>TODO: replace the following with
059:         * the real system attributes table</i></font><br>
060:         * <table BORDER=1 CELLSPACING=2 CELLPADDING=2>
061:         * <tr>
062:         * <td><b>Name</b></td>
063:         * <td><b>Type</b></td>
064:         * <td><b>Description</b></td>
065:         * </tr>
066:         * <tr>
067:         * <td><code>something</code></td>
068:         * <td>Float</td>
069:         * <td>This is something (of course)</td>
070:         * </tr>
071:         * <tr>
072:         * <td><code>somethingElse</code></td>
073:         * <td>Tuple3f</td>
074:         * <td>This is something else</td>
075:         * </tr>
076:         * </table>
077:         * </ul>
078:         *
079:         * <p>
080:         * Depending on the shading language (and profile) being used, several
081:         * Java 3D state attributes are automatically made available to the
082:         * shader program as pre-defined uniform attributes. The application
083:         * doesn't need to do anything to pass these attributes in to the
084:         * shader program. The implementation of each shader language (e.g.,
085:         * Cg, GLSL) defines its own mapping from Java 3D attribute to uniform
086:         * variable name.
087:         *
088:         * <p>
089:         * A list of these attributes for each shader language can be found in
090:         * the concrete subclass of ShaderProgram for that shader language.
091:         *
092:         * <p>
093:         * <font color="#ff0000"><i>NOTE: This class is not yet
094:         * implemented.</i></font><br>
095:         *
096:         * @see ShaderAttributeSet
097:         * @see ShaderProgram
098:         *
099:         * @since Java 3D 1.4
100:         */
101:
102:        public class ShaderAttributeBinding extends ShaderAttribute {
103:
104:            /**
105:             * Constructs a new ShaderAttributeBinding from the specified
106:             * <code>(attrName,&nbsp;j3dAttrName)</code> pair.
107:             *
108:             * @param attrName the name of the shader attribute to be added
109:             * @param j3dAttrName the name of the Java&nbsp;3D attribute
110:             * to bind to the shader attribute
111:             *
112:             * @exception UnsupportedOperationException this class is not
113:             * yet implemented
114:             *
115:             * @exception NullPointerException if attrName or j3dAttrName is null
116:             *
117:             * @exception IllegalArgumentException if j3dAttrName is not the name
118:             * of a valid predefined Java&nbsp;3D system attribute
119:             */
120:            public ShaderAttributeBinding(String attrName, String j3dAttrName) {
121:                super (attrName);
122:                ((ShaderAttributeBindingRetained) this .retained)
123:                        .initJ3dAttrName(j3dAttrName);
124:                // TODO: implement this class
125:                throw new UnsupportedOperationException(J3dI18N
126:                        .getString("ShaderAttributeBinding0"));
127:            }
128:
129:            /**
130:             * Retrieves the name of the Java 3D system attribute that is bound to this
131:             * shader attribute.
132:             *
133:             * @return the name of the Java 3D system attribute that is bound to this
134:             * shader attribute
135:             */
136:            public String getJ3DAttributeName() {
137:                return ((ShaderAttributeBindingRetained) this .retained)
138:                        .getJ3DAttributeName();
139:            }
140:
141:            /**
142:             * Creates a retained mode ShaderAttributeBindingRetained object that this
143:             * ShaderAttributeBinding component object will point to.
144:             */
145:            void createRetained() {
146:                this .retained = new ShaderAttributeBindingRetained();
147:                this.retained.setSource(this);
148:            }
149:
150:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.