|
1 |
package org.gvsig.geometries3D;
|
|
2 |
|
|
3 |
import java.awt.Rectangle;
|
|
4 |
import java.awt.geom.AffineTransform;
|
|
5 |
import java.awt.geom.PathIterator;
|
|
6 |
import java.awt.geom.Point2D;
|
|
7 |
import java.awt.geom.Rectangle2D;
|
|
8 |
import java.util.Vector;
|
|
9 |
|
|
10 |
import org.cresques.cts.ICoordTrans;
|
|
11 |
import org.gvsig.fmap.geom.GeometryManager;
|
|
12 |
import org.gvsig.fmap.geom.handler.Handler;
|
|
13 |
import org.gvsig.fmap.geom.primitive.AbstractPrimitive;
|
|
14 |
import org.gvsig.fmap.geom.primitive.Envelope;
|
|
15 |
import org.gvsig.fmap.geom.primitive.FShape;
|
|
16 |
import org.gvsig.fmap.geom.primitive.GeneralPathX;
|
|
17 |
import org.gvsig.fmap.geom.type.GeometryType;
|
|
18 |
|
|
19 |
public class Polygon3D extends AbstractPrimitive {
|
|
20 |
/**
|
|
21 |
*
|
|
22 |
*/
|
|
23 |
private static final long serialVersionUID = 1L;
|
|
24 |
private static final GeometryType geomType = GeometryManager.getInstance()
|
|
25 |
.registerGeometryType(Polygon3D.class);
|
|
26 |
|
|
27 |
|
|
28 |
public static final int CODE = geomType.getType();
|
|
29 |
|
|
30 |
protected Vector<Point3D> _varray;
|
|
31 |
|
|
32 |
public Polygon3D(String id) {
|
|
33 |
super(id, null);
|
|
34 |
_varray = new Vector<Point3D>();
|
|
35 |
}
|
|
36 |
|
|
37 |
@Override
|
|
38 |
public GeometryType getGeometryType() {
|
|
39 |
return geomType;
|
|
40 |
}
|
|
41 |
public void addVertex(Point3D p){
|
|
42 |
_varray.add(p);
|
|
43 |
}
|
|
44 |
public void removeVertex(int index){
|
|
45 |
_varray.remove(index);
|
|
46 |
}
|
|
47 |
public Point3D getVertex(int index)
|
|
48 |
{
|
|
49 |
return _varray.get(index);
|
|
50 |
}
|
|
51 |
public int getNumVertices(){
|
|
52 |
return _varray.size();
|
|
53 |
}
|
|
54 |
public void insertVertex(int index, Point3D p){
|
|
55 |
_varray.insertElementAt(p, index);
|
|
56 |
}
|
|
57 |
|
|
58 |
@Override
|
|
59 |
public int getShapeType() {
|
|
60 |
// TODO Auto-generated method stub
|
|
61 |
return 0;
|
|
62 |
}
|
|
63 |
|
|
64 |
public Rectangle2D getBounds2D() {
|
|
65 |
// TODO Auto-generated method stub
|
|
66 |
return null;
|
|
67 |
}
|
|
68 |
|
|
69 |
public int getCoordinateDimension() {
|
|
70 |
// TODO Auto-generated method stub
|
|
71 |
return 0;
|
|
72 |
}
|
|
73 |
|
|
74 |
public Envelope getEnvelope() {
|
|
75 |
// TODO Auto-generated method stub
|
|
76 |
return null;
|
|
77 |
}
|
|
78 |
|
|
79 |
public GeneralPathX getGeneralPath() {
|
|
80 |
// TODO Auto-generated method stub
|
|
81 |
return null;
|
|
82 |
}
|
|
83 |
|
|
84 |
public PathIterator getPathIterator(AffineTransform arg0) {
|
|
85 |
// TODO Auto-generated method stub
|
|
86 |
return null;
|
|
87 |
}
|
|
88 |
|
|
89 |
public PathIterator getPathIterator(AffineTransform arg0, double arg1) {
|
|
90 |
// TODO Auto-generated method stub
|
|
91 |
return null;
|
|
92 |
}
|
|
93 |
|
|
94 |
public int getType() {
|
|
95 |
|
|
96 |
return CODE;
|
|
97 |
}
|
|
98 |
|
|
99 |
public boolean intersects(Rectangle2D arg0) {
|
|
100 |
// TODO Auto-generated method stub
|
|
101 |
return false;
|
|
102 |
}
|
|
103 |
|
|
104 |
public void reProject(ICoordTrans arg0) {
|
|
105 |
// TODO Auto-generated method stub
|
|
106 |
|
|
107 |
}
|
|
108 |
|
|
109 |
public void transform(AffineTransform arg0) {
|
|
110 |
// TODO Auto-generated method stub
|
|
111 |
|
|
112 |
}
|
|
113 |
|
|
114 |
public boolean contains(Point2D arg0) {
|
|
115 |
// TODO Auto-generated method stub
|
|
116 |
return false;
|
|
117 |
}
|
|
118 |
|
|
119 |
public boolean contains(Rectangle2D arg0) {
|
|
120 |
// TODO Auto-generated method stub
|
|
121 |
return false;
|
|
122 |
}
|
|
123 |
|
|
124 |
public boolean contains(double arg0, double arg1) {
|
|
125 |
// TODO Auto-generated method stub
|
|
126 |
return false;
|
|
127 |
}
|
|
128 |
|
|
129 |
public boolean contains(double arg0, double arg1, double arg2, double arg3) {
|
|
130 |
// TODO Auto-generated method stub
|
|
131 |
return false;
|
|
132 |
}
|
|
133 |
|
|
134 |
public Rectangle getBounds() {
|
|
135 |
// TODO Auto-generated method stub
|
|
136 |
return null;
|
|
137 |
}
|
|
138 |
|
|
139 |
public boolean intersects(double arg0, double arg1, double arg2, double arg3) {
|
|
140 |
// TODO Auto-generated method stub
|
|
141 |
return false;
|
|
142 |
}
|
|
143 |
|
|
144 |
public FShape cloneFShape() {
|
|
145 |
// TODO Auto-generated method stub
|
|
146 |
return null;
|
|
147 |
}
|
|
148 |
|
|
149 |
public Handler[] getSelectHandlers() {
|
|
150 |
// TODO Auto-generated method stub
|
|
151 |
return null;
|
|
152 |
}
|
|
153 |
|
|
154 |
public Handler[] getStretchingHandlers() {
|
|
155 |
// TODO Auto-generated method stub
|
|
156 |
return null;
|
|
157 |
}
|
|
158 |
|
|
159 |
}
|