|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geometry.Ray
public class Ray
A 3D ray that begins at a point and extends infinitely along a line in one direction only.
Constructor Summary | |
---|---|
Ray()
Constructs a Ray using ArcGIS Engine. |
|
Ray(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. Ray theRay = (Ray) obj; |
Method Summary | |
---|---|
void |
assign(IClone src)
Assigns the properties of src to the receiver. |
boolean |
equals(Object o)
Compare this object with another |
IClone |
esri_clone()
Clones the receiver and assigns the result to *clone. |
void |
geoNormalize()
Shifts longitudes, if need be, into a continuous range of 360 degrees. |
void |
geoNormalizeFromLongitude(double longitude)
Normalizes longitudes into a continuous range containing the longitude. |
static String |
getClsid()
getClsid. |
int |
getDimension()
The topological dimension of this geometry. |
IEnumIntersection |
getEnumIntersect(IGeometry targetGeometry)
Not implemented at this release. |
IEnvelope |
getEnvelope()
Creates a copy of this geometry's envelope and returns it. |
int |
getGeometryType()
The type of this geometry. |
IPoint |
getOrigin()
The origin point of the ray. |
IPoint |
getPointAtDistance(double distance)
Constructs a point at a distance along the ray. |
ISpatialReference |
getSpatialReference()
The spatial reference associated with this geometry. |
IVector3D |
getVector()
The direction vector of the ray. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
void |
intersect(IGeometry targetGeometry,
IPointCollection intersectionPoints)
Returns a point collection containing all points of intersection, in order along the ray. |
boolean |
intersects(IGeometry targetGeometry)
Indicates if the ray intersects the target geometry. |
boolean |
isEmpty()
Indicates whether this geometry contains any points. |
boolean |
isEqual(IClone other)
Indicates if the receiver and other have the same properties. |
boolean |
isIdentical(IClone other)
Indicates if the receiver and other are the same object. |
void |
project(ISpatialReference newReferenceSystem)
Projects this geometry into a new spatial reference. |
void |
queryEnvelope(IEnvelope outEnvelope)
Copies this geometry's envelope properties into the specified envelope. |
void |
queryFirstIntersection(IGeometry targetGeometry,
IPoint intersectionPoint)
Returns the first point of intersection between the ray and the target geometry. |
void |
queryOrigin(IPoint vectorOrigin)
Sets a point equal to the ray's origin. |
void |
queryPlaneIntersection(_WKSPointZ pPlaneNormal,
double d,
IPoint pPoint)
Returns the point of intersection between the ray and the target plane. |
void |
queryPointAtDistance(double distance,
IPoint point)
Queries a point at a distance along the ray. |
void |
queryVector(IVector3D directionVector)
Sets a vector equal to a unit vector with the same direction as the ray. |
void |
setEmpty()
Removes all points from this geometry. |
void |
setOrigin(IPoint vectorOrigin)
The origin point of the ray. |
void |
setSpatialReferenceByRef(ISpatialReference spatialRef)
The spatial reference associated with this geometry. |
void |
setVector(IVector3D directionVector)
The direction vector of the ray. |
void |
snapToSpatialReference()
Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public Ray() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic Ray(Object obj) throws IOException
Ray theRay = (Ray) obj;
obj
to Ray
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void queryOrigin(IPoint vectorOrigin) throws IOException, AutomationException
Returns the Origin of the Ray into the input Point.
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.
queryOrigin
in interface IRay
vectorOrigin
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPoint getOrigin() throws IOException, AutomationException
Returns and sets the Origin of the Ray. The Origin is the starting Point from which the Ray infinitely extends in the direction of its vector.
getOrigin
in interface IRay
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setOrigin(IPoint vectorOrigin) throws IOException, AutomationException
setOrigin
in interface IRay
vectorOrigin
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryVector(IVector3D directionVector) throws IOException, AutomationException
Returns the Vector3D of the Ray. The Vector3D determines the direction the Ray extends from its Origin. The Vector of a Ray is always Normalized to a unit vector.
queryVector
in interface IRay
directionVector
- A reference to a com.esri.arcgis.geometry.IVector3D (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IVector3D getVector() throws IOException, AutomationException
Returns and sets the Vector3D of the Ray. The Vector3D determines the direction the Ray extends from its Origin. The Vector of a Ray is always Normalized to a unit vector.
getVector
in interface IRay
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setVector(IVector3D directionVector) throws IOException, AutomationException
setVector
in interface IRay
directionVector
- A reference to a com.esri.arcgis.geometry.IVector3D (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryPointAtDistance(double distance, IPoint point) throws IOException, AutomationException
queryPointAtDistance
in interface IRay
distance
- The distance (in)point
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IPoint getPointAtDistance(double distance) throws IOException, AutomationException
getPointAtDistance
in interface IRay
distance
- The distance (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean intersects(IGeometry targetGeometry) throws IOException, AutomationException
Implemented for Points, Multipoints, Polylines, Polygons, Envelopes, and Multipatches.
This method is intended to be called against top-level geometries only (Point, Multipoint, Polyline, Polygon, Envelope, MultiPatch). To call this method against a Segment/Path or Ring, first add the part to a Polyline or Polygon container, respectively, and then call this method against the container.
intersects
in interface IRay
targetGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryFirstIntersection(IGeometry targetGeometry, IPoint intersectionPoint) throws IOException, AutomationException
Implemented for Points, Multipoints, Polylines, Polygons, Envelopes, and Multipatches.
This method is intended to be called against top-level
geometries only (Point, Multipoint, Polyline, Polygon, Envelope,
MultiPatch). To call this method against a Segment/Path or
Ring, first add the part to a Polyline or Polygon container,
respectively, and then call this method against the container.
If a Ray intersects an Envelope and is located within the bounds of
the Envelope, the result of QueryFirstIntersection will be
the point closest to the Ray origin along the
Ray, located on the exterior of the Envelope at which an
intersection takes place.
queryFirstIntersection
in interface IRay
targetGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)intersectionPoint
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void intersect(IGeometry targetGeometry, IPointCollection intersectionPoints) throws IOException, AutomationException
Implemented for Points, Multipoints, Polylines, Polygons, Envelopes, and Multipatches.
This method is intended to be called against top-level geometries only (Point, Multipoint, Polyline, Polygon, Envelope, MultiPatch). To call this method against a Segment/Path or Ring, first add the part to a Polyline or Polygon container, respectively, and then call this method against the container.
intersect
in interface IRay
targetGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)intersectionPoints
- A reference to a com.esri.arcgis.geometry.IPointCollection (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnumIntersection getEnumIntersect(IGeometry targetGeometry) throws IOException, AutomationException
This method is currently not implemented.
getEnumIntersect
in interface IRay
targetGeometry
- A reference to a com.esri.arcgis.geometry.IGeometry (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getGeometryType() throws IOException, AutomationException
esriGeometryNull = 0
esriGeometryPoint = 1
esriGeometryMultipoint = 2
esriGeometryPolyline = 3
esriGeometryPolygon = 4
esriGeometryEnvelope = 5
esriGeometryPath = 6
esriGeometryAny = 7
esriGeometryMultiPatch = 9
esriGeometryRing = 11
esriGeometryLine = 13
esriGeometryCircularArc = 14
esriGeometryBezier3Curve = 15
esriGeometryEllipticArc = 16
esriGeometryBag = 17
esriGeometryTriangleStrip = 18
esriGeometryTriangleFan = 19
esriGeometryRay = 20
esriGeometrySphere = 21
getGeometryType
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public int getDimension() throws IOException, AutomationException
Returns the dimension of the geometry object based on the geometry's type.
getDimension
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public ISpatialReference getSpatialReference() throws IOException, AutomationException
Returns and sets the Spatial Reference in which the geometry exists. If the spatial reference has not been set the property will return an empty ISpatialReference instance.
getSpatialReference
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setSpatialReferenceByRef(ISpatialReference spatialRef) throws IOException, AutomationException
setSpatialReferenceByRef
in interface IGeometry
spatialRef
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEmpty() throws IOException, AutomationException
IsEmpty returns TRUE when the Geometry object does not contain geometric information beyond its original initialization state. An object may be returned to its original initialization (IsEmpty = TRUE) state using SetEmpty.
isEmpty
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEmpty() throws IOException, AutomationException
SetEmpty returns the Geometry to its original initialization state by releasing all data referenced by the Geometry.
setEmpty
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryEnvelope(IEnvelope outEnvelope) throws IOException, AutomationException
Returns the unique Envelope that binds the Geometry object. This is the smallest Envelope that Contains the object.
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.
queryEnvelope
in interface IGeometry
outEnvelope
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IEnvelope getEnvelope() throws IOException, AutomationException
Returns the unique Envelope that binds the Geometry object. This is the smallest Envelope that Contains the object.
getEnvelope
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void project(ISpatialReference newReferenceSystem) throws IOException, AutomationException
To Project, the geometry needs to have a Spatial Reference set, and not have an UnknownCoordinateSystem. The new spatial reference system passed to the method defines the output coordinate system. If either spatial reference is Unknown, the coordinates are not changed. The Z and measure values are not changed by the Project method.
A geometry is not densified before it is projected. This can lead to the output geometries not reflecting the 'true' shape in the new coordinate system. A straight line in one coordinate system is not necessarily a straight line in a different coordinate system. Use IGeometry2::ProjectEx if you want to densify the geometries while they are projected.
The Project method must be applied on high-level geometries only. High-Level geometries are point, multipoint, polyline and polygon. To use this method with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), paths or rings, they must be wrapped into high-level geometry types.
If a geometry is projected to a projected coordinate system that can't represent the geographic area where the geometry is located (or if trying to move an xy coordinate from outside the projected coordinate system back into geographic), the geometry will be set to empty.
Note: This method can only be called upon the top level geometries (Points, Multipoints, Polylines and Polygons). If the from/to spatial references have different geographic coordinate systems, the Project method looks for a GeoTransformationsOperationSet. If the set of Geotransformations is present in memory, Project will use it to perform a geographic/datum Transformation. To use a specific geotransformation, use the IGeometry2::ProjectEx method.
project
in interface IGeometry
newReferenceSystem
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void snapToSpatialReference() throws IOException, AutomationException
snapToSpatialReference
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void geoNormalize() throws IOException, AutomationException
geoNormalize
in interface IGeometry
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void geoNormalizeFromLongitude(double longitude) throws IOException, AutomationException
geoNormalizeFromLongitude
in interface IGeometry
longitude
- The longitude (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryPlaneIntersection(_WKSPointZ pPlaneNormal, double d, IPoint pPoint) throws IOException, AutomationException
Given a plane represented by a point lying in the plane (IPoint pointInPlane) and a vector normal to the plane (IVector3D normalToPlane):
· pPlaneNormal represents the X, Y, and Z components of the normal vector packed into a WKSPointZ struct:
WKSPointZ pPlaneNormal = new WKSPointZ();
pPlaneNormal.X = normalToPlane.XComponent;
pPlaneNormal.Y = normalToPlane.YComponent;
pPlaneNormal.Z = normalToPlane.ZComponent;
·
D
represents the dot product of
the normal vector and a vector whose X, Y, and Z components are set
to the X, Y, and Z coordinates of the point lying in the
plane:
IVector3D vector3D = new Vector3DClass();
vector3D.SetComponents(
pointInPlane.X, pointInPlane.Y, pointInPlane.Z
);
double D =
normalToPlane.DotProduct(vector3D);
· pPoint represents the point of intersection, and should be set to a new instance of the PointClass() before it is passed to the method:
IPoint point = new PointClass();
queryPlaneIntersection
in interface IRay2
pPlaneNormal
- A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (in)d
- The d (in)pPoint
- A reference to a com.esri.arcgis.geometry.IPoint (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IClone esri_clone() throws IOException, AutomationException
esri_clone
in interface IClone
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void assign(IClone src) throws IOException, AutomationException
assign
in interface IClone
src
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEqual(IClone other) throws IOException, AutomationException
IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.
isEqual
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isIdentical(IClone other) throws IOException, AutomationException
IsIdentical returns true if the receiver and the source reference the same object.
isIdentical
in interface IClone
other
- A reference to a com.esri.arcgis.system.IClone (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (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 |