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 |
/**
|
---|---|
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.GeometryLocator; |
10 |
import org.gvsig.fmap.geom.primitive.GeneralPathX; |
11 |
import org.gvsig.fmap.geom.primitive.Surface; |
12 |
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 |
private static GeometryType geomType = GeometryLocator.getGeometryManager() |
22 |
.registerGeometryType(Ellipse2D.class, null, TYPES.ELLIPSE, SUBTYPES.GEOM2DZ); |
23 |
|
24 |
private double z; |
25 |
|
26 |
/**
|
27 |
* 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 |
* @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 |
|
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 |
super.setCoordinateAt(index, dimension, value);
|
57 |
} |
58 |
} |
59 |
|
60 |
} |