|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geometry.Vector3D
public class Vector3D
A 3D vector containing dx, dy, and dz components.
Constructor Summary | |
---|---|
Vector3D()
Constructs a Vector3D using ArcGIS Engine. |
|
Vector3D(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. Vector3D theVector3D = (Vector3D) obj; |
Method Summary | |
---|---|
IVector |
addVector(IVector otherVector)
Construct a new vector by adding a different vector to this vector. |
void |
assign(IClone src)
Assigns the properties of src to the receiver. |
void |
constructAddVector(IVector vector1,
IVector vector2)
Set this vector by adding two input vectors. |
void |
constructCrossProduct(IVector vector1,
IVector vector2)
Set this vector equal to the cross product of the two input vectors. |
void |
constructDifference(IPoint point1,
IPoint point2)
Set the vector by taking the difference of point1 and point2 (so the vector would go from point2 to point1). |
void |
constructSubtractVector(IVector vector1,
IVector vector2)
Set this vector by subtracting the second input vector from the first one. |
IVector |
crossProduct(IVector otherVector)
Returns the cross product of this vector and another vector. |
double |
dotProduct(IVector otherVector)
Returns the dot product of this vector and another vector. |
boolean |
equals(Object o)
Compare this object with another |
IClone |
esri_clone()
Clones the receiver and assigns the result to *clone. |
double |
getAzimuth()
The vector's azimuth angle in radians. |
static String |
getClsid()
getClsid. |
double |
getComponentByIndex(int componentIndex)
The component corresponding to a given index. |
int |
getDimension()
The dimension of this vector. |
double |
getInclination()
The vector's inclination in radians. |
double |
getMagnitude()
The length of the vector. |
double |
getXComponent()
The vector's X component. |
double |
getYComponent()
The vector's Y component. |
double |
getZComponent()
The vector's Z component. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
boolean |
isEmpty()
Indicates if the vector is empty (unset). |
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 |
move(double dx,
double dy,
double dz)
Move the vector by adding a shift value to each component. |
void |
normalize()
Normalize the vector (scale it to magnitude = 1). |
void |
polarMove(double dAzimuth,
double dInclination,
double dRadius)
Modify the vector by adding to its polar components. |
void |
polarQuery(double[] azimuth,
double[] inclination,
double[] radiusLength)
Get the vector's polar components. |
void |
polarSet(double azimuth,
double inclination,
double radiusLength)
Set the vector using polar components. |
void |
queryComponents(double[] dx,
double[] dy,
double[] dz)
Get the values of the vector's components. |
void |
rotate(double angle,
IVector3D axis)
Rotate the vector around an axis defined by another vector. |
void |
scale(double scaleFactor)
Scale the vector by the given factor. |
void |
setAzimuth(double azimuth)
The vector's azimuth angle in radians. |
void |
setComponentByIndex(int componentIndex,
double componentValue)
The component corresponding to a given index. |
void |
setComponents(double dx,
double dy,
double dz)
Set the values of the vector's components. |
void |
setEmpty()
Makes the vector empty (unset). |
void |
setInclination(double inclination)
The vector's inclination in radians. |
void |
setMagnitude(double magnitude)
The length of the vector. |
void |
setXComponent(double dx)
The vector's X component. |
void |
setYComponent(double dy)
The vector's Y component. |
void |
setZComponent(double dz)
The vector's Z component. |
IVector |
subtractVector(IVector otherVector)
Construct a new vector by subtracting a different vector from this vector. |
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 Vector3D() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic Vector3D(Object obj) throws IOException
Vector3D theVector3D = (Vector3D) obj;
obj
to Vector3D
.
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 int getDimension() throws IOException, AutomationException
Returns the Dimension of the Vector. The Dimension corresponds to the number of unique Components that define the vector.
getDimension
in interface IVector
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean isEmpty() throws IOException, AutomationException
Returns TRUE if all of the components of the vector have undefined (NaN) values. An Empty vector is NOT the same as a Null vector.
isEmpty
in interface IVector
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setEmpty() throws IOException, AutomationException
Sets the vector equal to an empty vector in which all components have undefined (NaN) values.
setEmpty
in interface IVector
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getComponentByIndex(int componentIndex) throws IOException, AutomationException
getComponentByIndex
in interface IVector
componentIndex
- The componentIndex (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setComponentByIndex(int componentIndex, double componentValue) throws IOException, AutomationException
Sets the value of the component of the specified index equal to the input component value. The first component has index 0. An Nth Dimensional vector has N components (0, 1, . . ., N-2, N-1).
setComponentByIndex
in interface IVector
componentIndex
- The componentIndex (in)componentValue
- The componentValue (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getMagnitude() throws IOException, AutomationException
Returns and sets the magnitude of the vector. The magnitude is analgous to the length of the vector.
getMagnitude
in interface IVector
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMagnitude(double magnitude) throws IOException, AutomationException
setMagnitude
in interface IVector
magnitude
- The magnitude (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void normalize() throws IOException, AutomationException
Normalizes the Vector to a unit vector with Magnitude = 1 and the same direction as the original vector.
Normalize is the same as Scaling the vector by 1 / Magnitude.
normalize
in interface IVector
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void scale(double scaleFactor) throws IOException, AutomationException
Multiplies each component of the Vector by a given Scale factor. If the scale factor is positive, the resulting scaled vector has the same direction as the original vector. If the scale factor is negative, the resulting scaled vector has the opposite direction as the original vector. The Magnitude of the scaled vector = OriginalMagnitude * Abs(ScaleFactor).
Scaling a Vector by 1 / Magnitude effectively Normalizes the vector and results in a unit vector.
scale
in interface IVector
scaleFactor
- The scaleFactor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IVector addVector(IVector otherVector) throws IOException, AutomationException
Returns a newly constructed Vector by adding the components of the base vector to the corresponding components of the input vector.
addVector
in interface IVector
otherVector
- A reference to a com.esri.arcgis.geometry.IVector (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IVector subtractVector(IVector otherVector) throws IOException, AutomationException
Returns a newly constructed Vector by subtracting the components of the input vector from the corresponding components of the base vector.
subtractVector
in interface IVector
otherVector
- A reference to a com.esri.arcgis.geometry.IVector (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void constructAddVector(IVector vector1, IVector vector2) throws IOException, AutomationException
Constructs a new Vector by adding the components of the first vector to the corresponding components of the second vector.
constructAddVector
in interface IVector
vector1
- A reference to a com.esri.arcgis.geometry.IVector (in)vector2
- A reference to a com.esri.arcgis.geometry.IVector (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void constructSubtractVector(IVector vector1, IVector vector2) throws IOException, AutomationException
Constructs a new Vector by subtracting the components of the second vector from the corresponding components of the first vector.
constructSubtractVector
in interface IVector
vector1
- A reference to a com.esri.arcgis.geometry.IVector (in)vector2
- A reference to a com.esri.arcgis.geometry.IVector (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double dotProduct(IVector otherVector) throws IOException, AutomationException
Returns a double representing the Dot Product of the base vector and the input vector. The Dot Product is the sum of multiplying corresponding components of each vector.
dotProduct
in interface IVector
otherVector
- A reference to a com.esri.arcgis.geometry.IVector (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getXComponent() throws IOException, AutomationException
Returns and sets the X Component of the 3 Dimensional vector. The X Component corresponds to the displacement from the origin along the X-Axis.
getXComponent
in interface IVector3D
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setXComponent(double dx) throws IOException, AutomationException
setXComponent
in interface IVector3D
dx
- The dx (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getYComponent() throws IOException, AutomationException
Returns and sets the Y Component of the 3 Dimensional vector. The Y Component corresponds to the displacement from the origin along the Y-Axis.
getYComponent
in interface IVector3D
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setYComponent(double dy) throws IOException, AutomationException
setYComponent
in interface IVector3D
dy
- The dy (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getZComponent() throws IOException, AutomationException
Returns and sets the Z Component of the 3 Dimensional vector. The Z Component corresponds to the displacement from the origin along the Z-Axis.
getZComponent
in interface IVector3D
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setZComponent(double dz) throws IOException, AutomationException
setZComponent
in interface IVector3D
dz
- The dz (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getInclination() throws IOException, AutomationException
Returns and sets the Inclination of the 3 Dimensional vector. The Inclination is the angle between the XY-Plane and the vector measured in the Z-direction. The Inclination is measured in radians and has a value between -Pi/2 and Pi/2.
getInclination
in interface IVector3D
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setInclination(double inclination) throws IOException, AutomationException
Note: That property cannot be set unless the vector as three well defined components (X, Y, Z).
setInclination
in interface IVector3D
inclination
- The inclination (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public double getAzimuth() throws IOException, AutomationException
Returns and sets the Azimuth of the 3 Dimensional vector. The Azimuth is the angle between the YZ-Plane and the vector measured in the X-direction. The Azimuth is measured in radians in a clockwise direction and has a value between 0 and 2*Pi.
getAzimuth
in interface IVector3D
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setAzimuth(double azimuth) throws IOException, AutomationException
Note: That property cannot be set unless the vector as three well defined components (X, Y, Z).
setAzimuth
in interface IVector3D
azimuth
- The azimuth (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void move(double dx, double dy, double dz) throws IOException, AutomationException
Moves the Vector3D by adding a given input factor to each of the X, Y, and Z Components. The result is the same as adding another Vector3D defined by the inputs to the base Vector3D.
move
in interface IVector3D
dx
- The dx (in)dy
- The dy (in)dz
- The dz (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void queryComponents(double[] dx, double[] dy, double[] dz) throws IOException, AutomationException
Returns the X Component, Y Component, and X Component of the 3 Dimensional vector.
queryComponents
in interface IVector3D
dx
- The dx (out: use single element array)dy
- The dy (out: use single element array)dz
- The dz (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setComponents(double dx, double dy, double dz) throws IOException, AutomationException
Sets the X Component, Y Component, and Z Component of the 3 Dimensional vector.
setComponents
in interface IVector3D
dx
- The dx (in)dy
- The dy (in)dz
- The dz (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void constructDifference(IPoint point1, IPoint point2) throws IOException, AutomationException
Constructs a Vector3D defined by the difference between the first point and the second point. The first point and the Origin define a Vector3D, and the Origin and the second point define a second Vector3D. Thus, the constructed difference Vector3D is the Constructed Subtract Vector between the first vector and the second vector.
constructDifference
in interface IVector3D
point1
- A reference to a com.esri.arcgis.geometry.IPoint (in)point2
- 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 rotate(double angle, IVector3D axis) throws IOException, AutomationException
Rotates the base Vector3D a given input angle measured in radians around the specified axis defined by the input Vector3D. To rotate a vector in a given plane defined by two vectors, use the CrossProduct of those vectors as the axis of rotation.
rotate
in interface IVector3D
angle
- The angle (in)axis
- 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 polarSet(double azimuth, double inclination, double radiusLength) throws IOException, AutomationException
Sets the X Component, Y Component, and Z Component values of the 3 Dimensional vector that correspond to the input Azimuth, Inclination, and Radius Length (Magnitude) values. The Azimuth and Inclination are measured in radians.
polarSet
in interface IVector3D
azimuth
- The azimuth (in)inclination
- The inclination (in)radiusLength
- The radiusLength (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void polarQuery(double[] azimuth, double[] inclination, double[] radiusLength) throws IOException, AutomationException
Returns the Azimuth, Inclination, and Radius Length (Magnitude) of the 3 Dimensional vector.
polarQuery
in interface IVector3D
azimuth
- The azimuth (out: use single element array)inclination
- The inclination (out: use single element array)radiusLength
- The radiusLength (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void polarMove(double dAzimuth, double dInclination, double dRadius) throws IOException, AutomationException
Moves the Vector3D in Polar coordinates by adding a given input factor to each of the Azimuth, Inclination, and Radius Components. This can be thought of as applying a Polar rotation and modification to the base Vector.
polarMove
in interface IVector3D
dAzimuth
- The dAzimuth (in)dInclination
- The dInclination (in)dRadius
- The dRadius (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IVector crossProduct(IVector otherVector) throws IOException, AutomationException
crossProduct
in interface IVector3D
otherVector
- A reference to a com.esri.arcgis.geometry.IVector (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void constructCrossProduct(IVector vector1, IVector vector2) throws IOException, AutomationException
constructCrossProduct
in interface IVector3D
vector1
- A reference to a com.esri.arcgis.geometry.IVector (in)vector2
- A reference to a com.esri.arcgis.geometry.IVector (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 |