com.esri.arcgis.geometry
Interface IRay

All Superinterfaces:
IGeometry, java.io.Serializable
All Known Implementing Classes:
IRayProxy, Ray

public interface IRay
extends IGeometry, java.io.Serializable

Provides access to 3D Ray properties and methods. A ray has one endpoint (its origin) and continues infinitely in one direction.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Description

A Ray is a one-dimensional object defined by an Origin point and a directional Vector.  A Ray extends to infinity from the Origin point in the direction of the Vector.

Remarks

 

Ray Example


Method Summary
 IEnumIntersection getEnumIntersect(IGeometry targetGeometry)
          Not implemented at this release.
 IPoint getOrigin()
          The origin point of the ray.
 IPoint getPointAtDistance(double distance)
          Constructs a point at a distance along the ray.
 IVector3D getVector()
          The direction vector of the ray.
 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.
 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 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 setOrigin(IPoint vectorOrigin)
          The origin point of the ray.
 void setVector(IVector3D directionVector)
          The direction vector of the ray.
 
Methods inherited from interface com.esri.arcgis.geometry.IGeometry
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 

Method Detail

queryOrigin

public void queryOrigin(IPoint vectorOrigin)
                 throws java.io.IOException,
                        AutomationException
Sets a point equal to the ray's origin.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the Origin of the Ray into the input Point.

Remarks

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.

Ray QueryOrigin Example

Parameters:
vectorOrigin - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOrigin

public IPoint getOrigin()
                 throws java.io.IOException,
                        AutomationException
The origin point of the ray.

Supported Platforms

Windows, Solaris, Linux

Description

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.

Remarks

 

Ray Origin Example

Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOrigin

public void setOrigin(IPoint vectorOrigin)
               throws java.io.IOException,
                      AutomationException
The origin point of the ray.

Supported Platforms

Windows, Solaris, Linux

Parameters:
vectorOrigin - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryVector

public void queryVector(IVector3D directionVector)
                 throws java.io.IOException,
                        AutomationException
Sets a vector equal to a unit vector with the same direction as the ray.

Supported Platforms

Windows, Solaris, Linux

Description

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.

Remarks

 

Ray QueryVector Example

Parameters:
directionVector - A reference to a com.esri.arcgis.geometry.IVector3D (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getVector

public IVector3D getVector()
                    throws java.io.IOException,
                           AutomationException
The direction vector of the ray.

Supported Platforms

Windows, Solaris, Linux

Description

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.

Remarks

 

Ray Vector Example

Returns:
A reference to a com.esri.arcgis.geometry.IVector3D
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setVector

public void setVector(IVector3D directionVector)
               throws java.io.IOException,
                      AutomationException
The direction vector of the ray.

Supported Platforms

Windows, Solaris, Linux

Parameters:
directionVector - A reference to a com.esri.arcgis.geometry.IVector3D (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryPointAtDistance

public void queryPointAtDistance(double distance,
                                 IPoint point)
                          throws java.io.IOException,
                                 AutomationException
Queries a point at a distance along the ray.

Supported Platforms

Windows, Solaris, Linux

Parameters:
distance - The distance (in)
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPointAtDistance

public IPoint getPointAtDistance(double distance)
                          throws java.io.IOException,
                                 AutomationException
Constructs a point at a distance along the ray.

Supported Platforms

Windows, Solaris, Linux

Parameters:
distance - The distance (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

intersects

public boolean intersects(IGeometry targetGeometry)
                   throws java.io.IOException,
                          AutomationException
Indicates if the ray intersects the target geometry.

Supported Platforms

Windows, Solaris, Linux

Parameters:
targetGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
The intersectsTarget
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryFirstIntersection

public void queryFirstIntersection(IGeometry targetGeometry,
                                   IPoint intersectionPoint)
                            throws java.io.IOException,
                                   AutomationException
Returns the first point of intersection between the ray and the target geometry. The point is set empty if there is no intersection.

Supported Platforms

Windows, Solaris, Linux

Parameters:
targetGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
intersectionPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

intersect

public void intersect(IGeometry targetGeometry,
                      IPointCollection intersectionPoints)
               throws java.io.IOException,
                      AutomationException
Returns a point collection containing all points of intersection, in order along the ray.

Supported Platforms

Windows, Solaris, Linux

Parameters:
targetGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
intersectionPoints - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEnumIntersect

public IEnumIntersection getEnumIntersect(IGeometry targetGeometry)
                                   throws java.io.IOException,
                                          AutomationException
Not implemented at this release.

Supported Platforms

Windows, Solaris, Linux

Parameters:
targetGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnumIntersection
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.