Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / impl / Envelope3D.java @ 34118

History | View | Annotate | Download (2.36 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

    
23
/*
24
* AUTHORS (In addition to CIT):
25
* 2009 {Iver T.I.}   {Task}
26
*/
27
 
28
package org.gvsig.fmap.geom.primitive.impl;
29

    
30
import org.cresques.cts.ICoordTrans;
31
import org.gvsig.fmap.geom.primitive.Envelope;
32
import org.gvsig.fmap.geom.primitive.Point;
33
import org.gvsig.tools.ToolsLocator;
34
import org.gvsig.tools.dynobject.DynStruct;
35
import org.gvsig.tools.persistence.PersistenceManager;
36

    
37
/**
38
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
39
 */
40
public class Envelope3D extends DefaultEnvelope{
41
        public static final String PERSISTENCE_DEFINITION_NAME = "Envelope3Dimensions";
42
        
43
        public Envelope3D() {
44
                super();
45
                min = new Point2DZ(0, 0, 0);
46
                max = new Point2DZ(0, 0, 0);
47
        }
48

    
49
        public Envelope3D(Point min, Point max) {
50
                super(min, max);
51
        }
52
        
53
        /* (non-Javadoc)
54
         * @see org.gvsig.fmap.geom.primitive.Envelope#getDimension()
55
         */
56
        public int getDimension() {
57
                return 3;
58
        }
59
        
60
        /*
61
         * (non-Javadoc)
62
         * @see org.gvsig.fmap.geom.primitive.Envelope#convert(org.cresques.cts.ICoordTrans)
63
         */
64
        public Envelope convert(ICoordTrans trans) {
65
                return null;
66
        }
67
        
68
        public static void registerPersistent() {
69
                PersistenceManager manager = ToolsLocator.getPersistenceManager();
70
                if( manager.getDefinition(PERSISTENCE_DEFINITION_NAME)==null ) {
71
                        DynStruct definition = manager.addDefinition(
72
                                        Envelope3D.class,
73
                                        PERSISTENCE_DEFINITION_NAME,
74
                                        "Envelope3D persistence definition",
75
                                        null, 
76
                                        null
77
                        ); 
78
                        
79
                        definition.extend(manager.getDefinition(DefaultEnvelope.PERSISTENCE_DEFINITION_NAME));        
80
                }
81
        }
82

    
83
}
84