Interface IVector

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

Provides access to vector properties and operations.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("40D717C9-10C2-11D4-9F59-00C04F6BDF0D")]
public interface IVector

Properties

ComponentByIndex[int]

The component corresponding to a given index.

double ComponentByIndex[int componentIndex] { get; set; }

Parameters

componentIndex int

Property Value

double

Dimension

The dimension of this vector.

int Dimension { get; }

Property Value

int

Remarks

 

Vector Dimension Example

IsEmpty

Indicates if the vector is empty (unset).

bool IsEmpty { get; }

Property Value

bool

Magnitude

The length of the vector.

double Magnitude { get; set; }

Property Value

double

Remarks

 

IVector Magnitude Example

Methods

AddVector(IVector)

Construct a new vector by adding a different vector to this vector.

IVector AddVector(IVector otherVector)

Parameters

otherVector IVector

Returns

IVector

Remarks

 

IVector AddVector Example

ConstructAddVector(IVector, IVector)

Set this vector by adding two input vectors.

void ConstructAddVector(IVector vector1, IVector vector2)

Parameters

vector1 IVector
vector2 IVector

Remarks

 

IVector ConstructAddVector Example

ConstructSubtractVector(IVector, IVector)

Set this vector by subtracting the second input vector from the first one.

void ConstructSubtractVector(IVector vector1, IVector vector2)

Parameters

vector1 IVector
vector2 IVector

Remarks

 

IVector ConstructSubtractVector Example

DotProduct(IVector)

Returns the dot product of this vector and another vector.

double DotProduct(IVector otherVector)

Parameters

otherVector IVector

Returns

double

Normalize()

Normalize the vector (scale it to magnitude = 1).

void Normalize()

Remarks

Normalize is the same as Scaling the vector by 1 / Magnitude.

IVector Normalize Example

Scale(double)

Scale the vector by the given factor.

void Scale(double ScaleFactor)

Parameters

ScaleFactor double

Remarks

Scaling a Vector by 1 / Magnitude effectively Normalizes the vector and results in a unit vector.

IVector Scale Example

SetEmpty()

Makes the vector empty (unset).

void SetEmpty()

SubtractVector(IVector)

Construct a new vector by subtracting a different vector from this vector.

IVector SubtractVector(IVector otherVector)

Parameters

otherVector IVector

Returns

IVector

Remarks

 

IVector SubtractVector Example