svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / impl / Arc2DZ.java @ 27049
History | View | Annotate | Download (1.24 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.Arc; |
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 Arc2DZ extends Arc2D implements Arc { |
19 |
private static final long serialVersionUID = -4622030261473894548L; |
20 |
|
21 |
private static GeometryType geomType = GeometryLocator.getGeometryManager() |
22 |
.registerGeometryType(Arc2DZ.class, null, TYPES.ARC, 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 Arc2DZ() {
|
32 |
super();
|
33 |
} |
34 |
|
35 |
public Arc2DZ(String id, IProjection projection, GeneralPathX gpx, Point2D i, Point2D c, Point2D e, double z) { |
36 |
super(id, projection, gpx, i, c, e);
|
37 |
this.z = z;
|
38 |
} |
39 |
|
40 |
/* (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 |
super.setCoordinateAt(index, dimension, value);
|
48 |
} |
49 |
} |
50 |
|
51 |
|
52 |
} |