svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / impl / Ellipse2DZ.java @ 34162
History | View | Annotate | Download (1.28 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 | 27029 | jpiera | import org.gvsig.fmap.geom.primitive.GeneralPathX; |
10 | import org.gvsig.fmap.geom.primitive.Surface; |
||
11 | 23236 | fdiaz | import org.gvsig.fmap.geom.type.GeometryType; |
12 | |||
13 | /**
|
||
14 | * @author paco
|
||
15 | *
|
||
16 | */
|
||
17 | public class Ellipse2DZ extends Ellipse2D implements Surface { |
||
18 | private static final long serialVersionUID = -6678908069111004754L; |
||
19 | private double z; |
||
20 | |||
21 | /**
|
||
22 | 29097 | jpiera | * The constructor with the GeometryType like and argument
|
23 | * is used by the {@link GeometryType}{@link #create()}
|
||
24 | * to create the geometry
|
||
25 | * @param type
|
||
26 | * The geometry type
|
||
27 | 26788 | jpiera | */
|
28 | 29097 | jpiera | public Ellipse2DZ(GeometryType geometryType) {
|
29 | super(geometryType);
|
||
30 | 26788 | jpiera | } |
31 | |||
32 | /**
|
||
33 | 23236 | fdiaz | * @param id
|
34 | * @param projection
|
||
35 | * @param gpx
|
||
36 | * @param i
|
||
37 | * @param e
|
||
38 | * @param d
|
||
39 | */
|
||
40 | 29097 | jpiera | Ellipse2DZ(GeometryType geometryType, String id, IProjection projection, GeneralPathX gpx,
|
41 | 23236 | fdiaz | Point2D i, Point2D e, double d, double z) { |
42 | 29097 | jpiera | super(geometryType, id, projection, gpx, i, e, d);
|
43 | 23236 | fdiaz | this.z = z;
|
44 | } |
||
45 | 26788 | jpiera | |
46 | /* (non-Javadoc)
|
||
47 | * @see org.gvsig.fmap.geom.primitive.Circle2D#setCoordinateAt(int, int, double)
|
||
48 | */
|
||
49 | public void setCoordinateAt(int index, int dimension, double value) { |
||
50 | if (dimension == 2){ |
||
51 | z = value; |
||
52 | }else{
|
||
53 | 27049 | jpiera | super.setCoordinateAt(index, dimension, value);
|
54 | 26788 | jpiera | } |
55 | } |
||
56 | 23236 | fdiaz | |
57 | } |