svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libGeometries3D / src / main / java / org / gvsig / geometries3D / Polygon3D.java @ 29941
History | View | Annotate | Download (5.39 KB)
1 |
package org.gvsig.geometries3D; |
---|---|
2 |
|
3 |
import java.awt.Rectangle; |
4 |
import java.awt.Shape; |
5 |
import java.awt.geom.AffineTransform; |
6 |
import java.awt.geom.PathIterator; |
7 |
import java.awt.geom.Point2D; |
8 |
import java.awt.geom.Rectangle2D; |
9 |
import java.util.Vector; |
10 |
|
11 |
import org.cresques.cts.ICoordTrans; |
12 |
import org.cresques.cts.IProjection; |
13 |
import org.gvsig.fmap.geom.Geometry; |
14 |
import org.gvsig.fmap.geom.GeometryLocator; |
15 |
import org.gvsig.fmap.geom.handler.Handler; |
16 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
17 |
import org.gvsig.fmap.geom.operation.GeometryOperationException; |
18 |
import org.gvsig.fmap.geom.operation.GeometryOperationNotSupportedException; |
19 |
import org.gvsig.fmap.geom.primitive.Envelope; |
20 |
import org.gvsig.fmap.geom.primitive.FShape; |
21 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
22 |
import org.gvsig.fmap.geom.primitive.Point; |
23 |
import org.gvsig.fmap.geom.primitive.Surface; |
24 |
import org.gvsig.fmap.geom.primitive.SurfaceAppearance; |
25 |
import org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive; |
26 |
import org.gvsig.fmap.geom.type.GeometryType; |
27 |
|
28 |
public class Polygon3D extends AbstractPrimitive implements Surface{ |
29 |
/**
|
30 |
*
|
31 |
*/
|
32 |
private static final long serialVersionUID = 1L; |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
protected Vector<Point> _varray; |
39 |
|
40 |
public Polygon3D(GeometryType geometryType) {
|
41 |
super(geometryType,null, null); |
42 |
_varray = new Vector<Point>(); |
43 |
} |
44 |
public Polygon3D(GeometryType geometryType,String id, IProjection projection){ |
45 |
super(geometryType,id, projection);
|
46 |
_varray = new Vector<Point>(); |
47 |
} |
48 |
public GeometryType getGeometryType() {
|
49 |
return geometryType;
|
50 |
} |
51 |
public void addVertex(Point p){ |
52 |
_varray.add(p); |
53 |
} |
54 |
public void removeVertex(int index){ |
55 |
_varray.remove(index); |
56 |
} |
57 |
public Point getVertex(int index) |
58 |
{ |
59 |
return _varray.get(index);
|
60 |
} |
61 |
public int getNumVertices(){ |
62 |
return _varray.size();
|
63 |
} |
64 |
public void insertVertex(int index, Point p){ |
65 |
_varray.insertElementAt(p, index); |
66 |
} |
67 |
|
68 |
public double getCoordinateAt(int index, int dimension) { |
69 |
return _varray.get(index).getCoordinateAt(dimension);
|
70 |
|
71 |
} |
72 |
|
73 |
public void setCoordinateAt(int index, int dimension, double value) { |
74 |
_varray.get(index).setCoordinateAt(dimension, value); |
75 |
|
76 |
} |
77 |
|
78 |
public void setGeneralPath(GeneralPathX generalPathX) { |
79 |
// TODO Auto-generated method stub
|
80 |
|
81 |
} |
82 |
|
83 |
public Geometry cloneGeometry() {
|
84 |
// TODO Auto-generated method stub
|
85 |
return null; |
86 |
} |
87 |
|
88 |
public boolean fastIntersects(double x, double y, double w, double h) { |
89 |
// TODO Auto-generated method stub
|
90 |
return false; |
91 |
} |
92 |
|
93 |
public Rectangle2D getBounds2D() { |
94 |
// TODO Auto-generated method stub
|
95 |
return null; |
96 |
} |
97 |
|
98 |
public int getDimension() { |
99 |
// TODO Auto-generated method stub
|
100 |
return 0; |
101 |
} |
102 |
|
103 |
public Envelope getEnvelope() {
|
104 |
// TODO Auto-generated method stub
|
105 |
return null; |
106 |
} |
107 |
|
108 |
public GeneralPathX getGeneralPath() {
|
109 |
// TODO Auto-generated method stub
|
110 |
return null; |
111 |
} |
112 |
|
113 |
public Handler[] getHandlers(int type) { |
114 |
// TODO Auto-generated method stub
|
115 |
return null; |
116 |
} |
117 |
|
118 |
public Shape getInternalShape() { |
119 |
// TODO Auto-generated method stub
|
120 |
return null; |
121 |
} |
122 |
|
123 |
public PathIterator getPathIterator(AffineTransform at) { |
124 |
// TODO Auto-generated method stub
|
125 |
return null; |
126 |
} |
127 |
|
128 |
public PathIterator getPathIterator(AffineTransform at, double flatness) { |
129 |
// TODO Auto-generated method stub
|
130 |
return null; |
131 |
} |
132 |
|
133 |
public int getShapeType() { |
134 |
// TODO Auto-generated method stub
|
135 |
return 0; |
136 |
} |
137 |
|
138 |
public int getType() { |
139 |
// TODO Auto-generated method stub
|
140 |
return 0; |
141 |
} |
142 |
|
143 |
public boolean intersects(Rectangle2D r) { |
144 |
// TODO Auto-generated method stub
|
145 |
return false; |
146 |
} |
147 |
|
148 |
public Object invokeOperation(int index, GeometryOperationContext ctx) |
149 |
throws GeometryOperationNotSupportedException,
|
150 |
GeometryOperationException { |
151 |
// TODO Auto-generated method stub
|
152 |
return null; |
153 |
} |
154 |
|
155 |
public Object invokeOperation(String opName, GeometryOperationContext ctx) |
156 |
throws GeometryOperationNotSupportedException,
|
157 |
GeometryOperationException { |
158 |
// TODO Auto-generated method stub
|
159 |
return null; |
160 |
} |
161 |
|
162 |
public boolean isSimple() { |
163 |
// TODO Auto-generated method stub
|
164 |
return false; |
165 |
} |
166 |
|
167 |
public void reProject(ICoordTrans ct) { |
168 |
// TODO Auto-generated method stub
|
169 |
|
170 |
} |
171 |
|
172 |
public void transform(AffineTransform at) { |
173 |
// TODO Auto-generated method stub
|
174 |
|
175 |
} |
176 |
|
177 |
public boolean contains(Point2D p) { |
178 |
// TODO Auto-generated method stub
|
179 |
return false; |
180 |
} |
181 |
|
182 |
public boolean contains(Rectangle2D r) { |
183 |
// TODO Auto-generated method stub
|
184 |
return false; |
185 |
} |
186 |
|
187 |
public boolean contains(double x, double y) { |
188 |
// TODO Auto-generated method stub
|
189 |
return false; |
190 |
} |
191 |
|
192 |
public boolean contains(double x, double y, double w, double h) { |
193 |
// TODO Auto-generated method stub
|
194 |
return false; |
195 |
} |
196 |
|
197 |
public Rectangle getBounds() { |
198 |
// TODO Auto-generated method stub
|
199 |
return null; |
200 |
} |
201 |
|
202 |
public boolean intersects(double x, double y, double w, double h) { |
203 |
// TODO Auto-generated method stub
|
204 |
return false; |
205 |
} |
206 |
|
207 |
public int compareTo(Object o) { |
208 |
// TODO Auto-generated method stub
|
209 |
return 0; |
210 |
} |
211 |
|
212 |
public FShape cloneFShape() {
|
213 |
// TODO Auto-generated method stub
|
214 |
return null; |
215 |
} |
216 |
|
217 |
public Handler[] getSelectHandlers() { |
218 |
// TODO Auto-generated method stub
|
219 |
return null; |
220 |
} |
221 |
|
222 |
public Handler[] getStretchingHandlers() { |
223 |
// TODO Auto-generated method stub
|
224 |
return null; |
225 |
} |
226 |
public SurfaceAppearance getSurfaceAppearance() {
|
227 |
// TODO Auto-generated method stub
|
228 |
return null; |
229 |
} |
230 |
public void setSurfaceAppearance(SurfaceAppearance app) { |
231 |
// TODO Auto-generated method stub
|
232 |
|
233 |
} |
234 |
public void setVertex(int index, Point p) { |
235 |
// TODO Auto-generated method stub
|
236 |
|
237 |
} |
238 |
|
239 |
} |