Revision 15491
import/ext3D/branches/ext3D_v1.1/ext3Dgui/src/com/iver/ai2/gvsig3dgui/navigation/NavigationMenu3D.java | ||
---|---|---|
135 | 135 |
// System.out.println("CAMBIANDO CAMARAAAAAAAAA!!!!!!!!!");s |
136 | 136 |
} else if (actionCommand.equals("ACTIVE")) { |
137 | 137 |
resetCursor = false; |
138 |
if (vista3D.getPlanet().getType() != PlanetType.PLANE_MODE) {
|
|
138 |
if (vista3D.getPlanet().getType() != PlanetType.PROJECTED) {
|
|
139 | 139 |
|
140 | 140 |
CustomTerrainManipulator ctm = ((PlanetViewer)vista3D.getCanvas3d() |
141 | 141 |
.getOSGViewer()).getCustomTerrainManipulator(); |
... | ... | |
321 | 321 |
View3D vista3D = (View3D) f; |
322 | 322 |
JToolBarButton b = (JToolBarButton) PluginServices.getMainFrame() |
323 | 323 |
.getComponentByName("NORTH"); |
324 |
if ((vista3D.getPlanet().getType() != PlanetType.SPHERICAL_MODE)
|
|
324 |
if ((vista3D.getPlanet().getType() != PlanetType.GEOCENTRIC)
|
|
325 | 325 |
&& (b != null)) { |
326 | 326 |
b.setEnabled(false); |
327 | 327 |
} |
import/ext3D/branches/ext3D_v1.1/ext3Dgui/src/com/iver/ai2/gvsig3dgui/ProjectView3D.java | ||
---|---|---|
78 | 78 |
|
79 | 79 |
private ProjectCamera projectCamera = null; |
80 | 80 |
|
81 |
private int m_planetType = PlanetType.SPHERICAL_MODE; // spheric or plane
|
|
81 |
private int m_planetType = PlanetType.GEOCENTRIC; // spheric or plane
|
|
82 | 82 |
|
83 | 83 |
private Color backgroundColor; |
84 | 84 |
|
... | ... | |
289 | 289 |
} |
290 | 290 |
m_planet = new Planet(); |
291 | 291 |
m_planet.setType(m_planetType); |
292 |
if (m_planetType == PlanetType.PLANE_MODE) {
|
|
292 |
if (m_planetType == PlanetType.PROJECTED) {
|
|
293 | 293 |
m_planet.setCSname("EPSG:23030"); |
294 | 294 |
double extent[] = new double[4]; |
295 | 295 |
extent[0] = CacheService.planeGlobalBounds.getMinX(); |
... | ... | |
382 | 382 |
cam = new Camera(); |
383 | 383 |
if (this.projectCamera == null) { |
384 | 384 |
|
385 |
if (m_planetType == PlanetType.PLANE_MODE) {
|
|
385 |
if (m_planetType == PlanetType.PROJECTED) {
|
|
386 | 386 |
Rectangle2D e = m_planet.getExtent(); |
387 | 387 |
// double difx = (e[1] - e[0]) / 2.0d; |
388 | 388 |
// double dify = (e[3] - e[2]) / 2.0d; |
import/ext3D/branches/ext3D_v1.1/ext3Dgui/src/com/iver/ai2/gvsig3dgui/view/View3D.java | ||
---|---|---|
97 | 97 |
IProjection projection = null; |
98 | 98 |
ViewPort vp = null; |
99 | 99 |
Rectangle2D extend; |
100 |
if (m_planet.getType() == PlanetType.SPHERICAL_MODE) {
|
|
100 |
if (m_planet.getType() == PlanetType.GEOCENTRIC) {
|
|
101 | 101 |
projection = CRSFactory.getCRS("EPSG:4326"); |
102 | 102 |
extend = new Rectangle2D.Double(-180.0, 90.0, 180.0, -90.0); |
103 | 103 |
} else { |
import/ext3D/branches/ext3D_v1.1/ext3Dgui/src/com/iver/ai2/gvsig3dgui/view/InsertPosition.java | ||
---|---|---|
261 | 261 |
flat.setName("flat"); |
262 | 262 |
flat.setLabel("Plana"); |
263 | 263 |
|
264 |
if (view3D.getPlanetType() == PlanetType.SPHERICAL_MODE)
|
|
264 |
if (view3D.getPlanetType() == PlanetType.GEOCENTRIC)
|
|
265 | 265 |
spherical.setSelected(true); |
266 | 266 |
else |
267 | 267 |
flat.setSelected(true); |
import/ext3D/branches/ext3D_v1.1/ext3Dgui/src/com/iver/ai2/gvsig3dgui/view/ViewProperties3D.java | ||
---|---|---|
269 | 269 |
// even if it is already selected; this method is not called |
270 | 270 |
// if the radio button was selected programmatically |
271 | 271 |
public void actionPerformed(ActionEvent evt) { |
272 |
view3D.setPlanetType(PlanetType.SPHERICAL_MODE);
|
|
272 |
view3D.setPlanetType(PlanetType.GEOCENTRIC);
|
|
273 | 273 |
} |
274 | 274 |
}; |
275 | 275 |
Action flatAction = new AbstractAction("flat") { |
276 | 276 |
// See above |
277 | 277 |
public void actionPerformed(ActionEvent evt) { |
278 |
view3D.setPlanetType(PlanetType.PLANE_MODE);
|
|
278 |
view3D.setPlanetType(PlanetType.PROJECTED);
|
|
279 | 279 |
} |
280 | 280 |
}; |
281 | 281 |
|
... | ... | |
289 | 289 |
flat.setName("flat"); |
290 | 290 |
flat.setLabel(PluginServices.getText(this, "Flat")); |
291 | 291 |
|
292 |
if (view3D.getPlanetType()== PlanetType.SPHERICAL_MODE)
|
|
292 |
if (view3D.getPlanetType()== PlanetType.GEOCENTRIC)
|
|
293 | 293 |
spherical.setSelected(true); |
294 | 294 |
else |
295 | 295 |
flat.setSelected(true); |
Also available in: Unified diff