Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / impl / Ellipse2DZ.java @ 29018

History | View | Annotate | Download (1.36 KB)

1 23236 fdiaz
/**
2
 *
3
 */
4 27029 jpiera
package org.gvsig.fmap.geom.primitive.impl;
5 23236 fdiaz
6
import java.awt.geom.Point2D;
7
8
import org.cresques.cts.IProjection;
9 26328 jpiera
import org.gvsig.fmap.geom.GeometryLocator;
10 27029 jpiera
import org.gvsig.fmap.geom.primitive.GeneralPathX;
11
import org.gvsig.fmap.geom.primitive.Surface;
12 23236 fdiaz
import org.gvsig.fmap.geom.type.GeometryType;
13
14
/**
15
 * @author paco
16
 *
17
 */
18
public class Ellipse2DZ extends Ellipse2D implements Surface {
19
        private static final long serialVersionUID = -6678908069111004754L;
20
21 26328 jpiera
        private static GeometryType geomType = GeometryLocator.getGeometryManager()
22 26866 jpiera
        .registerGeometryType(Ellipse2D.class, null, TYPES.ELLIPSE, SUBTYPES.GEOM2DZ);
23 27049 jpiera
24 23236 fdiaz
        private double z;
25
26
        /**
27 26788 jpiera
         * Constructor without arguments. It is necessary to create
28
         * geometries using the {@link GeometryType}{@link #create()}
29
         * method
30
         */
31
        public Ellipse2DZ() {
32
                super();
33
        }
34
35
        /**
36 23236 fdiaz
         * @param id
37
         * @param projection
38
         * @param gpx
39
         * @param i
40
         * @param e
41
         * @param d
42
         */
43
        public Ellipse2DZ(String id, IProjection projection, GeneralPathX gpx,
44
                        Point2D i, Point2D e, double d, double z) {
45
                super(id, projection, gpx, i, e, d);
46
                this.z = z;
47
        }
48 26788 jpiera
49
        /* (non-Javadoc)
50
         * @see org.gvsig.fmap.geom.primitive.Circle2D#setCoordinateAt(int, int, double)
51
         */
52
        public void setCoordinateAt(int index, int dimension, double value) {
53
                if (dimension == 2){
54
                        z = value;
55
                }else{
56 27049 jpiera
                        super.setCoordinateAt(index, dimension, value);
57 26788 jpiera
                }
58
        }
59 23236 fdiaz
60
}