Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libGeometries3D / src / main / java / org / gvsig / geometries3D / DefaultSolid.java @ 29245

History | View | Annotate | Download (6.1 KB)

1
package org.gvsig.geometries3D;
2

    
3
import java.awt.Color;
4
import java.awt.Image;
5
import java.awt.Rectangle;
6
import java.awt.geom.AffineTransform;
7
import java.awt.geom.PathIterator;
8
import java.awt.geom.Point2D;
9
import java.awt.geom.Rectangle2D;
10
import java.util.Vector;
11

    
12
import org.cresques.cts.ICoordTrans;
13
import org.gvsig.fmap.geom.handler.Handler;
14
import org.gvsig.fmap.geom.primitive.Appearance;
15
import org.gvsig.fmap.geom.primitive.Envelope;
16
import org.gvsig.fmap.geom.primitive.FShape;
17
import org.gvsig.fmap.geom.primitive.GeneralPathX;
18
import org.gvsig.fmap.geom.primitive.Point;
19
import org.gvsig.fmap.geom.primitive.Solid;
20
import org.gvsig.fmap.geom.primitive.Surface;
21

    
22
import org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive;
23
import org.gvsig.fmap.geom.type.GeometryType;
24

    
25

    
26
public class DefaultSolid extends AbstractPrimitive implements Solid {
27

    
28
        /** Instancia de GeometryType obtenida al registrar esta clase */
29
        
30
        public static class AttributeBinding {
31
                // default
32
                public static int BIND_OFF = 0;
33
                public static int BIND_OVERALL = 1;
34
                public static int BIND_PER_PRIMITIVE_SET = 2;
35
                public static int BIND_PER_PRIMITIVE = 3;
36
                public static int BIND_PER_VERTEX = 4;
37
        }
38

    
39
        private Vector<PrimitiveSet> primitiveSets;
40

    
41
        private Vector<Point> vertices;
42

    
43
        private Vector<Point> normals;
44

    
45
        private Vector<Color> colors;
46

    
47
        private Vector<Vector<Point2D>> texcoord;
48

    
49
        private Vector<Image> _textures;
50

    
51
        private int colorBinding, normalBinding;
52

    
53
        private Material material;
54

    
55
        private boolean blending = false;
56

    
57
        private String id;
58

    
59
        private Vector<Surface> _surfaces;
60

    
61
        public DefaultSolid(GeometryType geometryType) {
62
                super(geometryType, null, null);
63
                // this.setId(id);
64
                this.setPrimitiveSets(new Vector<PrimitiveSet>());
65
                this.setVertices(new Vector<Point>());
66
                this.setNormals(new Vector<Point>());
67
                this.setColors(new Vector<Color>());
68
                this.setTexcoord(new Vector<Vector<Point2D>>());
69
                this.setTextures(new Vector<Image>());
70
                this.setColorBinding(AttributeBinding.BIND_OFF);
71
                this.setNormalBinding(AttributeBinding.BIND_OFF);
72
        }
73

    
74
        public Vector<PrimitiveSet> getPrimitiveSets() {
75
                return primitiveSets;
76
        }
77

    
78
        public void setPrimitiveSets(Vector<PrimitiveSet> primitiveSets) {
79
                this.primitiveSets = primitiveSets;
80
        }
81

    
82
        public Vector<Point> getVertices() {
83
                return vertices;
84
        }
85

    
86
        public void setVertices(Vector<Point> vertices) {
87
                this.vertices = vertices;
88
        }
89

    
90
        public Vector<Point> getNormals() {
91
                return normals;
92
        }
93

    
94
        public void setNormals(Vector<Point> normals) {
95
                this.normals = normals;
96
        }
97

    
98
        public Vector<Color> getColors() {
99
                return colors;
100
        }
101

    
102
        public void setColors(Vector<Color> colors) {
103
                this.colors = colors;
104
        }
105

    
106
        public Vector<Vector<Point2D>> getTexcoord() {
107
                return texcoord;
108
        }
109

    
110
        public void setTexcoord(Vector<Vector<Point2D>> texcoord) {
111
                this.texcoord = texcoord;
112
        }
113

    
114
        public Vector<Image> getTextures() {
115
                return _textures;
116
        }
117

    
118
        public void setTextures(Vector<Image> textures) {
119
                this._textures = textures;
120
        }
121

    
122
        public int getColorBinding() {
123
                return colorBinding;
124
        }
125

    
126
        public void setColorBinding(int colorBinding) {
127
                this.colorBinding = colorBinding;
128
        }
129

    
130
        public int getNormalBinding() {
131
                return normalBinding;
132
        }
133

    
134
        public void setNormalBinding(int normalBinding) {
135
                this.normalBinding = normalBinding;
136
        }
137

    
138
        public Material getMaterial() {
139
                return material;
140
        }
141

    
142
        public void setMaterial(Material material) {
143
                this.material = material;
144
        }
145

    
146
        public boolean isBlending() {
147
                return blending;
148
        }
149

    
150
        public void setBlending(boolean blending) {
151
                this.blending = blending;
152
        }
153

    
154
        /*
155
         * 
156
         * All this methods are from abstract geometry
157
         */
158

    
159
        public GeometryType getGeometryType() {
160
                return geometryType;
161
        }
162

    
163
        public int getShapeType() {
164
                // TODO Auto-generated method stub
165
                return 0;
166
        }
167

    
168
        public Rectangle2D getBounds2D() {
169
                // TODO Auto-generated method stub
170
                return null;
171
        }
172

    
173
        public int getCoordinateDimension() {
174
                // TODO Auto-generated method stub
175
                return 0;
176
        }
177

    
178
        public PathIterator getPathIterator(AffineTransform arg0) {
179
                // TODO Auto-generated method stub
180
                return null;
181
        }
182

    
183
        public PathIterator getPathIterator(AffineTransform arg0, double arg1) {
184
                // TODO Auto-generated method stub
185
                return null;
186
        }
187

    
188
        public int getType() {
189
                return geometryType.getType();
190
        }
191

    
192
        public boolean intersects(Rectangle2D arg0) {
193
                // TODO Auto-generated method stub
194
                return false;
195
        }
196

    
197
        public void reProject(ICoordTrans arg0) {
198
                // TODO Auto-generated method stub
199

    
200
        }
201

    
202
        public void transform(AffineTransform arg0) {
203
                // TODO Auto-generated method stub
204

    
205
        }
206

    
207
        public boolean contains(Point2D p) {
208
                // TODO Auto-generated method stub
209
                return false;
210
        }
211

    
212
        public boolean contains(Rectangle2D r) {
213
                // TODO Auto-generated method stub
214
                return false;
215
        }
216

    
217
        public boolean contains(double x, double y) {
218
                // TODO Auto-generated method stub
219
                return false;
220
        }
221

    
222
        public boolean contains(double x, double y, double w, double h) {
223
                // TODO Auto-generated method stub
224
                return false;
225
        }
226

    
227
        public Rectangle getBounds() {
228
                // TODO Auto-generated method stub
229
                return null;
230
        }
231

    
232
        public boolean intersects(double x, double y, double w, double h) {
233
                // TODO Auto-generated method stub
234
                return false;
235
        }
236

    
237
        public FShape cloneFShape() {
238
                // TODO Auto-generated method stub
239
                return null;
240
        }
241

    
242
        public Handler[] getSelectHandlers() {
243
                // TODO Auto-generated method stub
244
                return null;
245
        }
246

    
247
        public Handler[] getStretchingHandlers() {
248
                // TODO Auto-generated method stub
249
                return null;
250
        }
251

    
252
        public Envelope getEnvelope() {
253
                // TODO Auto-generated method stub
254
                return null;
255
        }
256

    
257
        public GeneralPathX getGeneralPath() {
258
                // TODO Auto-generated method stub
259
                return null;
260
        }
261

    
262
        public int getDimension() {
263
                // TODO Auto-generated method stub
264
                return 3;
265
        }
266

    
267
        public void addSurface(Surface surface) {
268
                // TODO Auto-generated method stub
269
                
270
        }
271

    
272
        public Appearance getAppearance() {
273
                // TODO Auto-generated method stub
274
                return null;
275
        }
276

    
277
        public int getNumSurfaces() {
278
                // TODO Auto-generated method stub
279
                return 0;
280
        }
281

    
282
        public Surface getSurfaceAt(int position) {
283
                // TODO Auto-generated method stub
284
                return null;
285
        }
286

    
287
        public void removeSurface(int position) {
288
                // TODO Auto-generated method stub
289
                
290
        }
291

    
292
        public void setAppearance(Appearance app) {
293
                // TODO Auto-generated method stub
294
                
295
        }
296

    
297
        
298

    
299
}