|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.geometry.IEnumVertexProxy
public class IEnumVertexProxy
Provides access to members that iterate over the vertices or points of a geometry (see the EnumVertices property of the IPointCollection interface).
The methods on IEnumVertex interface can be used to access points of a point collection. EnumVertex is a lightweight object that you can use to pass around between routines. You may wish to use this enumerator in preference to the Points array returned by the IPointCollection::Points property, as it allows you to directly change the x-, y-, z-, m-, and ID properties of each Point, although Points cannot be removed or replaced using this interface. The IEnumVertex has knowledge of parts within multipart shapes and may therefore be convenient for use on a multipart shape, such as a Polygon or Polyline. Those methods are more efficient than the IPointCollection methods to access a large number of points in a sequential order for polyline and polygon. The collection methods transform absolute point index into a part relative index, enumerators don't.
Field Summary | |
---|---|
boolean |
noncastable
|
Fields inherited from class com.esri.arcgis.interop.Dispatch |
---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef |
Constructor Summary | |
---|---|
|
IEnumVertexProxy()
|
|
IEnumVertexProxy(Object obj)
|
protected |
IEnumVertexProxy(Object obj,
String iid)
|
Method Summary | |
---|---|
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
IEnumVertex |
esri_clone()
Returns a copy of this enumerator positioned at the same vertex. |
boolean |
isLastInPart()
Indicates if the current vertex is last in the current part. |
void |
next(IPoint[] outVertex,
int[] outPartIndex,
int[] vertexIndex)
Returns the next vertex and its location within the geometry. |
void |
nextInPart(IPoint[] outVertex,
int[] outVertexIndex)
Returns the next vertex in current part, or goes back to the first vertex in the part after last vertex in part is encountered. |
void |
previous(IPoint[] outVertex,
int[] outPartIndex,
int[] vertexIndex)
Returns the previous vertex and its location in the geometry. |
void |
put_ID(int pointID)
Sets the ID attribute of the current vertex. |
void |
put_M(double m)
Sets the M attribute of the current vertex. |
void |
put_X(double x)
Sets the X coordinate of the current vertex. |
void |
put_Y(double y)
Sets the Y coordinate of the current vertex. |
void |
put_Z(double z)
Sets the Z coordinate of the current vertex. |
void |
queryNext(IPoint vertex,
int[] outPartIndex,
int[] vertexIndex)
Copies the next vertex to the input parameter and returns its location in the geometry. |
void |
queryNextInPart(IPoint vertex,
int[] outVertexIndex)
Copies the next vertex in the current part to the input parameter and returns its location in current part. |
void |
queryPrevious(IPoint vertex,
int[] outPartIndex,
int[] vertexIndex)
Copies the previous vertex to the input parameter and returns its location in the geometry. |
void |
removeListener(String iidStr,
Object theListener)
|
void |
reset()
Starts from the beginning of the geometry the next time Next is called. |
void |
resetToEnd()
Starts from the end of the geometry the next time Previous is called. |
void |
setAt(int iPart,
int iVertex)
Resets enumerator to specific location. |
void |
skip(int numVertices)
Skips forward or backward over a specified number of vertices. |
Methods inherited from class com.esri.arcgis.interop.Dispatch |
---|
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean noncastable
Constructor Detail |
---|
public IEnumVertexProxy()
public IEnumVertexProxy(Object obj) throws IOException
IOException
protected IEnumVertexProxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class com.esri.arcgis.interop.Dispatch
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class com.esri.arcgis.interop.Dispatch
IOException
public void next(IPoint[] outVertex, int[] outPartIndex, int[] vertexIndex) throws IOException, AutomationException
The Next method returns the next vertex in the enumerator.
See picture for a graphical explanation of some of the IEnumVertex methods.
next
in interface IEnumVertex
outVertex
- A reference to a com.esri.arcgis.geometry.IPoint (out: use single element array)outPartIndex
- The outPartIndex (out: use single element array)vertexIndex
- The vertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryNext(IPoint vertex, int[] outPartIndex, int[] vertexIndex) throws IOException, AutomationException
The QueryNext method returns the next vertex in the enumerator. As oppose to the Next method the output point needs to be cocreated before to call QueryNext. The QueryNext method is faster than the Next method because it doesn't need to create a point internally each time. The QueryNext method only populates the output point. For example, creating the point only once outside a loop and reuse it in the QueryNext method will be faster than calling Next each time.
Note: The output geometry must be co-created prior to use the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.
queryNext
in interface IEnumVertex
vertex
- A reference to a com.esri.arcgis.geometry.IPoint (in)outPartIndex
- The outPartIndex (out: use single element array)vertexIndex
- The vertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void previous(IPoint[] outVertex, int[] outPartIndex, int[] vertexIndex) throws IOException, AutomationException
The Previous method returns the vertex before the current location of the Enumerator.
See picture for a graphical explanation of some of the IEnumVertex methods.
previous
in interface IEnumVertex
outVertex
- A reference to a com.esri.arcgis.geometry.IPoint (out: use single element array)outPartIndex
- The outPartIndex (out: use single element array)vertexIndex
- The vertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryPrevious(IPoint vertex, int[] outPartIndex, int[] vertexIndex) throws IOException, AutomationException
The QueryPrevious method returns the vertex before the current location of the Enumerator. As oppose to the Previous method the output point needs to be cocreated before to call QueryPrevious. The QueryPrevious method is faster than the Previous method because it doesn't need to create a point internally each time. The QueryPrevious method only populates the output point. For example, creating the point only once outside a loop and reuse it in the QueryPrevious method will be faster than calling Previous each time.
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.
queryPrevious
in interface IEnumVertex
vertex
- A reference to a com.esri.arcgis.geometry.IPoint (in)outPartIndex
- The outPartIndex (out: use single element array)vertexIndex
- The vertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void nextInPart(IPoint[] outVertex, int[] outVertexIndex) throws IOException, AutomationException
The NextInPart method returns the Next vertex in the current part only. If the Enumerator reaches the end of the current part it is reset to the start point of that part and returns the start point.
nextInPart
in interface IEnumVertex
outVertex
- A reference to a com.esri.arcgis.geometry.IPoint (out: use single element array)outVertexIndex
- The outVertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryNextInPart(IPoint vertex, int[] outVertexIndex) throws IOException, AutomationException
The QueryNextInPart method returns the Next vertex in the current part only. If the Enumerator reaches the end of the current part it is reset to the start point of that part and returns the first point. As oppose to the NextInPart method the output point needs to be cocreated before to call QueryNextInPart. The QueryNextInPart method is faster than the NextInPart method because it doesn't need to create a point internally each time. The QueryNextInPart method only populates the output point. For example, creating the point only once outside a loop and reuse it in the QueryNextInPart method will be faster than calling NextInPart each time.
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.
queryNextInPart
in interface IEnumVertex
vertex
- A reference to a com.esri.arcgis.geometry.IPoint (in)outVertexIndex
- The outVertexIndex (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void skip(int numVertices) throws IOException, AutomationException
The Skip method allows jumping over a given number of positions in the enumerator. The Skip method can be used to go forward (positive value) or backward (negative value).
skip
in interface IEnumVertex
numVertices
- The numVertices (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void reset() throws IOException, AutomationException
The Reset method sets the Enumerator in the position just before the first point. Therefore calling the Next method returns the first point of the Enumerator (PartIndex = 0 and VertexIndex = 0)
See picture for a graphical explanation of some of the IEnumVertex methods.
reset
in interface IEnumVertex
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumVertex esri_clone() throws IOException, AutomationException
esri_clone
in interface IEnumVertex
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void resetToEnd() throws IOException, AutomationException
The ResetToEnd method sets the Enumerator in the position just after the last point. Therefore calling the Previous method returns the last point of the Enumerator (PartIndex = PartCount -1 and VertexIndex = VertexCountInPart-1).
See picture for a graphical explanation of some of the IEnumVertex methods.
resetToEnd
in interface IEnumVertex
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAt(int iPart, int iVertex) throws IOException, AutomationException
The SetAt method allows setting the Enumerator to a particular position.
See picture for a graphical explanation of some of the IEnumVertex methods.
setAt
in interface IEnumVertex
iPart
- The iPart (in)iVertex
- The iVertex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isLastInPart() throws IOException, AutomationException
The IsLastInPart method returns whether or not the Enumerator is located on the last point of a given. For example for a polyline with 2 parts of 4 vertices each, the IsLastInPart method would return 'true' for PartIndex = 0 and VertexIndex = 4 and for PartIndex = 1 and VertexIndex = 4.
isLastInPart
in interface IEnumVertex
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void put_X(double x) throws IOException, AutomationException
Sets the X coordinate of the current enumerated vertex.
put_X
in interface IEnumVertex
x
- The x (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void put_Y(double y) throws IOException, AutomationException
Sets the Y coordinate of the current enumerated vertex.
put_Y
in interface IEnumVertex
y
- The y (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void put_Z(double z) throws IOException, AutomationException
Sets the Z attribute of the current enumerated vertex.
put_Z
in interface IEnumVertex
z
- The z (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void put_M(double m) throws IOException, AutomationException
Sets the M attribute of the current enumerated vertex.
put_M
in interface IEnumVertex
m
- The m (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void put_ID(int pointID) throws IOException, AutomationException
Sets the PointID attribute of the current enumerated vertex.
put_ID
in interface IEnumVertex
pointID
- The pointID (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |