Statistics
| Revision:

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

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