Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.geometry / org.gvsig.fmap.geometry.api / src / main / java / org / gvsig / fmap / geom / primitive / OrientablePrimitive.java @ 42309

History | View | Annotate | Download (5.52 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
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 3
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
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

    
25
package org.gvsig.fmap.geom.primitive;
26

    
27

    
28
/**
29
 * <p>
30
 * This interface is equivalent to the GM_OrientablePrimitive specified in
31
 * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
32
 * Orientable primitives are those that can be mirrored into new
33
 * geometric objects in terms of their internal local coordinate
34
 * systems (manifold charts).
35
 * </p>
36
 * <p>
37
 * For curves, the orientation reflects the direction in which the curve is traversed,
38
 * that is, the sense of its parameterization. When used as boundary curves,
39
 * the surface being bounded is to the "left" of the oriented curve.
40
 * </p>
41
 * <p>
42
 * For surfaces, the orientation reflects from which direction the local coordinate
43
 * system can be viewed as right handed, the "top" or the surface being the direction
44
 * of a completing z-axis that would form a right-handed system.
45
 * </p>
46
 * <p>
47
 * When used as a boundary surface, the bounded solid is "below" the surface.
48
 * The orientation of points and solids has no immediate geometric interpretation
49
 * in 3-dimensional space.
50
 * </p>
51
 * <p> OrientablePrimitive objects are essentially references to geometric primitives
52
 * that carry an "orientation" reversal flag (either "+" or "-") that determines whether
53
 * this primitive agrees or disagrees with the orientation of the referenced object.
54
 * </p>
55
 * @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
56
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
57
 */
58
public interface OrientablePrimitive extends Primitive {
59

    
60
    /**
61
     * Gets the one of the values of a coordinate (direct position) in a
62
     * concrete dimension.
63
     *
64
     * @param index
65
     *            The index of the direct position to set.
66
     * @param dimension
67
     *            The dimension of the direct position.
68
     * @return The value of the coordinate
69
     */
70
    public double getCoordinateAt(int index, int dimension);
71

    
72

    
73
    /**
74
     * Sets the value of a coordinate (direct position) in a concrete dimension
75
     * @param index
76
     * The index of the direct position to set
77
     * @param dimension
78
     * The dimension of the direct position
79
     * @param value
80
     * The value to set
81
     */
82
    public void setCoordinateAt(int index, int dimension, double value);
83

    
84
    /**
85
     * Adds a vertex (or direct position) to the curve
86
     * @param point
87
     * The new point to add
88
     */
89
    public void addVertex(Point point);
90

    
91
    /**
92
     * Utility method for add a vertex
93
     * @param x
94
     * @param y
95
     * @see #addVertex(Point)
96
     */
97
    public void addVertex(double x, double y);
98

    
99
    /**
100
     * Utility method for add a vertex
101
     * @param x
102
     * @param y
103
     * @param z
104
     * @see #addVertex(Point)
105
     */
106
    public void addVertex(double x, double y, double z);
107

    
108
    /**
109
     * Remove a vertex (direct position) to the curve
110
     * @param index
111
     * The index of the vertex to remove
112
     */
113
    public void removeVertex(int index);
114

    
115
    /**
116
     * Gets a vertex (direct position)
117
     * @param index
118
     * The index of the vertex to get
119
     * @return
120
     * One point
121
     */
122
    public Point getVertex(int index);
123

    
124
    /**
125
     * Gets the number of vertices (direct positions) of the curve
126
     * @return
127
     * The number of vertices
128
     */
129
    public int getNumVertices();
130

    
131
    /**
132
     * Inserts a vertex (direct position) to the curve.
133
     * @param index
134
     * The index of the vertex where the new point has to be added.
135
     * @param p
136
     * The vertex to add.
137
     */
138
    public void insertVertex(int index, Point p);
139

    
140
    /**
141
     * Sets a vertex in a concrete position and replaces the
142
     * previous one that was in this position.
143
     * @param index
144
     * The index of the vertex where the new point has to be replaced.
145
     * @param p
146
     * The vertex to set.
147
     */
148
    public void setVertex(int index, Point p);
149

    
150
    /**
151
     * Sets all the coordinates of the curve
152
     * @param generalPathX The generalPath that contains all the coordinates
153
     * @deprecated use addVertex
154
     */
155
    public void setGeneralPath(GeneralPathX generalPathX);
156

    
157
    /**
158
     * Adds a vertex (or direct position) to the curve
159
     * @param point
160
     * The new point to add
161
     * @deprecated
162
     *      create a multigeometry or use methods to
163
     *      add an inner surface
164
     */
165
    public void addMoveToVertex(Point point);
166

    
167
    /**
168
     * Closes the geometry
169
     * @deprecated
170
     *      create a multigeometry, and it is not necessary to close a
171
     *      geometry.
172
     */
173
    public void closePrimitive();
174

    
175
    public void ensureCapacity(int capacity);
176

    
177
}