Table of Contents

Class XnaVector3Extensions

Namespace
Thunder.UnitsNET.Vectors.MonoGame
Assembly
Thunder.UnitsNET.Vectors.MonoGame.dll

Extension methods for converting between XNA/MonoGame Microsoft.Xna.Framework.Vector3 and Thunder typed vector types.

public static class XnaVector3Extensions
Inheritance
XnaVector3Extensions
Inherited Members

Methods

ToAccelerationVector3(Vector3, AccelerationUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to an AccelerationVector3 with components interpreted as unit.

public static AccelerationVector3 ToAccelerationVector3(this Vector3 v, AccelerationUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit AccelerationUnit

The physical unit of the component values.

Returns

AccelerationVector3

The typed vector.

ToDoubleVector3(Vector3)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a DoubleVector3.

public static DoubleVector3 ToDoubleVector3(this Vector3 v)

Parameters

v Vector3

The XNA vector.

Returns

DoubleVector3

A DoubleVector3 with components cast to double.

ToElectricCurrentDensityVector3(Vector3, ElectricCurrentDensityUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to an ElectricCurrentDensityVector3 with components interpreted as unit.

public static ElectricCurrentDensityVector3 ToElectricCurrentDensityVector3(this Vector3 v, ElectricCurrentDensityUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit ElectricCurrentDensityUnit

The physical unit of the component values.

Returns

ElectricCurrentDensityVector3

The typed vector.

ToElectricFieldVector3(Vector3, ElectricFieldUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to an ElectricFieldVector3 with components interpreted as unit.

public static ElectricFieldVector3 ToElectricFieldVector3(this Vector3 v, ElectricFieldUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit ElectricFieldUnit

The physical unit of the component values.

Returns

ElectricFieldVector3

The typed vector.

ToForceVector3(Vector3, ForceUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a ForceVector3 with components interpreted as unit.

public static ForceVector3 ToForceVector3(this Vector3 v, ForceUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit ForceUnit

The physical unit of the component values.

Returns

ForceVector3

The typed vector.

ToImpulseVector3(Vector3, ImpulseUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to an ImpulseVector3 with components interpreted as unit.

public static ImpulseVector3 ToImpulseVector3(this Vector3 v, ImpulseUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit ImpulseUnit

The physical unit of the component values.

Returns

ImpulseVector3

The typed vector.

ToJerkVector3(Vector3, JerkUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a JerkVector3 with components interpreted as unit.

public static JerkVector3 ToJerkVector3(this Vector3 v, JerkUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit JerkUnit

The physical unit of the component values.

Returns

JerkVector3

The typed vector.

ToLengthVector3(Vector3, LengthUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a LengthVector3 with components interpreted as unit.

public static LengthVector3 ToLengthVector3(this Vector3 v, LengthUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit LengthUnit

The physical unit of the component values.

Returns

LengthVector3

The typed vector.

ToLengthVector3(Vector3, LengthUnit, Ratio)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a LengthVector3, dividing components by pixelScale before interpreting as unit.

public static LengthVector3 ToLengthVector3(this Vector3 v, LengthUnit unit, Ratio pixelScale)

Parameters

v Vector3

The XNA vector with component values in unit.

unit LengthUnit

The physical unit of the component values.

pixelScale Ratio

The display scale factor to divide out.

Returns

LengthVector3

A LengthVector3 with components divided by pixelScale and interpreted as unit.

ToMagneticFieldVector3(Vector3, MagneticFieldUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a MagneticFieldVector3 with components interpreted as unit.

public static MagneticFieldVector3 ToMagneticFieldVector3(this Vector3 v, MagneticFieldUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit MagneticFieldUnit

The physical unit of the component values.

Returns

MagneticFieldVector3

The typed vector.

ToMagnetizationVector3(Vector3, MagnetizationUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a MagnetizationVector3 with components interpreted as unit.

public static MagnetizationVector3 ToMagnetizationVector3(this Vector3 v, MagnetizationUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit MagnetizationUnit

The physical unit of the component values.

Returns

MagnetizationVector3

The typed vector.

ToMassFluxVector3(Vector3, MassFluxUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a MassFluxVector3 with components interpreted as unit.

public static MassFluxVector3 ToMassFluxVector3(this Vector3 v, MassFluxUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit MassFluxUnit

The physical unit of the component values.

Returns

MassFluxVector3

The typed vector.

ToSpeedVector3(Vector3, SpeedUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a SpeedVector3 with components interpreted as unit.

public static SpeedVector3 ToSpeedVector3(this Vector3 v, SpeedUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit SpeedUnit

The physical unit of the component values.

Returns

SpeedVector3

The typed vector.

ToTemperatureGradientVector3(Vector3, TemperatureGradientUnit)

Converts an XNA Microsoft.Xna.Framework.Vector3 to a TemperatureGradientVector3 with components interpreted as unit.

public static TemperatureGradientVector3 ToTemperatureGradientVector3(this Vector3 v, TemperatureGradientUnit unit)

Parameters

v Vector3

The XNA vector with component values in unit.

unit TemperatureGradientUnit

The physical unit of the component values.

Returns

TemperatureGradientVector3

The typed vector.

ToXnaVector3(AccelerationVector3)

Converts an AccelerationVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this AccelerationVector3 v)

Parameters

v AccelerationVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(AccelerationVector3, AccelerationUnit)

Converts an AccelerationVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this AccelerationVector3 v, AccelerationUnit unit)

Parameters

v AccelerationVector3

The typed vector.

unit AccelerationUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(DoubleVector3)

Converts a DoubleVector3 to an XNA Microsoft.Xna.Framework.Vector3.

public static Vector3 ToXnaVector3(this DoubleVector3 v)

Parameters

v DoubleVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components cast to float.

ToXnaVector3(ElectricCurrentDensityVector3)

Converts an ElectricCurrentDensityVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this ElectricCurrentDensityVector3 v)

Parameters

v ElectricCurrentDensityVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(ElectricCurrentDensityVector3, ElectricCurrentDensityUnit)

Converts an ElectricCurrentDensityVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this ElectricCurrentDensityVector3 v, ElectricCurrentDensityUnit unit)

Parameters

v ElectricCurrentDensityVector3

The typed vector.

unit ElectricCurrentDensityUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(ElectricFieldVector3)

Converts an ElectricFieldVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this ElectricFieldVector3 v)

Parameters

v ElectricFieldVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(ElectricFieldVector3, ElectricFieldUnit)

Converts an ElectricFieldVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this ElectricFieldVector3 v, ElectricFieldUnit unit)

Parameters

v ElectricFieldVector3

The typed vector.

unit ElectricFieldUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(ForceVector3)

Converts a ForceVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this ForceVector3 v)

Parameters

v ForceVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(ForceVector3, ForceUnit)

Converts a ForceVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this ForceVector3 v, ForceUnit unit)

Parameters

v ForceVector3

The typed vector.

unit ForceUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(ImpulseVector3)

Converts an ImpulseVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this ImpulseVector3 v)

Parameters

v ImpulseVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(ImpulseVector3, ImpulseUnit)

Converts an ImpulseVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this ImpulseVector3 v, ImpulseUnit unit)

Parameters

v ImpulseVector3

The typed vector.

unit ImpulseUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(JerkVector3)

Converts a JerkVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this JerkVector3 v)

Parameters

v JerkVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(JerkVector3, JerkUnit)

Converts a JerkVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this JerkVector3 v, JerkUnit unit)

Parameters

v JerkVector3

The typed vector.

unit JerkUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(LengthVector3)

Converts a LengthVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this LengthVector3 v)

Parameters

v LengthVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(LengthVector3, LengthUnit)

Converts a LengthVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this LengthVector3 v, LengthUnit unit)

Parameters

v LengthVector3

The typed vector.

unit LengthUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(LengthVector3, LengthUnit, Ratio)

Converts a LengthVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit multiplied by pixelScale.

public static Vector3 ToXnaVector3(this LengthVector3 v, LengthUnit unit, Ratio pixelScale)

Parameters

v LengthVector3

The typed vector.

unit LengthUnit

The unit to express components in before scaling.

pixelScale Ratio

Pixels per unit (or other display scale factor).

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components scaled for rendering.

ToXnaVector3(MagneticFieldVector3)

Converts a MagneticFieldVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this MagneticFieldVector3 v)

Parameters

v MagneticFieldVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(MagneticFieldVector3, MagneticFieldUnit)

Converts a MagneticFieldVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this MagneticFieldVector3 v, MagneticFieldUnit unit)

Parameters

v MagneticFieldVector3

The typed vector.

unit MagneticFieldUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(MagnetizationVector3)

Converts a MagnetizationVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this MagnetizationVector3 v)

Parameters

v MagnetizationVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(MagnetizationVector3, MagnetizationUnit)

Converts a MagnetizationVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this MagnetizationVector3 v, MagnetizationUnit unit)

Parameters

v MagnetizationVector3

The typed vector.

unit MagnetizationUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(MassFluxVector3)

Converts a MassFluxVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this MassFluxVector3 v)

Parameters

v MassFluxVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(MassFluxVector3, MassFluxUnit)

Converts a MassFluxVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this MassFluxVector3 v, MassFluxUnit unit)

Parameters

v MassFluxVector3

The typed vector.

unit MassFluxUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(SpeedVector3)

Converts a SpeedVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this SpeedVector3 v)

Parameters

v SpeedVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(SpeedVector3, SpeedUnit)

Converts a SpeedVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this SpeedVector3 v, SpeedUnit unit)

Parameters

v SpeedVector3

The typed vector.

unit SpeedUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

ToXnaVector3(TemperatureGradientVector3)

Converts a TemperatureGradientVector3 to an XNA Microsoft.Xna.Framework.Vector3 using the default SI unit.

public static Vector3 ToXnaVector3(this TemperatureGradientVector3 v)

Parameters

v TemperatureGradientVector3

The typed vector.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in the default SI unit.

ToXnaVector3(TemperatureGradientVector3, TemperatureGradientUnit)

Converts a TemperatureGradientVector3 to an XNA Microsoft.Xna.Framework.Vector3 expressed in unit.

public static Vector3 ToXnaVector3(this TemperatureGradientVector3 v, TemperatureGradientUnit unit)

Parameters

v TemperatureGradientVector3

The typed vector.

unit TemperatureGradientUnit

The unit to express components in.

Returns

Vector3

An XNA Microsoft.Xna.Framework.Vector3 with components in unit.

v0.7.0 ▼