Revision 18219
trunk/libraries/lib3DMap/build.xml | ||
---|---|---|
15 | 15 |
<property name="ext3D" value="../_fwAndami/gvSIG/extensiones/com.iver.ai2.gvsig3d" /> |
16 | 16 |
<property name="ext3Dgui-lib" value="../ext3Dgui/lib" /> |
17 | 17 |
<property name="ext3D-lib" value="../ext3D/lib" /> |
18 |
<property name="depman.executable" value="depman/bin/dmn.py"/>
|
|
18 |
<property name="buildman.executable" value="buildman/bin/bmn.py"/>
|
|
19 | 19 |
<import file="../binaries/ant/utilities.xml"/> |
20 | 20 |
|
21 | 21 |
<target name="batch-build" description="Builds all. This is called by appgvSIG script" |
... | ... | |
89 | 89 |
|
90 | 90 |
<target name="update-binaries-cache"> |
91 | 91 |
<exec executable="python"> |
92 |
<arg value="${depman.executable}"/>
|
|
92 |
<arg value="${buildman.executable}"/>
|
|
93 | 93 |
<arg value="update"/> |
94 | 94 |
<arg value="--cache"/> |
95 | 95 |
</exec> |
... | ... | |
97 | 97 |
|
98 | 98 |
<target name="update-binaries-remote"> |
99 | 99 |
<exec executable="python"> |
100 |
<arg value="${depman.executable}"/>
|
|
100 |
<arg value="${buildman.executable}"/>
|
|
101 | 101 |
<arg value="update"/> |
102 | 102 |
<arg value="--remote"/> |
103 | 103 |
</exec> |
... | ... | |
105 | 105 |
|
106 | 106 |
<target name="update-binaries-atifglrx-remote"> |
107 | 107 |
<exec executable="python"> |
108 |
<arg value="${depman.executable}"/>
|
|
108 |
<arg value="${buildman.executable}"/>
|
|
109 | 109 |
<arg value="update"/> |
110 |
<arg value="--file"/> |
|
110 | 111 |
<arg value="depman-atifglrx.xml"/> |
111 | 112 |
<arg value="--remote"/> |
112 | 113 |
</exec> |
trunk/libraries/lib3DMap/test/com/iver/ai2/gvsig3d/TransformacionesTest.java | ||
---|---|---|
5 | 5 |
import com.iver.ai2.gvsig3d.gui.Hud; |
6 | 6 |
import com.iver.ai2.gvsig3d.utils.UtilCoord; |
7 | 7 |
|
8 |
import es.upv.ai2.libjosg.Vec3;
|
|
9 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
10 |
import es.upv.ai2.libjosg.viewer.ViewerFactory;
|
|
8 |
import es.upv.ai2.osgvp.Vec3;
|
|
9 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
10 |
import es.upv.ai2.osgvp.viewer.ViewerFactory;
|
|
11 | 11 |
|
12 | 12 |
public class TransformacionesTest extends TestCase { |
13 | 13 |
public void testTrasnform() throws Throwable { |
trunk/libraries/lib3DMap/.classpath | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="src" path="src"/> |
|
4 |
<classpathentry kind="src" path="test"/> |
|
5 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
|
6 |
<classpathentry combineaccessrules="false" kind="src" path="/appgvSIG"/> |
|
7 |
<classpathentry combineaccessrules="false" kind="src" path="/_fwAndami"/> |
|
8 |
<classpathentry kind="lib" path="lib/libCacheService.jar" sourcepath="/libCacheService"/> |
|
9 |
<classpathentry kind="lib" path="/libFMap/lib/driver-manager-1.1.jar"/> |
|
10 |
<classpathentry kind="lib" path="/libFMap/lib/gdbms-0.8-SNAPSHOT.jar" sourcepath="/libGDBMS"/> |
|
11 |
<classpathentry kind="lib" path="/_fwAndami/lib/castor-0.9.5.3-xml.jar"/> |
|
12 |
<classpathentry kind="lib" path="lib/libjosg-core-2.0-SNAPSHOT.jar"/> |
|
13 |
<classpathentry kind="lib" path="lib/libjosg-ephemeris-2.0-SNAPSHOT.jar"/> |
|
14 |
<classpathentry kind="lib" path="lib/libjosg-examples-2.0-SNAPSHOT.jar"/> |
|
15 |
<classpathentry kind="lib" path="lib/libjosg-features-2.0-SNAPSHOT.jar"/> |
|
16 |
<classpathentry kind="lib" path="lib/libjosg-manipulator-2.0-SNAPSHOT.jar"/> |
|
17 |
<classpathentry kind="lib" path="lib/libjosg-planets-2.0-SNAPSHOT.jar"/> |
|
18 |
<classpathentry kind="lib" path="lib/libjosg-viewer-2.0-SNAPSHOT.jar"/> |
|
19 |
<classpathentry kind="lib" path="lib/libNative-1.0.jar"/> |
|
20 |
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/> |
|
21 |
<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/Utiles/src"/> |
|
22 |
<classpathentry kind="lib" path="/libFMap/lib/org.gvsig.raster.jar"/> |
|
23 |
<classpathentry kind="lib" path="/_fwAndami/lib/org.gvsig.ui.jar"/> |
|
24 |
<classpathentry kind="lib" path="/libFMap/lib/org.cresques.cts.jar"/> |
|
25 |
<classpathentry kind="lib" path="/libFMap/lib/org.gvsig.fmap.raster.jar" sourcepath="/extRasterTools-SE"/> |
|
26 |
<classpathentry kind="lib" path="/libFMap/lib/remote-clients.jar" sourcepath="/libRemoteServices"/> |
|
27 |
<classpathentry kind="lib" path="lib/gluegen-rt-1.1.0.jar"/> |
|
28 |
<classpathentry kind="lib" path="lib/jogl-1.1.0.jar"/> |
|
29 |
<classpathentry combineaccessrules="false" kind="src" path="/extWCS"/> |
|
30 |
<classpathentry combineaccessrules="false" kind="src" path="/extWMS"/> |
|
31 |
<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/> |
|
32 |
<classpathentry combineaccessrules="false" kind="src" path="/libExceptions"/> |
|
33 |
<classpathentry kind="output" path="bin"/> |
|
34 |
</classpath> |
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="src" path="src"/> |
|
4 |
<classpathentry kind="src" path="test"/> |
|
5 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> |
|
6 |
<classpathentry combineaccessrules="false" kind="src" path="/appgvSIG"/> |
|
7 |
<classpathentry combineaccessrules="false" kind="src" path="/_fwAndami"/> |
|
8 |
<classpathentry kind="lib" path="lib/libCacheService.jar" sourcepath="/libCacheService"/> |
|
9 |
<classpathentry kind="lib" path="/libFMap/lib/driver-manager-1.1.jar"/> |
|
10 |
<classpathentry kind="lib" path="/libFMap/lib/gdbms-0.8-SNAPSHOT.jar" sourcepath="/libGDBMS"/> |
|
11 |
<classpathentry kind="lib" path="/_fwAndami/lib/castor-0.9.5.3-xml.jar"/> |
|
12 |
<classpathentry kind="lib" path="lib/libNative-1.0.jar"/> |
|
13 |
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/> |
|
14 |
<classpathentry kind="lib" path="/_fwAndami/lib/iver-utiles.jar" sourcepath="/Utiles/src"/> |
|
15 |
<classpathentry kind="lib" path="/libFMap/lib/org.gvsig.raster.jar"/> |
|
16 |
<classpathentry kind="lib" path="/_fwAndami/lib/org.gvsig.ui.jar"/> |
|
17 |
<classpathentry kind="lib" path="/libFMap/lib/org.cresques.cts.jar"/> |
|
18 |
<classpathentry kind="lib" path="/libFMap/lib/org.gvsig.fmap.raster.jar" sourcepath="/extRasterTools-SE"/> |
|
19 |
<classpathentry kind="lib" path="/libFMap/lib/remote-clients.jar" sourcepath="/libRemoteServices"/> |
|
20 |
<classpathentry kind="lib" path="lib/gluegen-rt-1.1.0.jar"/> |
|
21 |
<classpathentry kind="lib" path="lib/jogl-1.1.0.jar"/> |
|
22 |
<classpathentry combineaccessrules="false" kind="src" path="/extWCS"/> |
|
23 |
<classpathentry combineaccessrules="false" kind="src" path="/extWMS"/> |
|
24 |
<classpathentry combineaccessrules="false" kind="src" path="/libFMap"/> |
|
25 |
<classpathentry combineaccessrules="false" kind="src" path="/libExceptions"/> |
|
26 |
<classpathentry kind="lib" path="lib/libosgvp-core-2.0-SNAPSHOT.jar"/> |
|
27 |
<classpathentry kind="lib" path="lib/libosgvp-ephemeris-2.0-SNAPSHOT.jar"/> |
|
28 |
<classpathentry kind="lib" path="lib/libosgvp-examples-2.0-SNAPSHOT.jar"/> |
|
29 |
<classpathentry kind="lib" path="lib/libosgvp-features-2.0-SNAPSHOT.jar"/> |
|
30 |
<classpathentry kind="lib" path="lib/libosgvp-manipulator-2.0-SNAPSHOT.jar"/> |
|
31 |
<classpathentry kind="lib" path="lib/libosgvp-planets-2.0-SNAPSHOT.jar"/> |
|
32 |
<classpathentry kind="lib" path="lib/libosgvp-viewer-2.0-SNAPSHOT.jar"/> |
|
33 |
<classpathentry kind="output" path="bin"/> |
|
34 |
</classpath> |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/gui/Hud.java | ||
---|---|---|
9 | 9 |
import com.iver.ai2.gvsig3d.resources.ResourcesFactory; |
10 | 10 |
import com.iver.andami.PluginServices; |
11 | 11 |
|
12 |
import es.upv.ai2.libjosg.Group; |
|
13 |
import es.upv.ai2.libjosg.Node; |
|
14 |
import es.upv.ai2.libjosg.Vec4; |
|
15 |
import es.upv.ai2.libjosg.features.Text; |
|
16 |
import es.upv.ai2.libjosg.planets.Planet; |
|
17 |
import es.upv.ai2.libjosg.planets.PlanetViewer; |
|
18 |
import es.upv.ai2.libjosg.viewer.IViewerContainer; |
|
12 |
import es.upv.ai2.osgvp.Group; |
|
13 |
import es.upv.ai2.osgvp.Node; |
|
14 |
import es.upv.ai2.osgvp.Vec4; |
|
15 |
import es.upv.ai2.osgvp.features.Text; |
|
16 |
import es.upv.ai2.osgvp.planets.Planet; |
|
17 |
import es.upv.ai2.osgvp.viewer.IViewerContainer; |
|
19 | 18 |
|
20 | 19 |
/** |
21 | 20 |
* Use this class for draw items in HUD |
... | ... | |
94 | 93 |
this.addChild(textoHud); |
95 | 94 |
|
96 | 95 |
//Setting up the lighting mode to disable (rgaitan) |
97 |
this.setLightingMode(Node.LightingMode.OFF | Node.LightingMode.PROTECTED);
|
|
96 |
this.setLightingMode(Node.Mode.OFF | Node.Mode.PROTECTED);
|
|
98 | 97 |
|
99 | 98 |
// Seting up text |
100 | 99 |
textoHud.setCharacterSize(14); |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/gui/FeatureFactory.java | ||
---|---|---|
9 | 9 |
import com.iver.ai2.gvsig3d.utils.Punto3D; |
10 | 10 |
import com.iver.cit.gvsig.fmap.core.v02.FLabel; |
11 | 11 |
|
12 |
import es.upv.ai2.libjosg.AutoTransform; |
|
13 |
import es.upv.ai2.libjosg.Group; |
|
14 |
import es.upv.ai2.libjosg.Node; |
|
15 |
import es.upv.ai2.libjosg.Optimizer; |
|
16 |
import es.upv.ai2.libjosg.PositionAttitudeTransform; |
|
17 |
import es.upv.ai2.libjosg.Vec3; |
|
18 |
import es.upv.ai2.libjosg.Vec4; |
|
19 |
import es.upv.ai2.libjosg.Optimizer.OptimizationOptions; |
|
20 |
import es.upv.ai2.libjosg.features.PixelPoint; |
|
21 |
import es.upv.ai2.libjosg.features.Polygon; |
|
22 |
import es.upv.ai2.libjosg.features.Polyline; |
|
23 |
import es.upv.ai2.libjosg.features.QuadPoint; |
|
24 |
import es.upv.ai2.libjosg.features.ShapePoint; |
|
25 |
import es.upv.ai2.libjosg.features.Sphere; |
|
26 |
import es.upv.ai2.libjosg.features.TessellablePolygon; |
|
27 |
import es.upv.ai2.libjosg.features.Text; |
|
28 |
import es.upv.ai2.libjosg.planets.Planet; |
|
12 |
import es.upv.ai2.osgvp.AutoTransform; |
|
13 |
import es.upv.ai2.osgvp.Group; |
|
14 |
import es.upv.ai2.osgvp.Node; |
|
15 |
import es.upv.ai2.osgvp.Optimizer; |
|
16 |
import es.upv.ai2.osgvp.Vec3; |
|
17 |
import es.upv.ai2.osgvp.Vec4; |
|
18 |
import es.upv.ai2.osgvp.Optimizer.OptimizationOptions; |
|
19 |
import es.upv.ai2.osgvp.features.PixelPoint; |
|
20 |
import es.upv.ai2.osgvp.features.Polygon; |
|
21 |
import es.upv.ai2.osgvp.features.Polyline; |
|
22 |
import es.upv.ai2.osgvp.features.QuadPoint; |
|
23 |
import es.upv.ai2.osgvp.features.TessellablePolygon; |
|
24 |
import es.upv.ai2.osgvp.features.Text; |
|
25 |
import es.upv.ai2.osgvp.planets.Planet; |
|
29 | 26 |
|
30 | 27 |
public class FeatureFactory extends Group { |
31 | 28 |
|
... | ... | |
213 | 210 |
|
214 | 211 |
PixelPoint p = new PixelPoint(); |
215 | 212 |
// ShapePoint p = new ShapePoint(); |
216 |
// es.upv.ai2.libjosg.features.Sphere s = new Sphere();
|
|
213 |
// es.upv.ai2.osgvp.features.Sphere s = new Sphere();
|
|
217 | 214 |
// p.setShape(s); |
218 | 215 |
// s.setRadius(100); |
219 | 216 |
for (Iterator iter = list.iterator(); iter.hasNext();) { |
... | ... | |
233 | 230 |
// Set up size, position and color |
234 | 231 |
// p.setPointSize(element.getZize()); |
235 | 232 |
p.setPointSize(20); |
236 |
p.setLightingMode(Node.LightingMode.OFF | Node.LightingMode.PROTECTED);
|
|
233 |
p.setLightingMode(Node.Mode.OFF | Node.Mode.PROTECTED);
|
|
237 | 234 |
p.addPoint(element.getPosition(), color); |
238 | 235 |
// System.err.println("posicion del punto " +element.getPosition()); |
239 | 236 |
} |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/gui/VectorLayerMenu.java | ||
---|---|---|
47 | 47 |
import java.awt.GridBagConstraints; |
48 | 48 |
import java.awt.GridBagLayout; |
49 | 49 |
import java.awt.Insets; |
50 |
import java.awt.Rectangle; |
|
51 | 50 |
import java.awt.event.ActionEvent; |
52 | 51 |
import java.awt.event.ItemEvent; |
53 | 52 |
import java.awt.event.ItemListener; |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/map3d/layers/Layer3DProps.java | ||
---|---|---|
33 | 33 |
import com.iver.utiles.XMLEntity; |
34 | 34 |
import com.iver.utiles.xmlEntity.generate.XmlTag; |
35 | 35 |
|
36 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
36 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
37 | 37 |
|
38 | 38 |
public class Layer3DProps implements IPersistence { |
39 | 39 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/map3d/GraphicLayer3D.java | ||
---|---|---|
9 | 9 |
import com.iver.cit.gvsig.fmap.rendering.FGraphic; |
10 | 10 |
import com.iver.cit.gvsig.fmap.rendering.FGraphicLabel; |
11 | 11 |
|
12 |
import es.upv.ai2.libjosg.AutoTransform;
|
|
13 |
import es.upv.ai2.libjosg.Group;
|
|
14 |
import es.upv.ai2.libjosg.Node;
|
|
15 |
import es.upv.ai2.libjosg.Vec3;
|
|
16 |
import es.upv.ai2.libjosg.Vec4;
|
|
17 |
import es.upv.ai2.libjosg.osgDB;
|
|
18 |
import es.upv.ai2.libjosg.features.Text;
|
|
19 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
20 |
import es.upv.ai2.libjosg.planets.PlanetViewer;
|
|
12 |
import es.upv.ai2.osgvp.AutoTransform;
|
|
13 |
import es.upv.ai2.osgvp.Group;
|
|
14 |
import es.upv.ai2.osgvp.Node;
|
|
15 |
import es.upv.ai2.osgvp.Vec3;
|
|
16 |
import es.upv.ai2.osgvp.Vec4;
|
|
17 |
import es.upv.ai2.osgvp.osgDB;
|
|
18 |
import es.upv.ai2.osgvp.features.Text;
|
|
19 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
20 |
import es.upv.ai2.osgvp.planets.PlanetViewer;
|
|
21 | 21 |
|
22 | 22 |
public class GraphicLayer3D extends GraphicLayer { |
23 | 23 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/map3d/ViewPort3D.java | ||
---|---|---|
14 | 14 |
import com.iver.utiles.StringUtilities; |
15 | 15 |
import com.iver.utiles.XMLEntity; |
16 | 16 |
|
17 |
import es.upv.ai2.libjosg.Node; |
|
18 |
import es.upv.ai2.libjosg.Vec3; |
|
19 |
import es.upv.ai2.libjosg.planets.Planet; |
|
20 |
import es.upv.ai2.libjosg.viewer.IViewerContainer; |
|
21 |
import es.upv.ai2.libjosg.viewer.Intersections; |
|
17 |
import es.upv.ai2.osgvp.Vec3; |
|
18 |
import es.upv.ai2.osgvp.planets.Planet; |
|
19 |
import es.upv.ai2.osgvp.viewer.IViewerContainer; |
|
20 |
import es.upv.ai2.osgvp.viewer.Intersections; |
|
22 | 21 |
|
23 | 22 |
public class ViewPort3D extends ViewPort implements MouseListener { |
24 | 23 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/map3d/MapContext3D.java | ||
---|---|---|
18 | 18 |
import com.iver.ai2.gvsig3d.cacheservices.VectorCacheService; |
19 | 19 |
import com.iver.ai2.gvsig3d.map3d.layers.FLayers3D; |
20 | 20 |
import com.iver.ai2.gvsig3d.map3d.layers.Layer3DProps; |
21 |
import com.iver.ai2.gvsig3d.utils.UtilCoord; |
|
22 | 21 |
import com.iver.andami.PluginServices; |
23 | 22 |
import com.iver.cit.gvsig.AddLayer; |
24 | 23 |
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException; |
... | ... | |
41 | 40 |
import com.iver.cit.gvsig.fmap.rendering.LegendChangedEvent; |
42 | 41 |
import com.iver.utiles.XMLEntity; |
43 | 42 |
|
44 |
import es.upv.ai2.libjosg.Node;
|
|
45 |
import es.upv.ai2.libjosg.Vec3;
|
|
46 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
47 |
import es.upv.ai2.libjosg.planets.PlanetViewer;
|
|
48 |
import es.upv.ai2.libjosg.planets.RequestLayerListener;
|
|
49 |
import es.upv.ai2.libjosg.planets.TileCreatedListener;
|
|
50 |
import es.upv.ai2.libjosg.planets.TileEvent;
|
|
51 |
import es.upv.ai2.libjosg.viewer.Camera;
|
|
52 |
import es.upv.ai2.libjosg.viewer.IViewerContainer;
|
|
43 |
import es.upv.ai2.osgvp.Node;
|
|
44 |
import es.upv.ai2.osgvp.Vec3;
|
|
45 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
46 |
import es.upv.ai2.osgvp.planets.PlanetViewer;
|
|
47 |
import es.upv.ai2.osgvp.planets.RequestLayerListener;
|
|
48 |
import es.upv.ai2.osgvp.planets.TileCreatedListener;
|
|
49 |
import es.upv.ai2.osgvp.planets.TileEvent;
|
|
50 |
import es.upv.ai2.osgvp.viewer.Camera;
|
|
51 |
import es.upv.ai2.osgvp.viewer.IViewerContainer;
|
|
53 | 52 |
|
54 | 53 |
public class MapContext3D extends MapContext implements TileCreatedListener, |
55 | 54 |
RequestLayerListener, LayerListener, LegendListener { |
... | ... | |
894 | 893 |
TileNum tileNum = new TileNum(evt.getLevel(), tileIndices); |
895 | 894 |
String tileFileName; |
896 | 895 |
|
897 |
double minX = Math.toDegrees(evt.getMinX());
|
|
898 |
double minY = Math.toDegrees(evt.getMinY());
|
|
899 |
double width = Math.toDegrees(evt.getMaxX() - evt.getMinX());
|
|
900 |
double height = Math.toDegrees(evt.getMaxY() - evt.getMinY());
|
|
896 |
double minX = evt.getMinX();
|
|
897 |
double minY = evt.getMinY();
|
|
898 |
double width = evt.getMaxX() - evt.getMinX();
|
|
899 |
double height = evt.getMaxY() - evt.getMinY();
|
|
901 | 900 |
|
902 | 901 |
Rectangle2D extent = new Rectangle2D.Double(minX, minY, width, |
903 | 902 |
height); |
904 |
if (cacheService.intersectsLayer(tileNum)) { // extent test
|
|
903 |
if (cacheService.intersectsLayer(extent)) { // extent test
|
|
905 | 904 |
// if (cacheService.intersectsLayer(extent)) { // extent test |
906 | 905 |
// System.out.println("Extent del evento del tilenum " |
907 | 906 |
// + tileNum + minX + " " + minY + " " + width + " " |
908 | 907 |
// + height); |
909 | 908 |
try { |
910 |
tileFileName = cacheService.getTileAsFName(tileNum); |
|
911 |
// tileFileName = |
|
912 |
// cacheService.getTileAsFName(tileNum,extent); |
|
913 |
System.err.println("tile num " + tileNum); |
|
914 |
System.err.println("nombre fichero " + tileFileName); |
|
909 |
//tileFileName = cacheService.getTileAsFName(tileNum); |
|
910 |
tileFileName = cacheService.getTileAsFName(tileNum,extent); |
|
911 |
//System.err.println("tile num " + tileNum); |
|
912 |
//System.err.println("nombre fichero " + tileFileName); |
|
915 | 913 |
} catch (Exception e) { |
916 | 914 |
return; |
917 | 915 |
} |
... | ... | |
984 | 982 |
TileNum tileNum = new TileNum(evt.getLevel(), tileIndices); |
985 | 983 |
|
986 | 984 |
String tileFileName; |
987 |
double minX = Math.toDegrees(evt.getMinX());
|
|
988 |
double minY = Math.toDegrees(evt.getMinY());
|
|
989 |
double width = Math.toDegrees(evt.getMaxX() - evt.getMinX());
|
|
990 |
double height = Math.toDegrees(evt.getMaxY() - evt.getMinY());
|
|
985 |
double minX = evt.getMinX();
|
|
986 |
double minY = evt.getMinY();
|
|
987 |
double width = evt.getMaxX() - evt.getMinX();
|
|
988 |
double height = evt.getMaxY() - evt.getMinY();
|
|
991 | 989 |
|
992 | 990 |
Rectangle2D extent = new Rectangle2D.Double(minX, minY, width, height); |
993 |
if (cacheService.intersectsLayer(tileNum)) { // extent test
|
|
991 |
if (cacheService.intersectsLayer(extent)) { // extent test
|
|
994 | 992 |
// if (cacheService.intersectsLayer(extent)) { |
995 | 993 |
// System.out.println("Extetn del evento " + minX + " " + minY + " " |
996 | 994 |
// + width + " " + height); |
997 | 995 |
try { |
998 | 996 |
// tileFileName = cacheService.getTileAsFName(tileNum,extent); |
999 |
tileFileName = cacheService.getTileAsFName(tileNum); |
|
997 |
tileFileName = cacheService.getTileAsFName(tileNum, extent);
|
|
1000 | 998 |
} catch (Exception e) { |
1001 | 999 |
return; |
1002 | 1000 |
} |
... | ... | |
1057 | 1055 |
TileNum tileNum = new TileNum(evt.getLevel(), tileIndices); |
1058 | 1056 |
|
1059 | 1057 |
String tileFileName; |
1060 |
double minX = Math.toDegrees(evt.getMinX());
|
|
1061 |
double minY = Math.toDegrees(evt.getMinY());
|
|
1062 |
double width = Math.toDegrees(evt.getMaxX() - evt.getMinX());
|
|
1063 |
double height = Math.toDegrees(evt.getMaxY() - evt.getMinY());
|
|
1058 |
double minX = evt.getMinX();
|
|
1059 |
double minY = evt.getMinY();
|
|
1060 |
double width = evt.getMaxX() - evt.getMinX();
|
|
1061 |
double height = evt.getMaxY() - evt.getMinY();
|
|
1064 | 1062 |
|
1065 | 1063 |
Rectangle2D extent = new Rectangle2D.Double(minX, minY, width, height); |
1066 |
if (cacheService.intersectsLayer(tileNum)) { // extent test
|
|
1064 |
if (cacheService.intersectsLayer(extent)) { // extent test
|
|
1067 | 1065 |
// if (cacheService.intersectsLayer(extent)) { |
1068 |
// System.out.println("Extent del evento del tilenum " + tileNum |
|
1069 |
// + minX + " " + minY + " " + width + " " + height); |
|
1070 | 1066 |
try { |
1071 |
// tileFileName = cacheService.getTileAsFName(tileNum,extent);
|
|
1072 |
tileFileName = cacheService.getTileAsFName(tileNum); |
|
1067 |
tileFileName = cacheService.getTileAsFName(tileNum,extent); |
|
1068 |
//tileFileName = cacheService.getTileAsFName(tileNum);
|
|
1073 | 1069 |
// System.err.println("tile num " + tileNum); |
1074 | 1070 |
// System.err.println("nombre fichero " + tileFileName); |
1075 | 1071 |
} catch (Exception e) { |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/listener/canvasListener.java | ||
---|---|---|
5 | 5 |
import java.awt.event.MouseEvent; |
6 | 6 |
import java.awt.event.MouseListener; |
7 | 7 |
|
8 |
import es.upv.ai2.libjosg.Vec3;
|
|
9 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
10 |
import es.upv.ai2.libjosg.planets.PlanetViewer;
|
|
11 |
import es.upv.ai2.libjosg.viewer.Camera;
|
|
12 |
import es.upv.ai2.libjosg.viewer.IViewerContainer;
|
|
13 |
import es.upv.ai2.libjosg.viewer.Intersection;
|
|
14 |
import es.upv.ai2.libjosg.viewer.Intersections;
|
|
15 |
import es.upv.ai2.libjosg.viewer.OSGViewer;
|
|
8 |
import es.upv.ai2.osgvp.Vec3;
|
|
9 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
10 |
import es.upv.ai2.osgvp.planets.PlanetViewer;
|
|
11 |
import es.upv.ai2.osgvp.viewer.Camera;
|
|
12 |
import es.upv.ai2.osgvp.viewer.IViewerContainer;
|
|
13 |
import es.upv.ai2.osgvp.viewer.Intersection;
|
|
14 |
import es.upv.ai2.osgvp.viewer.Intersections;
|
|
15 |
import es.upv.ai2.osgvp.viewer.OSGViewer;
|
|
16 | 16 |
|
17 | 17 |
public class canvasListener implements KeyListener, MouseListener { |
18 | 18 |
private static boolean active = false; |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/cacheservices/FLayerCacheService.java | ||
---|---|---|
50 | 50 |
import com.iver.utiles.FileUtils; |
51 | 51 |
import com.iver.utiles.swing.threads.Cancellable; |
52 | 52 |
|
53 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
53 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
54 | 54 |
|
55 | 55 |
public class FLayerCacheService extends RasterCacheService { |
56 | 56 |
private boolean _loadFailed = true; |
... | ... | |
351 | 351 |
|
352 | 352 |
} |
353 | 353 |
|
354 |
public String getTileAsFName(TileNum t) throws CacheServiceException { |
|
355 |
|
|
354 |
public String getTileAsFName(TileNum t, Rectangle2D extent) throws CacheServiceException { |
|
356 | 355 |
if (_loadFailed) { |
357 | 356 |
throw new CacheServiceException(new Exception()); |
358 | 357 |
} |
... | ... | |
360 | 359 |
String fName = getTileFileName(t); |
361 | 360 |
// System.out.println("CMTexture2D: requestTexture: "+tileId); |
362 | 361 |
if (!new File(fName).exists()) { |
363 |
Rectangle2D tileExtent = computeBBox(t); |
|
364 |
// System.out.println("Extent calculado del tilenum "+ t + |
|
365 |
// tileExtent.getMinX() + " " |
|
366 |
// + tileExtent.getMinY() + " " + tileExtent.getHeight() + " " + |
|
367 |
// tileExtent.getWidth()); |
|
368 |
getTileFromLayer(fName, tileExtent); |
|
369 |
} |
|
370 |
return fName; |
|
371 |
} |
|
372 |
|
|
373 |
public String getTileAsFName(TileNum t, Rectangle2D extent) |
|
374 |
throws CacheServiceException { |
|
375 |
if (_loadFailed) { |
|
376 |
throw new CacheServiceException(new Exception()); |
|
377 |
} |
|
378 |
String tileId = t.numToOpTileId(); |
|
379 |
String fName = getTileFileName(t); |
|
380 |
// System.out.println("CMTexture2D: requestTexture: "+tileId); |
|
381 |
if (!new File(fName).exists()) { |
|
382 | 362 |
Rectangle2D tileExtent = extent; |
383 | 363 |
getTileFromLayer(fName, tileExtent); |
384 | 364 |
} |
385 | 365 |
return fName; |
386 | 366 |
} |
387 | 367 |
|
388 |
public Image getTileAsImage(TileNum tileNum) throws CacheServiceException { |
|
368 |
public Image getTileAsImage(TileNum tileNum, Rectangle2D extent) throws CacheServiceException {
|
|
389 | 369 |
if ((tileNum.getLevel() == 5)) {// && (tileNum.getX())==29 && |
390 | 370 |
// (tileNum.getY()==9)){ |
391 | 371 |
System.err.println("pillado"); |
... | ... | |
397 | 377 |
String tileId = tileNum.numToOpTileId(); |
398 | 378 |
String fName = getTileFileName(tileNum); |
399 | 379 |
// System.out.println("CMTexture2D: requestTexture: "+tileId); |
400 |
Rectangle2D tileExtent = computeBBox(tileNum);
|
|
380 |
Rectangle2D tileExtent = extent;
|
|
401 | 381 |
return getTileFromLayer(fName, tileExtent); |
402 | 382 |
} |
403 | 383 |
|
404 |
public boolean intersectsLayer(TileNum tileNum) { |
|
405 |
Rectangle2D tileExtent = computeBBox(tileNum); |
|
406 |
// TODO: use a reprojected layer extent !!! |
|
407 |
// System.err.println("TILE: |
|
408 |
// ("+tileExtent.getMinX()+","+tileExtent.getMinY()+"),("+ |
|
409 |
// tileExtent.getMaxX()+","+tileExtent.getMaxY()+")"); |
|
410 |
// System.err.println("CAPA: |
|
411 |
// ("+_lyrExtentRect.getMinX()+","+_lyrExtentRect.getMinY()+"),("+ |
|
412 |
// _lyrExtentRect.getMaxX()+","+_lyrExtentRect.getMaxY()+")"); |
|
413 |
// System.err.println("INTERSECTA LA |
|
414 |
// CAPAAAAAA??????????:"+_lyrExtentRect.intersects(tileExtent)); |
|
415 |
// return (_lyrExtentRect.intersects(tileExtent)); |
|
416 |
return Math.max(_lyrExtentRect.getMinX(), tileExtent.getMinX()) <= Math |
|
417 |
.min(_lyrExtentRect.getMaxX(), tileExtent.getMaxX()) |
|
418 |
&& Math.max(Math.min(_lyrExtentRect.getMinY(), _lyrExtentRect |
|
419 |
.getMaxY()), tileExtent.getMinY()) <= Math.min( |
|
420 |
Math.max(_lyrExtentRect.getMinY(), _lyrExtentRect |
|
421 |
.getMaxY()), tileExtent.getMaxY()); |
|
422 |
} |
|
423 |
|
|
424 | 384 |
public boolean intersectsLayer(Rectangle2D extent) { |
425 | 385 |
Rectangle2D tileExtent = extent; |
426 | 386 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/cacheservices/VectorCacheService.java | ||
---|---|---|
28 | 28 |
import com.iver.cit.gvsig.fmap.rendering.IClassifiedVectorLegend; |
29 | 29 |
import com.iver.cit.gvsig.fmap.rendering.IVectorLegend; |
30 | 30 |
|
31 |
import es.upv.ai2.libjosg.Group;
|
|
32 |
import es.upv.ai2.libjosg.Node;
|
|
33 |
import es.upv.ai2.libjosg.Vec3;
|
|
34 |
import es.upv.ai2.libjosg.Vec4;
|
|
35 |
import es.upv.ai2.libjosg.features.PixelPoint;
|
|
36 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
37 |
import es.upv.ai2.libjosg.planets.PlanetViewer;
|
|
38 |
import es.upv.ai2.libjosg.viewer.IViewerContainer;
|
|
31 |
import es.upv.ai2.osgvp.Group;
|
|
32 |
import es.upv.ai2.osgvp.Node;
|
|
33 |
import es.upv.ai2.osgvp.Vec3;
|
|
34 |
import es.upv.ai2.osgvp.Vec4;
|
|
35 |
import es.upv.ai2.osgvp.features.PixelPoint;
|
|
36 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
37 |
import es.upv.ai2.osgvp.planets.PlanetViewer;
|
|
38 |
import es.upv.ai2.osgvp.viewer.IViewerContainer;
|
|
39 | 39 |
|
40 | 40 |
public class VectorCacheService extends CacheService { |
41 | 41 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/geometry3D/I3DGeometry.java | ||
---|---|---|
3 | 3 |
import com.iver.ai2.gvsig3d.simbology3D.symbol3D.I3DSymbol; |
4 | 4 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
5 | 5 |
|
6 |
import es.upv.ai2.libjosg.Group;
|
|
7 |
import es.upv.ai2.libjosg.Vec3;
|
|
6 |
import es.upv.ai2.osgvp.Group;
|
|
7 |
import es.upv.ai2.osgvp.Vec3;
|
|
8 | 8 |
|
9 | 9 |
public interface I3DGeometry { |
10 | 10 |
|
11 | 11 |
Group generateGeometry(I3DSymbol symbol3D); |
12 |
|
|
12 |
|
|
13 | 13 |
Vec3 getGeometryPosition(IGeometry geometry, double[] dataLine, |
14 |
float heigth,int contH); |
|
14 |
float heigth, int contH);
|
|
15 | 15 |
} |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/geometry3D/Point3DGeometry.java | ||
---|---|---|
8 | 8 |
import com.iver.ai2.gvsig3d.simbology3D.symbol3D.I3DSymbol; |
9 | 9 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
10 | 10 |
|
11 |
import es.upv.ai2.libjosg.Group;
|
|
12 |
import es.upv.ai2.libjosg.Node;
|
|
13 |
import es.upv.ai2.libjosg.Vec3;
|
|
11 |
import es.upv.ai2.osgvp.Group;
|
|
12 |
import es.upv.ai2.osgvp.Node;
|
|
13 |
import es.upv.ai2.osgvp.Vec3;
|
|
14 | 14 |
|
15 | 15 |
public class Point3DGeometry extends Abstract3DGeometry { |
16 | 16 |
|
17 |
protected Map<Double, List> pointsMap;
|
|
17 |
protected Map<Double, List> pointsMap; |
|
18 | 18 |
|
19 | 19 |
public Point3DGeometry(IGeometry geometry) { |
20 | 20 |
super(geometry); |
21 |
|
|
21 |
|
|
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
public Group generateGeometry(I3DSymbol symbol3D) { |
... | ... | |
30 | 30 |
|
31 | 31 |
this.setGeomType(getGeometry().getGeometryType()); |
32 | 32 |
// TRANSFORMANDO A GEOMETRIA CON VALOR Z |
33 |
|
|
34 | 33 |
|
35 | 34 |
// Getting the Iterator |
36 | 35 |
PathIterator theIteratorL = getGeometry().getPathIterator(null); |
... | ... | |
42 | 41 |
while (!theIteratorL.isDone()) { |
43 | 42 |
// System.out.println("ITERO"); |
44 | 43 |
int type = theIteratorL.currentSegment(dataLine); |
45 |
Vec3 position = getGeometryPosition(getGeometry(),dataLine,getHeigth(),contH); |
|
46 |
|
|
44 |
Vec3 position = getGeometryPosition(getGeometry(), dataLine, |
|
45 |
getHeigth(), contH); |
|
46 |
|
|
47 | 47 |
// Adding points |
48 | 48 |
switch (type) { |
49 | 49 |
case PathIterator.SEG_MOVETO: |
50 | 50 |
// System.out.println("SEG_MOVETO"); |
51 |
// FeatureFactory.addPointToNode(node, pos, rgba, pointSize);
|
|
52 |
// posi.add(pos);
|
|
51 |
// FeatureFactory.addPointToNode(node, pos, rgba, pointSize);
|
|
52 |
// posi.add(pos);
|
|
53 | 53 |
// INSERT HERE THE CODE TO MAKE TETURED QUAD POINT |
54 |
List <Vec3> posit = new ArrayList<Vec3>();
|
|
54 |
List<Vec3> posit = new ArrayList<Vec3>(); |
|
55 | 55 |
posit.add(position); |
56 | 56 |
node = symbol3D.generateSymbol(posit); |
57 | 57 |
groupAux.addChild(node); |
58 |
// group.addChild(generateFeature(posit,new Vec4(1.0,0.0,0.0,1.0),sym)); |
|
59 |
// group.addChild(); |
|
60 |
// pointListAux.add(new Punto3D(pos, rgba, pointSize)); |
|
58 |
// group.addChild(generateFeature(posit,new |
|
59 |
// Vec4(1.0,0.0,0.0,1.0),sym)); |
|
60 |
// group.addChild(); |
|
61 |
// pointListAux.add(new Punto3D(pos, rgba, pointSize)); |
|
61 | 62 |
break; |
62 | 63 |
|
63 | 64 |
case PathIterator.SEG_LINETO: |
... | ... | |
80 | 81 |
contH++; |
81 | 82 |
theIteratorL.next(); |
82 | 83 |
} |
83 |
return groupAux;
|
|
84 |
return groupAux; |
|
84 | 85 |
|
85 | 86 |
} |
86 | 87 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/geometry3D/Abstract3DGeometry.java | ||
---|---|---|
9 | 9 |
import com.iver.cit.gvsig.fmap.core.FShape; |
10 | 10 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
11 | 11 |
|
12 |
import es.upv.ai2.libjosg.Group;
|
|
13 |
import es.upv.ai2.libjosg.Node;
|
|
14 |
import es.upv.ai2.libjosg.Vec3;
|
|
15 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
12 |
import es.upv.ai2.osgvp.Group;
|
|
13 |
import es.upv.ai2.osgvp.Node;
|
|
14 |
import es.upv.ai2.osgvp.Vec3;
|
|
15 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
16 | 16 |
|
17 | 17 |
public abstract class Abstract3DGeometry implements I3DGeometry { |
18 | 18 |
|
... | ... | |
85 | 85 |
|
86 | 86 |
// Adding last symbol |
87 | 87 |
if (posi.size() > 0) { |
88 |
// if ((geomType & FShape.LINE) == FShape.LINE) {
|
|
89 |
// }
|
|
88 |
// if ((geomType & FShape.LINE) == FShape.LINE) {
|
|
89 |
// }
|
|
90 | 90 |
node = symbol3D.generateSymbol(posi); |
91 | 91 |
if (node != null) |
92 | 92 |
groupAux.addChild(node); |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/Line3DFeature.java | ||
---|---|---|
5 | 5 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
6 | 6 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
7 | 7 |
|
8 |
import es.upv.ai2.libjosg.Group;
|
|
9 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
8 |
import es.upv.ai2.osgvp.Group;
|
|
9 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
10 | 10 |
|
11 | 11 |
public class Line3DFeature extends AbstractFeature3D { |
12 |
|
|
12 |
|
|
13 | 13 |
private Line3DGeometry l3DGeometry; |
14 | 14 |
private SimpleLine3DSymbol l3DSymbol; |
15 | 15 |
|
16 | 16 |
public Line3DFeature(ISymbol symbol, IGeometry geometry) { |
17 | 17 |
super(symbol, geometry); |
18 | 18 |
l3DGeometry = new Line3DGeometry(geometry); |
19 |
// l3DGeometry = (Line3DGeometry) this.getGeometry();
|
|
20 |
// l3DSymbol = (SimpleLine3DSymbol) this.getSymbol();
|
|
19 |
// l3DGeometry = (Line3DGeometry) this.getGeometry();
|
|
20 |
// l3DSymbol = (SimpleLine3DSymbol) this.getSymbol();
|
|
21 | 21 |
l3DSymbol = new SimpleLine3DSymbol(symbol); |
22 | 22 |
} |
23 | 23 |
|
... | ... | |
27 | 27 |
} |
28 | 28 |
|
29 | 29 |
public void setPlanet(Planet planet) { |
30 |
if (this.l3DGeometry != null){ |
|
30 |
if (this.l3DGeometry != null) {
|
|
31 | 31 |
this.l3DGeometry.setPlanet(planet); |
32 | 32 |
} |
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
public void setHeigth(float heigth) { |
36 |
if (this.l3DGeometry != null){ |
|
36 |
if (this.l3DGeometry != null) {
|
|
37 | 37 |
this.l3DGeometry.setHeigth(heigth); |
38 | 38 |
} |
39 | 39 |
} |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/Polygon3DFeature.java | ||
---|---|---|
5 | 5 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
6 | 6 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
7 | 7 |
|
8 |
import es.upv.ai2.libjosg.Group;
|
|
9 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
8 |
import es.upv.ai2.osgvp.Group;
|
|
9 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
10 | 10 |
|
11 | 11 |
public class Polygon3DFeature extends AbstractFeature3D { |
12 | 12 |
|
13 | 13 |
Polygon3DGeometry p3DGeometry; |
14 | 14 |
SimplePolygon3DSymbol pp3DSymbol; |
15 |
|
|
15 | 16 |
public Polygon3DFeature(ISymbol symbol, IGeometry geometry) { |
16 | 17 |
super(symbol, geometry); |
17 | 18 |
// TODO Auto-generated constructor stub |
18 |
// p3DGeometry = (Polygon3DGeometry) this.getGeometry();
|
|
19 |
// pp3DSymbol = (SimplePolygon3DSymbol) this.getSymbol();
|
|
20 |
p3DGeometry = new Polygon3DGeometry(geometry);
|
|
19 |
// p3DGeometry = (Polygon3DGeometry) this.getGeometry();
|
|
20 |
// pp3DSymbol = (SimplePolygon3DSymbol) this.getSymbol();
|
|
21 |
p3DGeometry = new Polygon3DGeometry(geometry); |
|
21 | 22 |
pp3DSymbol = new SimplePolygon3DSymbol(symbol); |
22 | 23 |
} |
23 | 24 |
|
24 | 25 |
public Group Draw(Group group) { |
25 | 26 |
// TODO Auto-generated method stub |
26 |
group.addChild(p3DGeometry.generateGeometry(pp3DSymbol));
|
|
27 |
group.addChild(p3DGeometry.generateGeometry(pp3DSymbol)); |
|
27 | 28 |
return group; |
28 | 29 |
} |
29 | 30 |
|
30 | 31 |
public void setPlanet(Planet planet) { |
31 |
if (this.p3DGeometry != null){ |
|
32 |
if (this.p3DGeometry != null) {
|
|
32 | 33 |
this.p3DGeometry.setPlanet(planet); |
33 | 34 |
} |
34 | 35 |
} |
35 | 36 |
|
36 | 37 |
public void setHeigth(float heigth) { |
37 |
if (this.p3DGeometry != null){ |
|
38 |
if (this.p3DGeometry != null) {
|
|
38 | 39 |
this.p3DGeometry.setHeigth(heigth); |
39 | 40 |
} |
40 | 41 |
} |
41 | 42 |
|
42 |
|
|
43 |
|
|
44 |
|
|
45 | 43 |
} |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/I3DFeature.java | ||
---|---|---|
1 | 1 |
package com.iver.ai2.gvsig3d.simbology3D; |
2 | 2 |
|
3 |
import es.upv.ai2.libjosg.Group;
|
|
3 |
import es.upv.ai2.osgvp.Group;
|
|
4 | 4 |
|
5 | 5 |
public interface I3DFeature { |
6 | 6 |
|
7 | 7 |
/** |
8 | 8 |
* This method build this feature into a group node |
9 | 9 |
* |
10 |
* @param group the group to add the feature |
|
10 |
* @param group |
|
11 |
* the group to add the feature |
|
11 | 12 |
* @return the group with the feature |
12 | 13 |
*/ |
13 | 14 |
Group Draw(Group group); |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/Point3DFeature.java | ||
---|---|---|
6 | 6 |
import com.iver.ai2.gvsig3d.simbology3D.symbol3D.point.MultiLayerPoint3DSymbol; |
7 | 7 |
import com.iver.ai2.gvsig3d.simbology3D.symbol3D.point.PicturePoint3DSymbol; |
8 | 8 |
import com.iver.ai2.gvsig3d.simbology3D.symbol3D.point.SimplePoint3DSymbol; |
9 |
import com.iver.ai2.gvsig3d.simbology3D.symbol3D.polygon.SimplePolygon3DSymbol; |
|
10 | 9 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
11 | 10 |
import com.iver.cit.gvsig.fmap.core.symbols.CharacterMarkerSymbol; |
12 | 11 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
... | ... | |
14 | 13 |
import com.iver.cit.gvsig.fmap.core.symbols.PictureMarkerSymbol; |
15 | 14 |
import com.iver.cit.gvsig.fmap.core.symbols.SimpleMarkerSymbol; |
16 | 15 |
|
17 |
import es.upv.ai2.libjosg.Group;
|
|
18 |
import es.upv.ai2.libjosg.planets.Planet;
|
|
16 |
import es.upv.ai2.osgvp.Group;
|
|
17 |
import es.upv.ai2.osgvp.planets.Planet;
|
|
19 | 18 |
|
20 | 19 |
public class Point3DFeature extends AbstractFeature3D { |
21 | 20 |
|
22 |
|
|
23 |
|
|
24 | 21 |
private Point3DGeometry p3DGeometry; |
25 | 22 |
private I3DSymbol p3DSymbol; |
26 | 23 |
|
27 | 24 |
public Point3DFeature(ISymbol symbol, IGeometry geometry) { |
28 | 25 |
super(symbol, geometry); |
29 |
|
|
30 |
p3DGeometry = new Point3DGeometry(geometry);
|
|
31 |
// p3DSymbol = new SimplePolygon3DSymbol(symbol);
|
|
26 |
|
|
27 |
p3DGeometry = new Point3DGeometry(geometry); |
|
28 |
// p3DSymbol = new SimplePolygon3DSymbol(symbol);
|
|
32 | 29 |
if (this.getSymbol().getClass().equals(SimpleMarkerSymbol.class)) { |
33 |
|
|
30 |
|
|
34 | 31 |
p3DSymbol = new SimplePoint3DSymbol(symbol); |
35 | 32 |
System.err.println("Simbolo tipo PUNTO SIMPLE"); |
36 |
|
|
37 |
} else if (this.getSymbol().getClass().equals(
|
|
38 |
PictureMarkerSymbol.class)) { |
|
39 |
|
|
33 |
|
|
34 |
} else if (this.getSymbol().getClass() |
|
35 |
.equals(PictureMarkerSymbol.class)) {
|
|
36 |
|
|
40 | 37 |
System.err.println("Simbolo tipo PUNTO IMAGEN"); |
41 | 38 |
p3DSymbol = new PicturePoint3DSymbol(symbol); |
42 |
|
|
39 |
|
|
43 | 40 |
} else if (this.getSymbol().getClass().equals( |
44 | 41 |
CharacterMarkerSymbol.class)) { |
45 | 42 |
System.err.println("Simbolo tipo PUNTO CARACTER"); |
... | ... | |
48 | 45 |
MultiLayerMarkerSymbol.class)) { |
49 | 46 |
System.err.println("Simbolo tipo PUNTO COMPUESTO"); |
50 | 47 |
p3DSymbol = new MultiLayerPoint3DSymbol(symbol); |
51 |
}
|
|
48 |
} |
|
52 | 49 |
} |
53 | 50 |
|
54 | 51 |
public Group Draw(Group group) { |
... | ... | |
57 | 54 |
} |
58 | 55 |
|
59 | 56 |
public void setPlanet(Planet planet) { |
60 |
if (this.p3DGeometry != null){ |
|
57 |
if (this.p3DGeometry != null) {
|
|
61 | 58 |
this.p3DGeometry.setPlanet(planet); |
62 | 59 |
} |
63 | 60 |
} |
64 | 61 |
|
65 | 62 |
public void setHeigth(float heigth) { |
66 |
if (this.p3DGeometry != null){ |
|
63 |
if (this.p3DGeometry != null) {
|
|
67 | 64 |
this.p3DGeometry.setHeigth(heigth); |
68 | 65 |
} |
69 | 66 |
} |
70 |
|
|
71 |
// public Group generateGeometry(Group group) { |
|
72 |
// Node node = null; |
|
73 |
// |
|
74 |
// if (geometry == null || symbol == null) |
|
75 |
// return null; |
|
76 |
// |
|
77 |
// geomType = geometry.getGeometryType(); |
|
78 |
// |
|
79 |
// |
|
80 |
//// Setup point hash map |
|
81 |
// List pointListAux = null; |
|
82 |
// if (pointsMap==null) |
|
83 |
// pointsMap = new HashMap<Double, List>(); |
|
84 |
// if ((geomType & FShape.POINT) == FShape.POINT) { |
|
85 |
// if (pointsMap.containsKey(new Integer(pointSize))) { |
|
86 |
// // System.out.println("ya contiene esa key"); |
|
87 |
// pointListAux = (List) pointsMap.get(new Double(pointSize)); |
|
88 |
// } else { |
|
89 |
// pointListAux = new ArrayList(); |
|
90 |
// pointsMap.put(new Double(pointSize), pointListAux); |
|
91 |
// } |
|
92 |
// |
|
93 |
// } |
|
94 |
// |
|
95 |
// |
|
96 |
// // Getting the Iterator |
|
97 |
// PathIterator theIteratorL = geometry.getPathIterator(null); |
|
98 |
// |
|
99 |
// double[] dataLine = new double[6]; |
|
100 |
// List<Vec3> posi = new ArrayList<Vec3>(); |
|
101 |
// int contH = 0; |
|
102 |
// // System.out.println("ENTRO"); |
|
103 |
// while (!theIteratorL.isDone()) { |
|
104 |
// // System.out.println("ITERO"); |
|
105 |
// int type = theIteratorL.currentSegment(dataLine); |
|
106 |
// |
|
107 |
// Vec3 position = getGeometryPosition(geometry,dataLine,heigth,contH); |
|
108 |
// // Adding points |
|
109 |
// switch (type) { |
|
110 |
// case PathIterator.SEG_MOVETO: |
|
111 |
// // System.out.println("SEG_MOVETO"); |
|
112 |
//// FeatureFactory.addPointToNode(node, pos, rgba, pointSize); |
|
113 |
//// posi.add(position); |
|
114 |
// pointListAux.add(new Punto3D(position, rgba, pointSize)); |
|
115 |
// break; |
|
116 |
// |
|
117 |
// case PathIterator.SEG_LINETO: |
|
118 |
// // System.out.println("SEG_LINETO"); |
|
119 |
// posi.add(position); |
|
120 |
// break; |
|
121 |
// |
|
122 |
// case PathIterator.SEG_QUADTO: |
|
123 |
// // System.out.println("SEG_QUADTO"); |
|
124 |
// break; |
|
125 |
// |
|
126 |
// case PathIterator.SEG_CUBICTO: |
|
127 |
// // System.out.println("SEG_CUBICTO"); |
|
128 |
// break; |
|
129 |
// |
|
130 |
// case PathIterator.SEG_CLOSE: |
|
131 |
// // System.out.println("SEG_CLOSE"); |
|
132 |
// break; |
|
133 |
// } |
|
134 |
// contH++; |
|
135 |
// theIteratorL.next(); |
|
136 |
// } |
|
137 |
// // System.out.println("Numero de puntos: " + contH); |
|
138 |
// |
|
139 |
// // Adding last symbol |
|
140 |
//// System.err.println("tama?o de posi " + posi.size()); |
|
141 |
//// node = FeatureFactory.insertPoints(posi, rgba, pointSize); |
|
142 |
//// group.addChild(node); |
|
143 |
//// posi.clear(); |
|
144 |
// return group; |
|
145 |
// return null; |
|
146 |
// } |
|
147 | 67 |
|
68 |
// public Group generateGeometry(Group group) { |
|
69 |
// Node node = null; |
|
70 |
// |
|
71 |
// if (geometry == null || symbol == null) |
|
72 |
// return null; |
|
73 |
// |
|
74 |
// geomType = geometry.getGeometryType(); |
|
75 |
// |
|
76 |
// |
|
77 |
// // Setup point hash map |
|
78 |
// List pointListAux = null; |
|
79 |
// if (pointsMap==null) |
|
80 |
// pointsMap = new HashMap<Double, List>(); |
|
81 |
// if ((geomType & FShape.POINT) == FShape.POINT) { |
|
82 |
// if (pointsMap.containsKey(new Integer(pointSize))) { |
|
83 |
// // System.out.println("ya contiene esa key"); |
|
84 |
// pointListAux = (List) pointsMap.get(new Double(pointSize)); |
|
85 |
// } else { |
|
86 |
// pointListAux = new ArrayList(); |
|
87 |
// pointsMap.put(new Double(pointSize), pointListAux); |
|
88 |
// } |
|
89 |
// |
|
90 |
// } |
|
91 |
// |
|
92 |
// |
|
93 |
// // Getting the Iterator |
|
94 |
// PathIterator theIteratorL = geometry.getPathIterator(null); |
|
95 |
// |
|
96 |
// double[] dataLine = new double[6]; |
|
97 |
// List<Vec3> posi = new ArrayList<Vec3>(); |
|
98 |
// int contH = 0; |
|
99 |
// // System.out.println("ENTRO"); |
|
100 |
// while (!theIteratorL.isDone()) { |
|
101 |
// // System.out.println("ITERO"); |
|
102 |
// int type = theIteratorL.currentSegment(dataLine); |
|
103 |
// |
|
104 |
// Vec3 position = getGeometryPosition(geometry,dataLine,heigth,contH); |
|
105 |
// // Adding points |
|
106 |
// switch (type) { |
|
107 |
// case PathIterator.SEG_MOVETO: |
|
108 |
// // System.out.println("SEG_MOVETO"); |
|
109 |
// // FeatureFactory.addPointToNode(node, pos, rgba, pointSize); |
|
110 |
// // posi.add(position); |
|
111 |
// pointListAux.add(new Punto3D(position, rgba, pointSize)); |
|
112 |
// break; |
|
113 |
// |
|
114 |
// case PathIterator.SEG_LINETO: |
|
115 |
// // System.out.println("SEG_LINETO"); |
|
116 |
// posi.add(position); |
|
117 |
// break; |
|
118 |
// |
|
119 |
// case PathIterator.SEG_QUADTO: |
|
120 |
// // System.out.println("SEG_QUADTO"); |
|
121 |
// break; |
|
122 |
// |
|
123 |
// case PathIterator.SEG_CUBICTO: |
|
124 |
// // System.out.println("SEG_CUBICTO"); |
|
125 |
// break; |
|
126 |
// |
|
127 |
// case PathIterator.SEG_CLOSE: |
|
128 |
// // System.out.println("SEG_CLOSE"); |
|
129 |
// break; |
|
130 |
// } |
|
131 |
// contH++; |
|
132 |
// theIteratorL.next(); |
|
133 |
// } |
|
134 |
// // System.out.println("Numero de puntos: " + contH); |
|
135 |
// |
|
136 |
// // Adding last symbol |
|
137 |
// // System.err.println("tama?o de posi " + posi.size()); |
|
138 |
// // node = FeatureFactory.insertPoints(posi, rgba, pointSize); |
|
139 |
// // group.addChild(node); |
|
140 |
// // posi.clear(); |
|
141 |
// return group; |
|
142 |
// return null; |
|
143 |
// } |
|
144 |
|
|
148 | 145 |
} |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/symbol3D/point/CharacterPoint3DSymbol.java | ||
---|---|---|
16 | 16 |
import com.iver.ai2.gvsig3d.simbology3D.symbol3D.Abstract3DSymbol; |
17 | 17 |
import com.iver.cit.gvsig.fmap.core.symbols.CharacterMarkerSymbol; |
18 | 18 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
19 |
import com.iver.cit.gvsig.fmap.core.symbols.MultiLayerMarkerSymbol; |
|
20 | 19 |
import com.sun.media.jai.codec.ImageCodec; |
21 | 20 |
import com.sun.media.jai.codec.ImageEncoder; |
22 | 21 |
import com.sun.media.jai.codec.PNGEncodeParam; |
23 | 22 |
import com.sun.media.jai.codec.TIFFEncodeParam; |
24 | 23 |
|
25 |
import es.upv.ai2.libjosg.Node;
|
|
26 |
import es.upv.ai2.libjosg.Vec3;
|
|
27 |
import es.upv.ai2.libjosg.Vec4;
|
|
24 |
import es.upv.ai2.osgvp.Node;
|
|
25 |
import es.upv.ai2.osgvp.Vec3;
|
|
26 |
import es.upv.ai2.osgvp.Vec4;
|
|
28 | 27 |
|
29 | 28 |
public class CharacterPoint3DSymbol extends Abstract3DSymbol{ |
30 | 29 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/symbol3D/point/MultiLayerPoint3DSymbol.java | ||
---|---|---|
21 | 21 |
import com.sun.media.jai.codec.PNGEncodeParam; |
22 | 22 |
import com.sun.media.jai.codec.TIFFEncodeParam; |
23 | 23 |
|
24 |
import es.upv.ai2.libjosg.Node;
|
|
25 |
import es.upv.ai2.libjosg.Vec3;
|
|
26 |
import es.upv.ai2.libjosg.Vec4;
|
|
24 |
import es.upv.ai2.osgvp.Node;
|
|
25 |
import es.upv.ai2.osgvp.Vec3;
|
|
26 |
import es.upv.ai2.osgvp.Vec4;
|
|
27 | 27 |
|
28 | 28 |
public class MultiLayerPoint3DSymbol extends Abstract3DSymbol{ |
29 | 29 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/symbol3D/point/SimplePoint3DSymbol.java | ||
---|---|---|
6 | 6 |
import com.iver.ai2.gvsig3d.simbology3D.symbol3D.Abstract3DSymbol; |
7 | 7 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
8 | 8 |
|
9 |
import es.upv.ai2.libjosg.Node;
|
|
10 |
import es.upv.ai2.libjosg.Vec3;
|
|
11 |
import es.upv.ai2.libjosg.Vec4;
|
|
9 |
import es.upv.ai2.osgvp.Node;
|
|
10 |
import es.upv.ai2.osgvp.Vec3;
|
|
11 |
import es.upv.ai2.osgvp.Vec4;
|
|
12 | 12 |
|
13 | 13 |
public class SimplePoint3DSymbol extends Abstract3DSymbol { |
14 | 14 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/symbol3D/point/PicturePoint3DSymbol.java | ||
---|---|---|
7 | 7 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
8 | 8 |
import com.iver.cit.gvsig.fmap.core.symbols.PictureMarkerSymbol; |
9 | 9 |
|
10 |
import es.upv.ai2.libjosg.Node;
|
|
11 |
import es.upv.ai2.libjosg.Vec3;
|
|
12 |
import es.upv.ai2.libjosg.Vec4;
|
|
10 |
import es.upv.ai2.osgvp.Node;
|
|
11 |
import es.upv.ai2.osgvp.Vec3;
|
|
12 |
import es.upv.ai2.osgvp.Vec4;
|
|
13 | 13 |
|
14 | 14 |
public class PicturePoint3DSymbol extends Abstract3DSymbol{ |
15 | 15 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/symbol3D/polyline/SimpleLine3DSymbol.java | ||
---|---|---|
8 | 8 |
import com.iver.cit.gvsig.fmap.core.symbols.ILineSymbol; |
9 | 9 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
10 | 10 |
|
11 |
import es.upv.ai2.libjosg.Node;
|
|
12 |
import es.upv.ai2.libjosg.Vec3;
|
|
13 |
import es.upv.ai2.libjosg.Vec4;
|
|
11 |
import es.upv.ai2.osgvp.Node;
|
|
12 |
import es.upv.ai2.osgvp.Vec3;
|
|
13 |
import es.upv.ai2.osgvp.Vec4;
|
|
14 | 14 |
|
15 | 15 |
public class SimpleLine3DSymbol extends Abstract3DSymbol { |
16 | 16 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/symbol3D/Abstract3DSymbol.java | ||
---|---|---|
5 | 5 |
|
6 | 6 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
7 | 7 |
|
8 |
import es.upv.ai2.libjosg.Node;
|
|
9 |
import es.upv.ai2.libjosg.Vec3;
|
|
8 |
import es.upv.ai2.osgvp.Node;
|
|
9 |
import es.upv.ai2.osgvp.Vec3;
|
|
10 | 10 |
|
11 | 11 |
public abstract class Abstract3DSymbol implements I3DSymbol { |
12 |
|
|
12 |
|
|
13 | 13 |
ISymbol symbol = null; |
14 | 14 |
|
15 | 15 |
public Abstract3DSymbol(ISymbol symbol) { |
... | ... | |
17 | 17 |
this.symbol = symbol; |
18 | 18 |
} |
19 | 19 |
|
20 |
public abstract Node generateSymbol(List<Vec3> position) ;
|
|
20 |
public abstract Node generateSymbol(List<Vec3> position); |
|
21 | 21 |
|
22 | 22 |
public Node generateSymbol(Vec3[] position) { |
23 | 23 |
// TODO Auto-generated method stub |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/symbol3D/I3DSymbol.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.List; |
4 | 4 |
|
5 |
import es.upv.ai2.libjosg.Node;
|
|
6 |
import es.upv.ai2.libjosg.Vec3;
|
|
5 |
import es.upv.ai2.osgvp.Node;
|
|
6 |
import es.upv.ai2.osgvp.Vec3;
|
|
7 | 7 |
|
8 | 8 |
|
9 | 9 |
public interface I3DSymbol { |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/simbology3D/symbol3D/polygon/SimplePolygon3DSymbol.java | ||
---|---|---|
8 | 8 |
import com.iver.cit.gvsig.fmap.core.symbols.IFillSymbol; |
9 | 9 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
10 | 10 |
|
11 |
import es.upv.ai2.libjosg.Node;
|
|
12 |
import es.upv.ai2.libjosg.Vec3;
|
|
13 |
import es.upv.ai2.libjosg.Vec4;
|
|
11 |
import es.upv.ai2.osgvp.Node;
|
|
12 |
import es.upv.ai2.osgvp.Vec3;
|
|
13 |
import es.upv.ai2.osgvp.Vec4;
|
|
14 | 14 |
|
15 | 15 |
public class SimplePolygon3DSymbol extends Abstract3DSymbol { |
16 | 16 |
|
... | ... | |
19 | 19 |
public SimplePolygon3DSymbol(ISymbol symbol) { |
20 | 20 |
super(symbol); |
21 | 21 |
IFillSymbol fillSymbol = (IFillSymbol) symbol; |
22 |
|
|
22 |
|
|
23 | 23 |
// Getting symbol properties |
24 |
|
|
24 |
|
|
25 | 25 |
// Symbol color and alpha value |
26 | 26 |
Color color = fillSymbol.getFillColor(); |
27 | 27 |
float alpha = fillSymbol.getFillAlpha() / 255f; |
... | ... | |
32 | 32 |
@Override |
33 | 33 |
public Node generateSymbol(List<Vec3> position) { |
34 | 34 |
// TODO Auto-generated method stub |
35 |
return FeatureFactory.insertPolygon(position, rgba,null); |
|
35 |
return FeatureFactory.insertPolygon(position, rgba, null);
|
|
36 | 36 |
} |
37 | 37 |
|
38 | 38 |
} |
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/navigation/NavigationMode.java | ||
---|---|---|
4 | 4 |
import java.util.Iterator; |
5 | 5 |
import java.util.List; |
6 | 6 |
|
7 |
import es.upv.ai2.libjosg.planets.CustomTerrainManipulator;
|
|
7 |
import es.upv.ai2.osgvp.planets.CustomTerrainManipulator;
|
|
8 | 8 |
|
9 | 9 |
public class NavigationMode { |
10 | 10 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/utils/Punto3D.java | ||
---|---|---|
1 | 1 |
package com.iver.ai2.gvsig3d.utils; |
2 | 2 |
|
3 |
import es.upv.ai2.libjosg.Vec3;
|
|
4 |
import es.upv.ai2.libjosg.Vec4;
|
|
3 |
import es.upv.ai2.osgvp.Vec3;
|
|
4 |
import es.upv.ai2.osgvp.Vec4;
|
|
5 | 5 |
|
6 | 6 |
public class Punto3D { |
7 | 7 |
|
trunk/libraries/lib3DMap/src/com/iver/ai2/gvsig3d/utils/UtilCoord.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.awt.geom.Rectangle2D; |
4 | 4 |
|
5 |
import es.upv.ai2.libjosg.Vec3; |
|
6 |
import es.upv.ai2.libjosg.planets.Planet; |
|
7 |
import es.upv.ai2.libjosg.viewer.Camera; |
|
5 |
import es.upv.ai2.osgvp.Vec3; |
|
6 |
import es.upv.ai2.osgvp.viewer.Camera; |
|
8 | 7 |
|
9 | 8 |
public class UtilCoord { |
10 | 9 |
static String mensaje; |
11 | 10 |
Also available in: Unified diff