Statistics
| Revision:

gvsig-3d / 2.0 / trunk / org.gvsig.gvsig3d / org.gvsig.gvsig3d.lib / org.gvsig.gvsig3d.lib.impl / src / main / java / org / gvsig / gvsig3d / impl / map3d / Viewport3DImpl.java @ 257

History | View | Annotate | Download (2.49 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.gvsig3d.impl.map3d;
23

    
24
import java.awt.Color;
25
import java.awt.geom.Point2D;
26
import java.awt.geom.Rectangle2D;
27

    
28
import org.cresques.cts.IProjection;
29
import org.gvsig.fmap.geom.GeometryLocator;
30
import org.gvsig.fmap.geom.GeometryManager;
31
import org.gvsig.fmap.geom.Geometry.SUBTYPES;
32
import org.gvsig.fmap.geom.exception.CreateEnvelopeException;
33
import org.gvsig.fmap.geom.primitive.Envelope;
34
import org.gvsig.fmap.mapcontext.ViewPort;
35
import org.gvsig.gvsig3d.map3d.ViewPort3D;
36
import org.gvsig.osgvp.core.osg.Matrix;
37
import org.gvsig.osgvp.core.osg.Vec3;
38
import org.gvsig.osgvp.terrain.Terrain;
39
import org.gvsig.osgvp.viewer.IViewerContainer;
40

    
41

    
42
/**
43
 * @author gvSIG Team
44
 * @version $Id$
45
 *
46
 */
47
public class Viewport3DImpl extends ViewPort3D {
48
        
49
        private Terrain _terrain;
50
    private IViewerContainer _canvas3d;
51
    private boolean _dirty = false;
52
    
53
    private static final GeometryManager geomManager =
54
        GeometryLocator.getGeometryManager();
55

    
56
    public Viewport3DImpl(){
57
            
58
            super();
59
    }
60
    
61
        public Viewport3DImpl(IProjection proj) {
62
                super(proj);
63
                setBackColor(Color.WHITE);
64
                // TODO Auto-generated constructor stub
65
        }
66
    
67
    public boolean getDirty() {
68
        return _dirty;
69
    }
70

    
71
    public Terrain getTerrain() {
72
        return _terrain;
73
    }
74

    
75
    public void setDirty(boolean isDirty) {
76
        _dirty = isDirty;
77

    
78
    }
79

    
80
    public void setEnvelope(Rectangle2D r) {
81
        extent = r;
82

    
83
        _dirty = true;
84

    
85
    }
86

    
87
    public void setTerrain(Terrain terrain) {
88
        _terrain = terrain;
89

    
90
    }
91

    
92
    public void setViewer(IViewerContainer canvas) {
93
        _canvas3d = canvas;
94

    
95
    }
96

    
97
}