Revision 15255
import/ext3D/trunk/ext3D/src/com/iver/ai2/gvsig3d/ProjectView3D.java | ||
---|---|---|
56 | 56 |
import com.iver.ai2.gvsig3d.gui.ViewProperties3D; |
57 | 57 |
import com.iver.ai2.gvsig3d.listener.canvasListener; |
58 | 58 |
import com.iver.ai2.gvsig3d.map3d.MapContext3D; |
59 |
import com.iver.ai2.gvsig3d.map3d.layers.FLayers3D; |
|
60 |
import com.iver.ai2.gvsig3d.map3d.layers.Layer3DProps; |
|
59 | 61 |
import com.iver.andami.PluginServices; |
60 | 62 |
import com.iver.andami.ui.mdiManager.IWindow; |
61 | 63 |
import com.iver.cit.gvsig.fmap.DriverException; |
... | ... | |
63 | 65 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
64 | 66 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
65 | 67 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
68 |
import com.iver.cit.gvsig.fmap.layers.SingleLayerIterator; |
|
66 | 69 |
import com.iver.cit.gvsig.fmap.layers.XMLException; |
67 | 70 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.AlphanumericData; |
68 | 71 |
import com.iver.cit.gvsig.project.Project; |
... | ... | |
111 | 114 |
|
112 | 115 |
private View3D m_view = null; |
113 | 116 |
|
114 |
|
|
115 | 117 |
// private Satelite runnable; |
116 | 118 |
|
117 | 119 |
public ProjectView3D() { |
... | ... | |
251 | 253 |
// 3D properties |
252 | 254 |
m_planetType = xml.getIntProperty("planetType"); |
253 | 255 |
verticalExaggeration = xml.getFloatProperty("verticalExaggeration"); |
256 |
setVerticalEx(verticalExaggeration); |
|
254 | 257 |
backgroundColor = StringUtilities.string2Color((xml |
255 | 258 |
.getStringProperty("backgroundColor"))); |
256 | 259 |
|
... | ... | |
274 | 277 |
} |
275 | 278 |
|
276 | 279 |
public IWindow createWindow() { |
277 |
|
|
280 |
|
|
278 | 281 |
// View allready exits. Return it. |
279 | 282 |
if (m_view != null) |
280 | 283 |
return m_view; |
281 |
|
|
284 |
|
|
282 | 285 |
// create libJOSG objects |
283 | 286 |
if (m_canvas3d == null) { |
284 | 287 |
// AI2 objects |
... | ... | |
323 | 326 |
double radiusEarth = m_planet.getRadiusEquatorial(); |
324 | 327 |
g = new VectorTest(radiusEarth, m_planet); |
325 | 328 |
|
326 |
|
|
327 |
|
|
328 | 329 |
// g.setNodeName("VECTOR"); |
329 | 330 |
// Group root = new Group(); |
330 | 331 |
|
... | ... | |
633 | 634 |
this.m_canvas3d = m_canvas3d; |
634 | 635 |
} |
635 | 636 |
|
636 |
|
|
637 |
private void setVerticalEx(float exa) { |
|
638 |
|
|
639 |
SingleLayerIterator lyrIterator = new SingleLayerIterator( |
|
640 |
(FLayers3D) getMapContext().getLayers()); |
|
641 |
while (lyrIterator.hasNext()) { |
|
642 |
FLayer lyr = lyrIterator.next(); |
|
643 |
|
|
644 |
Layer3DProps props = Layer3DProps.getLayer3DProps(lyr); |
|
645 |
int type = props.getType(); |
|
646 |
if (exa != props.getVerticalEx()) { |
|
647 |
if (type == Layer3DProps.layer3DElevation) { |
|
648 |
int order = props.getOrder(); |
|
649 |
props.setVerticalEx(exa); |
|
650 |
m_planet.setVerticalExaggerationLayer(order, |
|
651 |
props.getVerticalEx()); |
|
652 |
} else if (type == Layer3DProps.layer3DVector) { |
|
653 |
int order = props.getOrder(); |
|
654 |
props.setVerticalEx(exa); |
|
655 |
} |
|
656 |
} |
|
657 |
|
|
658 |
} |
|
659 |
} |
|
660 |
|
|
637 | 661 |
} |
Also available in: Unified diff