svn-gvsig-desktop / trunk / libraries / libGeometries3D / src / main / java / org / gvsig / operations3D / Draw3DPoint3D.java @ 21515
History | View | Annotate | Download (1.01 KB)
1 |
package org.gvsig.operations3D; |
---|---|
2 |
|
3 |
import org.gvsig.fmap.geom.Geometry; |
4 |
import org.gvsig.fmap.geom.GeometryManager; |
5 |
import org.gvsig.fmap.geom.operation.GeometryOperation; |
6 |
import org.gvsig.fmap.geom.operation.GeometryOperationContext; |
7 |
import org.gvsig.geometries3D.Point3D; |
8 |
|
9 |
|
10 |
public class Draw3DPoint3D extends GeometryOperation { |
11 |
|
12 |
// Check GeometryManager for alternative methods to register an operation
|
13 |
public static final int CODE = GeometryManager.getInstance() |
14 |
.registerGeometryOperation("Draw3DPoint3D", new Draw3DPoint3D(), |
15 |
Point3D.class); |
16 |
|
17 |
public Object invoke(Geometry geom, GeometryOperationContext ctx) { |
18 |
Point3D p3D = (Point3D) geom; |
19 |
System.out.println("Codigo de la geometria: " + p3D.getType()); |
20 |
System.out.println("Nombre: " + p3D.getId()); |
21 |
System.out.println("X: " + p3D.getX()); |
22 |
System.out.println("Y: " + p3D.getY()); |
23 |
System.out.println("Z: " + p3D.getZ()); |
24 |
if (ctx!=null){ |
25 |
System.out.println("contexto no nulo"); |
26 |
} |
27 |
return null; |
28 |
} |
29 |
|
30 |
public int getOperationIndex() { |
31 |
return CODE;
|
32 |
} |
33 |
|
34 |
} |