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 @ 40435
History | View | Annotate | Download (5.57 KB)
1 | 40435 | jjdelcerro | /* 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_OrientablePrimitive specified in
|
||
33 | * <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>.
|
||
34 | * Orientable primitives are those that can be mirrored into new
|
||
35 | * geometric objects in terms of their internal local coordinate
|
||
36 | * systems (manifold charts).
|
||
37 | * </p>
|
||
38 | * <p>
|
||
39 | * For curves, the orientation reflects the direction in which the curve is traversed,
|
||
40 | * that is, the sense of its parameterization. When used as boundary curves,
|
||
41 | * the surface being bounded is to the "left" of the oriented curve.
|
||
42 | * </p>
|
||
43 | * <p>
|
||
44 | * For surfaces, the orientation reflects from which direction the local coordinate
|
||
45 | * system can be viewed as right handed, the "top" or the surface being the direction
|
||
46 | * of a completing z-axis that would form a right-handed system.
|
||
47 | * </p>
|
||
48 | * <p>
|
||
49 | * When used as a boundary surface, the bounded solid is "below" the surface.
|
||
50 | * The orientation of points and solids has no immediate geometric interpretation
|
||
51 | * in 3-dimensional space.
|
||
52 | * </p>
|
||
53 | * <p> OrientablePrimitive objects are essentially references to geometric primitives
|
||
54 | * that carry an "orientation" reversal flag (either "+" or "-") that determines whether
|
||
55 | * this primitive agrees or disagrees with the orientation of the referenced object.
|
||
56 | * </p>
|
||
57 | * @see <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26012">ISO 19107</a>
|
||
58 | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
|
||
59 | */
|
||
60 | public interface OrientablePrimitive extends Primitive { |
||
61 | |||
62 | /**
|
||
63 | * Gets the one of the values of a coordinate (direct position) in a
|
||
64 | * concrete dimension.
|
||
65 | *
|
||
66 | * @param index
|
||
67 | * The index of the direct position to set.
|
||
68 | * @param dimension
|
||
69 | * The dimension of the direct position.
|
||
70 | * @return The value of the coordinate
|
||
71 | */
|
||
72 | public double getCoordinateAt(int index, int dimension); |
||
73 | |||
74 | |||
75 | /**
|
||
76 | * Sets the value of a coordinate (direct position) in a concrete dimension
|
||
77 | * @param index
|
||
78 | * The index of the direct position to set
|
||
79 | * @param dimension
|
||
80 | * The dimension of the direct position
|
||
81 | * @param value
|
||
82 | * The value to set
|
||
83 | */
|
||
84 | public void setCoordinateAt(int index, int dimension, double value); |
||
85 | |||
86 | /**
|
||
87 | * Adds a vertex (or direct position) to the curve
|
||
88 | * @param point
|
||
89 | * The new point to add
|
||
90 | */
|
||
91 | public void addVertex(Point point); |
||
92 | |||
93 | /**
|
||
94 | * Utility method for add a vertex
|
||
95 | * @param x
|
||
96 | * @param y
|
||
97 | * @see #addVertex(Point)
|
||
98 | */
|
||
99 | public void addVertex(double x, double y); |
||
100 | |||
101 | /**
|
||
102 | * Utility method for add a vertex
|
||
103 | * @param x
|
||
104 | * @param y
|
||
105 | * @param z
|
||
106 | * @see #addVertex(Point)
|
||
107 | */
|
||
108 | public void addVertex(double x, double y, double z); |
||
109 | |||
110 | /**
|
||
111 | * Remove a vertex (direct position) to the curve
|
||
112 | * @param index
|
||
113 | * The index of the vertex to remove
|
||
114 | */
|
||
115 | public void removeVertex(int index); |
||
116 | |||
117 | /**
|
||
118 | * Gets a vertex (direct position)
|
||
119 | * @param index
|
||
120 | * The index of the vertex to get
|
||
121 | * @return
|
||
122 | * One point
|
||
123 | */
|
||
124 | public Point getVertex(int index); |
||
125 | |||
126 | /**
|
||
127 | * Gets the number of vertices (direct positions) of the curve
|
||
128 | * @return
|
||
129 | * The number of vertices
|
||
130 | */
|
||
131 | public int getNumVertices(); |
||
132 | |||
133 | /**
|
||
134 | * Inserts a vertex (direct position) to the curve.
|
||
135 | * @param index
|
||
136 | * The index of the vertex where the new point has to be added.
|
||
137 | * @param p
|
||
138 | * The vertex to add.
|
||
139 | */
|
||
140 | public void insertVertex(int index, Point p); |
||
141 | |||
142 | /**
|
||
143 | * Sets a vertex in a concrete position and replaces the
|
||
144 | * previous one that was in this position.
|
||
145 | * @param index
|
||
146 | * The index of the vertex where the new point has to be replaced.
|
||
147 | * @param p
|
||
148 | * The vertex to set.
|
||
149 | */
|
||
150 | public void setVertex(int index, Point p); |
||
151 | |||
152 | /**
|
||
153 | * Sets all the coordinates of the curve
|
||
154 | * @param generalPathX The generalPath that contains all the coordinates
|
||
155 | * @deprecated use addVertex
|
||
156 | */
|
||
157 | public void setGeneralPath(GeneralPathX generalPathX); |
||
158 | |||
159 | /**
|
||
160 | * Adds a vertex (or direct position) to the curve
|
||
161 | * @param point
|
||
162 | * The new point to add
|
||
163 | * @deprecated
|
||
164 | * create a multigeometry or use methods to
|
||
165 | * add an inner surface
|
||
166 | */
|
||
167 | public void addMoveToVertex(Point point); |
||
168 | |||
169 | /**
|
||
170 | * Closes the geometry
|
||
171 | * @deprecated
|
||
172 | * create a multigeometry, and it is not necessary to close a
|
||
173 | * geometry.
|
||
174 | */
|
||
175 | public void closePrimitive(); |
||
176 | |||
177 | } |