Class Vector3DClass
[Guid("B3FA5973-ADA3-11D2-9FAE-00C04F8ECE3D")]
[ClassInterface(ClassInterfaceType.None)]
public class Vector3DClass : Vector3D, IVector3D, IVector, IClone, ISupportErrorInfo
- Inheritance
-
Vector3DClass
- Implements
- Inherited Members
Constructors
Vector3DClass()
public Vector3DClass()
Explicit Interface Implementations
AddVector(IVector)
Construct a new vector by adding a different vector to this vector.
virtual IVector AddVector(IVector otherVector)
Parameters
otherVectorIVector
Returns
Remarks

Assign(IClone)
Assigns the properties of src to the receiver.
virtual void Assign(IClone src)
Parameters
srcIClone
Azimuth
The vector's azimuth angle in radians.
virtual double Azimuth { get; set; }
Returns
Remarks

Clone()
Clones the receiver and assigns the result to *clone.
virtual IClone Clone()
Returns
ComponentByIndex[int]
The component corresponding to a given index.
virtual double ComponentByIndex[int componentIndex] { get; set; }
Parameters
componentIndexint
Returns
ConstructAddVector(IVector, IVector)
Set this vector by adding two input vectors.
virtual void ConstructAddVector(IVector vector1, IVector vector2)
Parameters
Remarks

ConstructCrossProduct(IVector, IVector)
Set this vector equal to the cross product of the two input vectors.
virtual void ConstructCrossProduct(IVector vector1, IVector vector2)
Parameters
ConstructDifference(IPoint, IPoint)
Set the vector by taking the difference of point1 and point2 (so the vector would go from point2 to point1).
virtual void ConstructDifference(IPoint point1, IPoint point2)
Parameters
Remarks

public IVector3D CreateVector3DTwoPoints(IPoint fromPoint, IPoint toPoint)
{
if (fromPoint.Z.Equals(Double.NaN))
{
fromPoint.Z = 0;
}
if (toPoint.Z.Equals(Double.NaN))
{
toPoint.Z = 0;
}
IVector3D vector3D = new Vector3DClass();
vector3D.ConstructDifference(fromPoint, toPoint);
return vector3D;
}
ConstructSubtractVector(IVector, IVector)
Set this vector by subtracting the second input vector from the first one.
virtual void ConstructSubtractVector(IVector vector1, IVector vector2)
Parameters
Remarks

CrossProduct(IVector)
Returns the cross product of this vector and another vector.
virtual IVector CrossProduct(IVector otherVector)
Parameters
otherVectorIVector
Returns
Dimension
The dimension of this vector.
virtual int Dimension { get; }
Returns
Remarks

DotProduct(IVector)
Returns the dot product of this vector and another vector.
virtual double DotProduct(IVector otherVector)
Parameters
otherVectorIVector
Returns
IVector3D_AddVector(IVector)
virtual IVector IVector3D_AddVector(IVector otherVector)
Parameters
otherVectorIVector
Returns
IVector3D_ComponentByIndex[int]
virtual double IVector3D_ComponentByIndex[int componentIndex] { get; set; }
Parameters
componentIndexint
Returns
IVector3D_ConstructAddVector(IVector, IVector)
virtual void IVector3D_ConstructAddVector(IVector vector1, IVector vector2)
Parameters
IVector3D_ConstructSubtractVector(IVector, IVector)
virtual void IVector3D_ConstructSubtractVector(IVector vector1, IVector vector2)
Parameters
IVector3D_Dimension
virtual int IVector3D_Dimension { get; }
Returns
IVector3D_DotProduct(IVector)
virtual double IVector3D_DotProduct(IVector otherVector)
Parameters
otherVectorIVector
Returns
IVector3D_IsEmpty
virtual bool IVector3D_IsEmpty { get; }
Returns
IVector3D_Magnitude
virtual double IVector3D_Magnitude { get; set; }
Returns
IVector3D_Normalize()
virtual void IVector3D_Normalize()
IVector3D_Scale(double)
virtual void IVector3D_Scale(double ScaleFactor)
Parameters
ScaleFactordouble
IVector3D_SetEmpty()
virtual void IVector3D_SetEmpty()
IVector3D_SubtractVector(IVector)
virtual IVector IVector3D_SubtractVector(IVector otherVector)
Parameters
otherVectorIVector
Returns
Inclination
The vector's inclination in radians.
virtual double Inclination { get; set; }
Returns
Remarks

InterfaceSupportsErrorInfo(ref Guid)
virtual void InterfaceSupportsErrorInfo(ref Guid riid)
Parameters
riidGuid
IsEmpty
Indicates if the vector is empty (unset).
virtual bool IsEmpty { get; }
Returns
IsEqual(IClone)
Indicates if the receiver and other have the same properties.
virtual bool IsEqual(IClone other)
Parameters
otherIClone
Returns
IsIdentical(IClone)
Indicates if the receiver and other are the same object.
virtual bool IsIdentical(IClone other)
Parameters
otherIClone
Returns
Magnitude
The length of the vector.
virtual double Magnitude { get; set; }
Returns
Remarks

Move(double, double, double)
Move the vector by adding a shift value to each component.
virtual void Move(double dx, double dy, double dz)
Parameters
Normalize()
Normalize the vector (scale it to magnitude = 1).
virtual void Normalize()
Remarks
Normalize is the same as Scaling the vector by 1 / Magnitude.

PolarMove(double, double, double)
Modify the vector by adding to its polar components. Angles are in radians.
virtual void PolarMove(double dAzimuth, double dInclination, double dRadius)
Parameters
PolarQuery(out double, out double, out double)
Get the vector's polar components. Angles are in radians.
virtual void PolarQuery(out double Azimuth, out double Inclination, out double radiusLength)
Parameters
Remarks

PolarSet(double, double, double)
Set the vector using polar components. Angles are in radians.
virtual void PolarSet(double Azimuth, double Inclination, double radiusLength)
Parameters
Remarks

public IVector3D CreateVector3DPolar(double azimuth, double inclination, double magnitude)
{
IVector3D vector3D = new Vector3DClass();
vector3D.PolarSet(azimuth, inclination, magnitude);
return vector3D;
}
QueryComponents(out double, out double, out double)
Get the values of the vector's components.
virtual void QueryComponents(out double dx, out double dy, out double dz)
Parameters
Remarks

Rotate(double, IVector3D)
Rotate the vector around an axis defined by another vector. The angle is in radians.
virtual void Rotate(double Angle, IVector3D axis)
Parameters
Scale(double)
Scale the vector by the given factor.
virtual void Scale(double ScaleFactor)
Parameters
ScaleFactordouble
Remarks
Scaling a Vector by 1 / Magnitude effectively Normalizes the vector and results in a unit vector.

SetComponents(double, double, double)
Set the values of the vector's components.
virtual void SetComponents(double dx, double dy, double dz)
Parameters
Remarks

public IVector3D CreateVector3D(double x, double y, double z)
{
IVector3D vector3D = new Vector3DClass();
vector3D.SetComponents(x, y, z);
return vector3D;
}
SetEmpty()
Makes the vector empty (unset).
virtual void SetEmpty()
SubtractVector(IVector)
Construct a new vector by subtracting a different vector from this vector.
virtual IVector SubtractVector(IVector otherVector)
Parameters
otherVectorIVector
Returns
Remarks

XComponent
The vector's X component.
virtual double XComponent { get; set; }
Returns
Remarks

YComponent
The vector's Y component.
virtual double YComponent { get; set; }
Returns
Remarks

ZComponent
The vector's Z component.
virtual double ZComponent { get; set; }
Returns
Remarks
