com.esri.arcgis.geometry
Interface IRay2

All Superinterfaces:
IGeometry, IRay, Serializable
All Known Implementing Classes:
Ray

public interface IRay2
extends IRay, Serializable

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

Description

This interface is new at ArcGIS 9.3. It supersedes IRay.

Product Availability

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


Method Summary
 void queryPlaneIntersection(_WKSPointZ pPlaneNormal, double d, IPoint pPoint)
          Returns the point of intersection between the ray and the target plane.
 
Methods inherited from interface com.esri.arcgis.geometry.IRay
getEnumIntersect, getOrigin, getPointAtDistance, getVector, intersect, intersects, queryFirstIntersection, queryOrigin, queryPointAtDistance, queryVector, setOrigin, setVector
 
Methods inherited from interface com.esri.arcgis.geometry.IGeometry
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 

Method Detail

queryPlaneIntersection

void queryPlaneIntersection(_WKSPointZ pPlaneNormal,
                            double d,
                            IPoint pPoint)
                            throws IOException,
                                   AutomationException
Returns the point of intersection between the ray and the target plane. The point is set empty if there is no intersection.

Description

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();

Product Availability

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

Parameters:
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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.