Statistics
| Revision:

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

History | View | Annotate | Download (1.58 KB)

1
/**
2
 *
3
 */
4
package org.gvsig.fmap.geom.primitive.impl;
5

    
6
import java.awt.geom.Point2D;
7

    
8
import org.cresques.cts.IProjection;
9
import org.gvsig.fmap.geom.Geometry;
10
import org.gvsig.fmap.geom.primitive.Curve;
11
import org.gvsig.fmap.geom.primitive.GeneralPathX;
12
import org.gvsig.fmap.geom.type.GeometryType;
13

    
14
/**
15
 * @author paco
16
 *
17
 */
18
public class EllipticArc2DZ extends EllipticArc2D implements Curve {
19
        private static final long serialVersionUID = -7625487589450160319L;
20
        private double z;
21

    
22
        /**
23
         * The constructor with the GeometryType like and argument 
24
         * is used by the {@link GeometryType}{@link #create()}
25
         * to create the geometry
26
         * @param type
27
         * The geometry type
28
         */
29
        public EllipticArc2DZ(GeometryType geometryType) {
30
                super(geometryType);                
31
        }
32
        
33
        /**
34
         * Constructor used in the {@link Geometry#cloneGeometry()} method
35
         * @param geometryType
36
         * @param id
37
         * @param projection
38
         * @param gpx
39
         * @param axis1Start
40
         * @param axis1End
41
         * @param axis2Dist
42
         * @param angSt
43
         * @param andExt
44
         * @param z
45
         */
46
        EllipticArc2DZ(GeometryType geometryType, String id, IProjection projection, GeneralPathX gpx, Point2D axis1Start,Point2D axis1End, double axis2Dist, double angSt, double andExt, double z) {
47
                super(geometryType, id, projection, gpx, axis1Start, axis1End, axis2Dist, angSt, andExt);
48
                this.z = z;
49
        }
50
        
51
        /* (non-Javadoc)
52
         * @see org.gvsig.fmap.geom.primitive.Circle2D#setCoordinateAt(int, int, double)
53
         */
54
        public void setCoordinateAt(int index, int dimension, double value) {
55
                if (dimension == 2){
56
                        z = value;
57
                }else{
58
                        super.setCoordinateAt(index, dimension, value);
59
                }
60
        }
61

    
62
}