Class XnaVector3Extensions
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
vVector3The XNA vector with component values in
unit.unitAccelerationUnitThe 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
vVector3The 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
vVector3The XNA vector with component values in
unit.unitElectricCurrentDensityUnitThe 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
vVector3The XNA vector with component values in
unit.unitElectricFieldUnitThe 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
vVector3The XNA vector with component values in
unit.unitForceUnitThe 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
vVector3The XNA vector with component values in
unit.unitImpulseUnitThe 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
vVector3The XNA vector with component values in
unit.unitJerkUnitThe 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
vVector3The XNA vector with component values in
unit.unitLengthUnitThe 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
vVector3The XNA vector with component values in
unit.unitLengthUnitThe physical unit of the component values.
pixelScaleRatioThe display scale factor to divide out.
Returns
- LengthVector3
A LengthVector3 with components divided by
pixelScaleand interpreted asunit.
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
vVector3The XNA vector with component values in
unit.unitMagneticFieldUnitThe 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
vVector3The XNA vector with component values in
unit.unitMagnetizationUnitThe 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
vVector3The XNA vector with component values in
unit.unitMassFluxUnitThe 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
vVector3The XNA vector with component values in
unit.unitSpeedUnitThe 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
vVector3The XNA vector with component values in
unit.unitTemperatureGradientUnitThe 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
vAccelerationVector3The 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
vAccelerationVector3The typed vector.
unitAccelerationUnitThe 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
vDoubleVector3The 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
vElectricCurrentDensityVector3The 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
vElectricCurrentDensityVector3The typed vector.
unitElectricCurrentDensityUnitThe 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
vElectricFieldVector3The 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
vElectricFieldVector3The typed vector.
unitElectricFieldUnitThe 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
vForceVector3The 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
vForceVector3The typed vector.
unitForceUnitThe 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
vImpulseVector3The 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
vImpulseVector3The typed vector.
unitImpulseUnitThe 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
vJerkVector3The 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
vJerkVector3The typed vector.
unitJerkUnitThe 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
vLengthVector3The 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
vLengthVector3The typed vector.
unitLengthUnitThe 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
vLengthVector3The typed vector.
unitLengthUnitThe unit to express components in before scaling.
pixelScaleRatioPixels 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
vMagneticFieldVector3The 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
vMagneticFieldVector3The typed vector.
unitMagneticFieldUnitThe 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
vMagnetizationVector3The 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
vMagnetizationVector3The typed vector.
unitMagnetizationUnitThe 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
vMassFluxVector3The 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
vMassFluxVector3The typed vector.
unitMassFluxUnitThe 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
vSpeedVector3The 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
vSpeedVector3The typed vector.
unitSpeedUnitThe 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
vTemperatureGradientVector3The 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
vTemperatureGradientVector3The typed vector.
unitTemperatureGradientUnitThe unit to express components in.
Returns
- Vector3
An XNA Microsoft.Xna.Framework.Vector3 with components in
unit.