Interface IVector
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
componentIndexint
Property Value
Dimension
The dimension of this vector.
int Dimension { get; }
Property Value
Remarks

IsEmpty
Indicates if the vector is empty (unset).
bool IsEmpty { get; }
Property Value
Magnitude
The length of the vector.
double Magnitude { get; set; }
Property Value
Remarks

Methods
AddVector(IVector)
Construct a new vector by adding a different vector to this vector.
IVector AddVector(IVector otherVector)
Parameters
otherVectorIVector
Returns
Remarks

ConstructAddVector(IVector, IVector)
Set this vector by adding two input vectors.
void ConstructAddVector(IVector vector1, IVector vector2)
Parameters
Remarks

ConstructSubtractVector(IVector, IVector)
Set this vector by subtracting the second input vector from the first one.
void ConstructSubtractVector(IVector vector1, IVector vector2)
Parameters
Remarks

DotProduct(IVector)
Returns the dot product of this vector and another vector.
double DotProduct(IVector otherVector)
Parameters
otherVectorIVector
Returns
Normalize()
Normalize the vector (scale it to magnitude = 1).
void Normalize()
Remarks
Normalize is the same as Scaling the vector by 1 / Magnitude.

Scale(double)
Scale the vector by the given factor.
void Scale(double ScaleFactor)
Parameters
ScaleFactordouble
Remarks
Scaling a Vector by 1 / Magnitude effectively Normalizes the vector and results in a unit vector.

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
otherVectorIVector
Returns
Remarks
