Source Code Cross Referenced for IndexedGeometryStripArray.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: IndexedGeometryStripArray.java,v $
003:         *
004:         * Copyright 1997-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.6 $
028:         * $Date: 2008/02/28 20:17:24 $
029:         * $State: Exp $
030:         */
031:
032:        package javax.media.j3d;
033:
034:        /**
035:         * The IndexedGeometryStripArray object is an abstract class that is extended for
036:         * a set of IndexedGeometryArray strip primitives.  These include LINE_STRIP,
037:         * TRIANGLE_STRIP, and TRIANGLE_FAN.
038:         */
039:
040:        public abstract class IndexedGeometryStripArray extends
041:                IndexedGeometryArray {
042:
043:            // non-public, no parameter constructor
044:            IndexedGeometryStripArray() {
045:            }
046:
047:            /**
048:             * Constructs an empty IndexedGeometryStripArray object with the specified
049:             * number of vertices, vertex format, number of indices, and
050:             * array of per-strip index counts.
051:             *
052:             * @param vertexCount
053:             * see {@link GeometryArray#GeometryArray(int,int)}
054:             * for a description of this parameter.
055:             *
056:             * @param vertexFormat
057:             * see {@link GeometryArray#GeometryArray(int,int)}
058:             * for a description of this parameter.
059:             *
060:             * @param indexCount
061:             * see {@link IndexedGeometryArray#IndexedGeometryArray(int,int,int)}
062:             * for a description of this parameter.
063:             *
064:             * @param stripIndexCounts array that specifies
065:             * the count of the number of indices for each separate strip.
066:             * The length of this array is the number of separate strips.
067:             * The sum of the elements in this array defines the total number
068:             * of valid indexed vertices that are rendered (validIndexCount).
069:             *
070:             * @exception IllegalArgumentException if
071:             * <code>validIndexCount &gt; indexCount</code>
072:             * ;<br>
073:             * See {@link GeometryArray#GeometryArray(int,int)}
074:             * for more exceptions that can be thrown
075:             */
076:            public IndexedGeometryStripArray(int vertexCount, int vertexFormat,
077:                    int indexCount, int[] stripIndexCounts) {
078:
079:                super (vertexCount, vertexFormat, indexCount);
080:                ((IndexedGeometryStripArrayRetained) this .retained)
081:                        .setStripIndexCounts(stripIndexCounts);
082:            }
083:
084:            /**
085:             * Constructs an empty IndexedGeometryStripArray object with the specified
086:             * number of vertices, vertex format, number of texture coordinate
087:             * sets, texture coordinate mapping array, number of indices, and
088:             * array of per-strip index counts.
089:             *
090:             * @param vertexCount
091:             * see {@link GeometryArray#GeometryArray(int,int,int,int[])}
092:             * for a description of this parameter.
093:             *
094:             * @param vertexFormat
095:             * see {@link GeometryArray#GeometryArray(int,int,int,int[])}
096:             * for a description of this parameter.
097:             *
098:             * @param texCoordSetCount
099:             * see {@link GeometryArray#GeometryArray(int,int,int,int[])}
100:             * for a description of this parameter.
101:             *
102:             * @param texCoordSetMap
103:             * see {@link GeometryArray#GeometryArray(int,int,int,int[])}
104:             * for a description of this parameter.
105:             *
106:             * @param indexCount
107:             * see {@link IndexedGeometryArray#IndexedGeometryArray(int,int,int,int[],int)}
108:             * for a description of this parameter.
109:             *
110:             * @param stripIndexCounts array that specifies
111:             * the count of the number of indices for each separate strip.
112:             * The length of this array is the number of separate strips.
113:             * The sum of the elements in this array defines the total number
114:             * of valid indexed vertices that are rendered (validIndexCount).
115:             *
116:             * @exception IllegalArgumentException if
117:             * <code>validIndexCount &gt; indexCount</code>
118:             * ;<br>
119:             * See {@link GeometryArray#GeometryArray(int,int,int,int[])}
120:             * for more exceptions that can be thrown
121:             *
122:             * @since Java 3D 1.2
123:             */
124:            public IndexedGeometryStripArray(int vertexCount, int vertexFormat,
125:                    int texCoordSetCount, int[] texCoordSetMap, int indexCount,
126:                    int[] stripIndexCounts) {
127:
128:                super (vertexCount, vertexFormat, texCoordSetCount,
129:                        texCoordSetMap, indexCount);
130:                ((IndexedGeometryStripArrayRetained) this .retained)
131:                        .setStripIndexCounts(stripIndexCounts);
132:            }
133:
134:            /**
135:             * Constructs an empty IndexedGeometryStripArray object with the
136:             * specified number of vertices, vertex format, number of texture
137:             * coordinate sets, texture coordinate mapping array, vertex
138:             * attribute count, vertex attribute sizes array, number of
139:             * indices, and array of per-strip index counts.
140:             *
141:             * @param vertexCount
142:             * see {@link GeometryArray#GeometryArray(int,int,int,int[],int,int[])}
143:             * for a description of this parameter.
144:             *
145:             * @param vertexFormat
146:             * see {@link GeometryArray#GeometryArray(int,int,int,int[],int,int[])}
147:             * for a description of this parameter.
148:             *
149:             * @param texCoordSetMap
150:             * see {@link GeometryArray#GeometryArray(int,int,int,int[],int,int[])}
151:             * for a description of this parameter.
152:             *
153:             * @param vertexAttrCount
154:             * see {@link GeometryArray#GeometryArray(int,int,int,int[],int,int[])}
155:             * for a description of this parameter.
156:             *
157:             * @param vertexAttrSizes
158:             * see {@link GeometryArray#GeometryArray(int,int,int,int[],int,int[])}
159:             * for a description of this parameter.
160:             *
161:             * @param indexCount
162:             * see {@link IndexedGeometryArray#IndexedGeometryArray(int,int,int,int[],int,int[],int)}
163:             * for a description of this parameter.
164:             *
165:             * @param stripIndexCounts array that specifies
166:             * the count of the number of indices for each separate strip.
167:             * The length of this array is the number of separate strips.
168:             * The sum of the elements in this array defines the total number
169:             * of valid indexed vertices that are rendered (validIndexCount).
170:             *
171:             * @exception IllegalArgumentException if
172:             * <code>validIndexCount &gt; indexCount</code>
173:             * ;<br>
174:             * See {@link GeometryArray#GeometryArray(int,int,int,int[],int,int[])}
175:             * for more exceptions that can be thrown
176:             *
177:             * @since Java 3D 1.4
178:             */
179:            public IndexedGeometryStripArray(int vertexCount, int vertexFormat,
180:                    int texCoordSetCount, int[] texCoordSetMap,
181:                    int vertexAttrCount, int[] vertexAttrSizes, int indexCount,
182:                    int[] stripIndexCounts) {
183:
184:                super (vertexCount, vertexFormat, texCoordSetCount,
185:                        texCoordSetMap, vertexAttrCount, vertexAttrSizes,
186:                        indexCount);
187:
188:                ((IndexedGeometryStripArrayRetained) this .retained)
189:                        .setStripIndexCounts(stripIndexCounts);
190:            }
191:
192:            /**
193:             * Get number of strips in the GeometryStripArray
194:             * @return numStrips number of strips
195:             */
196:            public int getNumStrips() {
197:                if (isLiveOrCompiled())
198:                    if (!this .getCapability(GeometryArray.ALLOW_COUNT_READ))
199:                        throw new CapabilityNotSetException(J3dI18N
200:                                .getString("IndexedGeometryStripArray0"));
201:
202:                return ((IndexedGeometryStripArrayRetained) this .retained)
203:                        .getNumStrips();
204:            }
205:
206:            /**
207:             * Sets the array of strip index counts.  The length of this
208:             * array is the number of separate strips.  The elements in this
209:             * array specify the number of indices for each separate strip.
210:             * The sum of the elements in this array defines the total number
211:             * of valid indexed vertices that are rendered (validIndexCount).
212:             *
213:             * @param stripIndexCounts array that specifies
214:             * the count of the number of indices for each separate strip.
215:             *
216:             * @exception IllegalArgumentException if
217:             * <code>initialIndexIndex + validIndexCount > indexCount</code>
218:             *
219:             * @since Java 3D 1.3
220:             */
221:            public void setStripIndexCounts(int[] stripIndexCounts) {
222:                if (isLiveOrCompiled())
223:                    if (!this .getCapability(GeometryArray.ALLOW_COUNT_WRITE))
224:                        throw new CapabilityNotSetException(J3dI18N
225:                                .getString("IndexedGeometryStripArray2"));
226:
227:                ((IndexedGeometryStripArrayRetained) this .retained)
228:                        .setStripIndexCounts(stripIndexCounts);
229:
230:            }
231:
232:            /**
233:             * Gets a list of indexCounts for each strip. The list is
234:             * copied into the specified array. The array must be
235:             * large enough to hold all of the ints.
236:             * @param stripIndexCounts an array that will receive indexCounts
237:             */
238:            public void getStripIndexCounts(int[] stripIndexCounts) {
239:                if (isLiveOrCompiled())
240:                    if (!this .getCapability(GeometryArray.ALLOW_COUNT_READ))
241:                        throw new CapabilityNotSetException(J3dI18N
242:                                .getString("IndexedGeometryStripArray1"));
243:
244:                ((IndexedGeometryStripArrayRetained) this .retained)
245:                        .getStripIndexCounts(stripIndexCounts);
246:            }
247:
248:            /**
249:             * This method is not supported for indexed geometry strip arrays.
250:             * The sum of the elements in the strip index counts array defines
251:             * the valid index count.
252:             *
253:             * @exception UnsupportedOperationException this method is not supported
254:             *
255:             * @since Java 3D 1.3
256:             */
257:            public void setValidIndexCount(int validIndexCount) {
258:                throw new UnsupportedOperationException();
259:            }
260:
261:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.