01: /*
02: * GeometryArrayStrip.java
03: *
04: * Sun Public License Notice
05: *
06: * The contents of this file are subject to the Sun Public License Version
07: * 1.0 (the "License"). You may not use this file except in compliance with
08: * the License. A copy of the License is available at http://www.sun.com/
09: *
10: * The Original Code is the Java 3D(tm) Scene Graph Editor.
11: * The Initial Developer of the Original Code is Jan Becicka.
12: * Portions created by Jan Becicka are Copyright (C) 2002.
13: * All Rights Reserved.
14: *
15: * Contributor(s): Jan Becicka.
16: *
17: * Created on 14. prosinec 2001, 13:08
18: */
19:
20: package org.jdesktop.j3dedit.scenegrapheditor.sourcecontrol.spec.javax.media.j3d;
21:
22: import org.jdesktop.j3dedit.scenegrapheditor.sourcecontrol.BeanCodeGenerator;
23: import org.jdesktop.j3dedit.scenegrapheditor.sourcecontrol.NamePool;
24:
25: /**
26: *
27: * @author Jan Becicka
28: */
29: public class GeometryStripArray extends GeometryArray {
30:
31: /** Creates a new instance of GeometryArray */
32: public GeometryStripArray(Object bean, NamePool naming) {
33: super (bean, naming);
34: }
35:
36: /** Override this method, if you want to create parametric constructor constr
37: */
38: protected void createConstructionCode() {
39: StringBuffer buf = new StringBuffer();
40: javax.media.j3d.GeometryStripArray gse = (javax.media.j3d.GeometryStripArray) bean;
41: int[] counts = new int[gse.getNumStrips()];
42: gse.getStripVertexCounts(counts);
43:
44: buf.append(getFieldName() + " = new " + beanClassName);
45: buf.append("(" + gse.getVertexCount() + ", ");
46: buf.append(gse.getVertexFormat() + ", ");
47: buf.append(createIdentifier(counts) + ");\n");
48: constructionCode = buf.toString();
49: }
50: }
|