Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_geometries / src / org / gvsig / fmap / geom / primitive / Surface.java @ 28990

History | View | Annotate | Download (3.88 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;
29

    
30
/**
31
 * <p>
32
 * This interface is equivalent to the GM_Surface specified in 
33
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
34
 * Surface is a subclass of {@link Primitive} and is the basis for 2-dimensional geometry. 
35
 * Unorientable surfaces such as the M?bius band are not allowed. 
36
 * <p/>
37
 * <p>
38
 * The orientation of a surface chooses an "up" direction through the choice of the upward normal, 
39
 * which, if the surface is not a cycle, is the side of the surface from which the exterior boundary 
40
 * appears counterclockwise. Reversal of the surface orientation reverses the curve orientation of 
41
 * each boundary component, and interchanges the conceptual "up" and "down" direction of the surface. 
42
 * </p>
43
 * <p>
44
 * If the surface is the boundary of a solid, the "up" direction is usually outward. 
45
 * For closed surfaces, which have no boundary, the up direction is that of the surface patches, 
46
 * which must be consistent with one another. 
47
 * </p>
48
 * @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
49
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
50
 */
51
public interface Surface extends OrientableSurface {
52
        
53
        /**
54
         * Sets all the coordinates of the surface.
55
         * @param generalPathX
56
         * The generalPath that contains all the coordinates.
57
         */        
58
        public void setGeneralPath(GeneralPathX generalPathX);
59
        
60
        /**
61
         * Gets the one of the values of a coordinate (direct position) 
62
         * in a concrete dimension. 
63
         * @param index
64
         * The index of the direct position to set.
65
         * @param dimension
66
         * The dimension of the direct position.
67
         * @return
68
         * The value of the coordinate
69
         */
70
        public double getCoordinateAt(int index, int dimension);
71
        
72
        /**
73
         * Sets the value of a coordinate (direct position) in a concrete dimension.
74
         * @param index
75
         * The index of the direct position to set.
76
         * @param dimension
77
         * The dimension of the direct position.
78
         * @param value
79
         * The value to set
80
         */
81
        public void setCoordinateAt(int index, int dimension, double value);
82
        
83
        /**
84
         * Adds a vertex (or direct position) to the curve.
85
         * @param point
86
         * The new point to add.
87
         */
88
        public void addVertex(Point point);
89
        
90
        /**
91
         * Remove a vertex (direct position) to the curve.
92
         * @param index
93
         * The index of the vertex to remove.
94
         */
95
        public void removeVertex(int index);
96
        
97
        /** Gets a vertex (direct position).
98
         * @param index
99
         * The index of the vertex to get.
100
         * @return
101
         * One point.
102
         */
103
        public Point getVertex(int index);
104
        
105
        /**
106
         * Gets the number of vertices (direct positions) of the curve.
107
         * @return
108
         * The number of vertices.
109
         */
110
        public int getNumVertices();
111
                
112
        /**
113
         * Inserts a vertex (direct position) to the curve.
114
         * @param index
115
         * The index of the vertex where the new point has to be added.
116
         * @param p
117
         * The vertex to add.
118
         */
119
        public void insertVertex(int index, Point p);
120
}