Statistics
| Revision:

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

History | View | Annotate | Download (1.24 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.Circle;
11
import org.gvsig.fmap.geom.primitive.GeneralPathX;
12 23236 fdiaz
import org.gvsig.fmap.geom.type.GeometryType;
13
14
/**
15
 * @author paco
16
 *
17
 */
18
public class Circle2DZ extends Circle2D implements Circle {
19
        private static final long serialVersionUID = 5806439460681368421L;
20
21 26328 jpiera
        private static GeometryType geomType = GeometryLocator.getGeometryManager()
22 26866 jpiera
        .registerGeometryType(Circle2DZ.class, null, TYPES.CIRCLE, SUBTYPES.GEOM2DZ);
23 27049 jpiera
24 23236 fdiaz
        private double z;
25
26 26788 jpiera
        /**
27
         * Constructor without arguments. It is necessary to create
28
         * geometries using the {@link GeometryType}{@link #create()}
29
         * method
30
         */
31
        public Circle2DZ() {
32
                super();
33
        }
34
35 23236 fdiaz
        public Circle2DZ(String id, IProjection projection, GeneralPathX gpx, Point2D c, double r, double z) {
36
                super(id, projection, gpx, c, r);
37
                this.z = z;
38
        }
39
40 26788 jpiera
        /* (non-Javadoc)
41
         * @see org.gvsig.fmap.geom.primitive.Circle2D#setCoordinateAt(int, int, double)
42
         */
43
        public void setCoordinateAt(int index, int dimension, double value) {
44
                if (dimension == 2){
45
                        z = value;
46
                }else{
47 27049 jpiera
                        super.setCoordinateAt(index, dimension, value);
48 26788 jpiera
                }
49
        }
50 23236 fdiaz
51 26788 jpiera
52
53 23236 fdiaz
}