Struct VVector
Represents a displacement in 3D space.
Inherited Members
Namespace: VMS.TPS.Common.Model.Types
Assembly: VMS.TPS.Common.Model.Types.dll
Syntax
public struct VVector
Constructors
VVector(Double, Double, Double)
Constructs a VVector.
Declaration
public VVector(double xi, double yi, double zi)
Parameters
Type | Name | Description |
---|---|---|
System.Double | xi | X component. |
System.Double | yi | Y component. |
System.Double | zi | Z component. |
Properties
Item[Int32]
Indexing for the x, y and z components.
Declaration
public double this[int i] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i | Value of 0,1 or 2 that correspond to x,y and z components. |
Property Value
Type | Description |
---|---|
System.Double | Returns the given component of this VVector. |
Length
The length of the VVector.
Declaration
public double Length { get; }
Property Value
Type | Description |
---|---|
System.Double |
LengthSquared
The square of the length of the VVector.
Declaration
public double LengthSquared { get; }
Property Value
Type | Description |
---|---|
System.Double |
x
The X component of the VVector.
Declaration
public double x { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
y
The Y component of the VVector.
Declaration
public double y { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
z
The Z component of the VVector.
Declaration
public double z { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
Distance(VVector, VVector)
The distance between the locations represented by the given VVectors.
Declaration
public static double Distance(VVector left, VVector right)
Parameters
Type | Name | Description |
---|---|---|
VVector | left | First operand. |
VVector | right | Second operand |
Returns
Type | Description |
---|---|
System.Double | Returns the distance between the locations represented by the given VVectors. |
ScalarProduct(VVector)
The scalar product of this VVector and the given VVector.
Declaration
public double ScalarProduct(VVector left)
Parameters
Type | Name | Description |
---|---|---|
VVector | left | VVector that is second operand of the scalar product. |
Returns
Type | Description |
---|---|
System.Double | Returns the scalar product of this VVector with the given VVector. |
ScaleToUnitLength()
Scales this VVector so that its length becomes equal to unity.
Declaration
public void ScaleToUnitLength()
Operators
Addition(VVector, VVector)
The addition of VVectors.
Declaration
public static VVector operator +(VVector left, VVector right)
Parameters
Type | Name | Description |
---|---|---|
VVector | left | First operand. |
VVector | right | Second operand. |
Returns
Type | Description |
---|---|
VVector | Result of addition. |
Division(VVector, Double)
The division of a VVector by a double.
Declaration
public static VVector operator /(VVector val, double div)
Parameters
Type | Name | Description |
---|---|---|
VVector | val | VVector to divide. |
System.Double | div | Divisor. |
Returns
Type | Description |
---|---|
VVector | Result of division. |
Multiply(Double, VVector)
The multiplication of a VVector and a double.
Declaration
public static VVector operator *(double mul, VVector val)
Parameters
Type | Name | Description |
---|---|---|
System.Double | mul | Multiplier. |
VVector | val | VVector to multiply. |
Returns
Type | Description |
---|---|
VVector | Result of multiplication. |
Multiply(VVector, Double)
The multiplication of a VVector and a double.
Declaration
public static VVector operator *(VVector val, double mul)
Parameters
Type | Name | Description |
---|---|---|
VVector | val | VVector to multiply. |
System.Double | mul | Multiplier. |
Returns
Type | Description |
---|---|
VVector | Result of multiplication. |
Subtraction(VVector, VVector)
The subtraction of VVectors.
Declaration
public static VVector operator -(VVector left, VVector right)
Parameters
Type | Name | Description |
---|---|---|
VVector | left | First operand. |
VVector | right | Second operand. |
Returns
Type | Description |
---|---|
VVector | Result of subtraction. |