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