Programming Reference for VirtualLab Fusion  2022.1
Static Public Member Functions | List of all members
VL_Math Class Reference

This class provides various mathematical functions. More...

Static Public Member Functions

static Complex Acos (this Complex complex)
 Returns the angle that is the arc cosine of the specified complex number. More...
 
static Complex Asin (this Complex complex)
 Returns the angle that is the arc sine of the specified complex number. More...
 
static Position IntersectionLineAndPlane (PositionedLine line, OrientedPlane plane, out PositionRelationOfGeometricalObjects relation)
 Calculates the intersection of a line and a plane. Both have to be defined in reference to the same coordinate system. More...
 
static double PointToLineDistance (Position position, PositionedLine line)
 Calculates the distance from one position to a line. More...
 
static double PointToLineDistance (Vector3D point, PositionedLine line)
 Calculates the distance from one point to a line. More...
 
static double PointToPlaneDistance (Position position, OrientedPlane plane)
 Calculates the positive distance from one point to a plane. More...
 
static double PointToPlaneDistance (Vector3D point, OrientedPlane plane)
 Calculates the positive distance from one point to a plane. More...
 
static double PointToPointDistance (Position position1, Position position2)
 Calculates the absolute value of the distance between two positions. More...
 
static double PointToPointDistance (Vector3D position1, Vector3D position2)
 Calculates the absolute value of the distance between two positions. More...
 

Detailed Description

This class provides various mathematical functions.

Member Function Documentation

◆ Acos()

static Complex Acos ( this Complex  complex)
static

Returns the angle that is the arc cosine of the specified complex number.

Parameters
complexA complex number that represents a cosine.
Returns
The angle, measured in radians, which is the arc cosine of the given complex.

◆ Asin()

static Complex Asin ( this Complex  complex)
static

Returns the angle that is the arc sine of the specified complex number.

Parameters
complexA complex number that represents a sine.
Returns
The angle, measured in radians, which is the arc sine of the given complex.

◆ IntersectionLineAndPlane()

static Position IntersectionLineAndPlane ( PositionedLine  line,
OrientedPlane  plane,
out PositionRelationOfGeometricalObjects  relation 
)
static

Calculates the intersection of a line and a plane. Both have to be defined in reference to the same coordinate system.

Parameters
lineLine to search the intersection with plane for.
planePlane to search the intersection with line for.
relationReturns the type of position relation between the line and the plane.
Returns
The position of the intersection referring to the same coordinate system the line and plane are defined in.

◆ PointToLineDistance() [1/2]

static double PointToLineDistance ( Position  position,
PositionedLine  line 
)
static

Calculates the distance from one position to a line.

Parameters
positionPosition to calculate the distance to the line for. It has to refer to the same reference coordinate system as the line.
lineLine to calculate the distance to the point for.
Returns
Distance from point to line.

◆ PointToLineDistance() [2/2]

static double PointToLineDistance ( Vector3D  point,
PositionedLine  line 
)
static

Calculates the distance from one point to a line.

Parameters
pointPosition to calculate the distance to the line for. It is assumed the coordinates refer to the same reference coordinate system as the line.
lineLine to calculate the distance to the point for.
Returns
Distance from point to line.

◆ PointToPlaneDistance() [1/2]

static double PointToPlaneDistance ( Position  position,
OrientedPlane  plane 
)
static

Calculates the positive distance from one point to a plane.

Parameters
positionPosition to calculate the distance to the plane for. It has to refer to the same reference coordinate system as the plane.
planePlane to calculate the distance to the point for.
Returns
Positive distance from point to plane.

◆ PointToPlaneDistance() [2/2]

static double PointToPlaneDistance ( Vector3D  point,
OrientedPlane  plane 
)
static

Calculates the positive distance from one point to a plane.

Parameters
pointPosition to calculate the distance to the plane for. It is assumed the coordinates refer to the same reference coordinate system as the plane.
planePlane to calculate the distance to the point for.
Returns
Positive distance from point to plane.

◆ PointToPointDistance() [1/2]

static double PointToPointDistance ( Position  position1,
Position  position2 
)
static

Calculates the absolute value of the distance between two positions.

Parameters
position1Position to calculate the distance to position2 for. It has to refer to the same reference coordinate system as the other position.
position2Position to calculate the distance to position1 for. It has to refer to the same reference coordinate system as the other position.
Returns
Absolute value of the distance vector between position1 and position2.

◆ PointToPointDistance() [2/2]

static double PointToPointDistance ( Vector3D  position1,
Vector3D  position2 
)
static

Calculates the absolute value of the distance between two positions.

Parameters
position1Position to calculate the distance to position2 for. It is assumed the coordinates refer to the same reference coordinate system as the other position.
position2Position to calculate the distance to position1 for. It is assumed the coordinates refer to the same reference coordinate system as the other position.
Returns
Absolute value of the distance vector between position1 and position2.