Revision 15279
import/ext3D/trunk/ext3D/src/com/iver/ai2/gvsig3d/ProjectView3D.java | ||
---|---|---|
134 | 134 |
// xml.putProperty("nameClass", this.getClass().getName()); |
135 | 135 |
try { |
136 | 136 |
// Persistiendo la posicion actual de la camara |
137 |
projectCamera = new ProjectCamera();
|
|
138 |
projectCamera.setDescription("Camera");
|
|
139 |
if (m_canvas3d !=null){
|
|
137 |
if (m_canvas3d != null) {
|
|
138 |
projectCamera = new ProjectCamera();
|
|
139 |
projectCamera.setDescription("Camera");
|
|
140 | 140 |
projectCamera.setCamera(m_canvas3d.getOSGViewer().getCamera()); |
141 |
|
|
141 |
|
|
142 | 142 |
xml.addChild(projectCamera.getXMLEntity()); |
143 | 143 |
} |
144 | 144 |
|
... | ... | |
256 | 256 |
// 3D properties |
257 | 257 |
m_planetType = xml.getIntProperty("planetType"); |
258 | 258 |
verticalExaggeration = xml.getFloatProperty("verticalExaggeration"); |
259 |
|
|
259 |
|
|
260 | 260 |
backgroundColor = StringUtilities.string2Color((xml |
261 | 261 |
.getStringProperty("backgroundColor"))); |
262 | 262 |
|
... | ... | |
396 | 396 |
.setMinCameraDistance(10); |
397 | 397 |
m_canvas3d.getOSGViewer().getCustomTerrainManipulator() |
398 | 398 |
.setMaxCameraDistance(5000000 * 10); |
399 |
m_planet.setSubdivisionFactor((float) 0.45);
|
|
399 |
m_planet.setSubdivisionFactor((float) 0.45); |
|
400 | 400 |
} else { |
401 | 401 |
cam.setViewByLookAt(m_planet.getRadiusEquatorial() * 3.0, |
402 | 402 |
0, 0, 0, 0, 0, 0, 0, 1); |
... | ... | |
407 | 407 |
m_planet.getRadiusEquatorial() * 3.0); |
408 | 408 |
// cam.setViewByLookAt(100 * 2.0, |
409 | 409 |
// 0, 0, 0, 0, 0, 0, 0, 1); |
410 |
// m_planet.setSubdivisionFactor((float) 0.65);
|
|
410 |
// m_planet.setSubdivisionFactor((float) 0.65);
|
|
411 | 411 |
} |
412 | 412 |
|
413 | 413 |
} else { |
... | ... | |
431 | 431 |
m_canvas3d.getOSGViewer().setEnabledLighting(true); |
432 | 432 |
} |
433 | 433 |
m_view = new View3D(); |
434 |
|
|
434 |
|
|
435 | 435 |
m_view.setCanvas3d(m_canvas3d); |
436 |
|
|
436 |
|
|
437 | 437 |
m_view.setPlanet(m_planet); |
438 | 438 |
m_view.setModel(this); |
439 |
|
|
439 |
|
|
440 | 440 |
m_view.setNavMode(new NavigationMode(m_view)); |
441 |
|
|
442 |
((MapContext3D)getMapContext()).setVerticalEx(verticalExaggeration); |
|
441 |
|
|
442 |
((MapContext3D) getMapContext()).setVerticalEx(verticalExaggeration);
|
|
443 | 443 |
setVerticalEx(verticalExaggeration); |
444 | 444 |
|
445 | 445 |
return m_view; |
... | ... | |
659 | 659 |
if (type == Layer3DProps.layer3DElevation) { |
660 | 660 |
int order = props.getOrder(); |
661 | 661 |
props.setVerticalEx(exa); |
662 |
m_planet.setVerticalExaggerationLayer(order, |
|
663 |
props.getVerticalEx());
|
|
662 |
m_planet.setVerticalExaggerationLayer(order, props
|
|
663 |
.getVerticalEx()); |
|
664 | 664 |
} else if (type == Layer3DProps.layer3DVector) { |
665 | 665 |
int order = props.getOrder(); |
666 | 666 |
props.setVerticalEx(exa); |
Also available in: Unified diff