• Api Documentation
  • Source Code
Search Results for

    Show / Hide Table of Contents
    • JeremyAnsel.DirectX.D2D1
      • D2D1AlphaMode
      • D2D1AntialiasMode
      • D2D1ArcSegment
      • D2D1ArcSize
      • D2D1BezierSegment
      • D2D1Bitmap
      • D2D1BitmapBrush
      • D2D1BitmapBrushProperties
      • D2D1BitmapInterpolationMode
      • D2D1BitmapProperties
      • D2D1BitmapRenderTarget
      • D2D1Brush
      • D2D1BrushProperties
      • D2D1CapStyle
      • D2D1ColorF
      • D2D1CombineMode
      • D2D1CompatibleRenderTargetOptions
      • D2D1Constants
      • D2D1DCInitializeMode
      • D2D1DCRenderTarget
      • D2D1DashStyle
      • D2D1DebugLevel
      • D2D1DrawTextOptions
      • D2D1DrawingStateBlock
      • D2D1DrawingStateDescription
      • D2D1Ellipse
      • D2D1EllipseGeometry
      • D2D1Error
      • D2D1ExtendMode
      • D2D1Factory
      • D2D1FactoryOptions
      • D2D1FactoryType
      • D2D1FeatureLevel
      • D2D1FigureBegin
      • D2D1FigureEnd
      • D2D1FillMode
      • D2D1Gamma
      • D2D1Geometry
      • D2D1GeometryGroup
      • D2D1GeometryRelation
      • D2D1GeometrySimplificationOption
      • D2D1GeometrySink
      • D2D1GradientStop
      • D2D1GradientStopCollection
      • D2D1HwndRenderTarget
      • D2D1HwndRenderTargetProperties
      • D2D1Image
      • D2D1InterpolationModeDefinition
      • D2D1KnownColor
      • D2D1Layer
      • D2D1LayerOptions
      • D2D1LayerParameters
      • D2D1LineJoin
      • D2D1LinearGradientBrush
      • D2D1LinearGradientBrushProperties
      • D2D1Matrix3X2F
      • D2D1Matrix4X3F
      • D2D1Matrix4X4F
      • D2D1Matrix5X4F
      • D2D1Mesh
      • D2D1OpacityMaskContent
      • D2D1PathGeometry
      • D2D1PathSegmentOptions
      • D2D1PixelFormat
      • D2D1Point2F
      • D2D1Point2L
      • D2D1Point2U
      • D2D1PresentOptions
      • D2D1QuadraticBezierSegment
      • D2D1RadialGradientBrush
      • D2D1RadialGradientBrushProperties
      • D2D1RectF
      • D2D1RectL
      • D2D1RectU
      • D2D1RectangleGeometry
      • D2D1RenderTarget
      • D2D1RenderTargetProperties
      • D2D1RenderTargetType
      • D2D1RenderTargetUsages
      • D2D1Resource
      • D2D1RoundedRect
      • D2D1RoundedRectangleGeometry
      • D2D1SimplifiedGeometrySink
      • D2D1SizeF
      • D2D1SizeU
      • D2D1SolidColorBrush
      • D2D1StrokeStyle
      • D2D1StrokeStyleProperties
      • D2D1SweepDirection
      • D2D1TessellationSink
      • D2D1TextAntialiasMode
      • D2D1TransformedGeometry
      • D2D1Triangle
      • D2D1Utils
      • D2D1Vector2F
      • D2D1Vector3F
      • D2D1Vector4F
      • D2D1WindowStates
      • ID2D1Releasable
    • JeremyAnsel.DirectX.D3D10
      • D3D10CreateDeviceOptions
      • D3D10Device1
      • D3D10DriverType
      • D3D10Error
      • D3D10FeatureLevel
      • D3D10Utils
      • ID3D10Releasable
    • JeremyAnsel.DirectX.D3D11
      • D3D11AsyncGetDataOptions
      • D3D11Asynchronous
      • D3D11BindOptions
      • D3D11BlendDesc
      • D3D11BlendOperation
      • D3D11BlendState
      • D3D11BlendValue
      • D3D11Box
      • D3D11Buffer
      • D3D11BufferDesc
      • D3D11BufferExSrv
      • D3D11BufferExSrvOptions
      • D3D11BufferRtv
      • D3D11BufferSrv
      • D3D11BufferUav
      • D3D11BufferUavOptions
      • D3D11ClassInstance
      • D3D11ClassInstanceDesc
      • D3D11ClassLinkage
      • D3D11ClearOptions
      • D3D11ColorWriteEnables
      • D3D11CommandList
      • D3D11ComparisonFunction
      • D3D11ComputeShader
      • D3D11Constants
      • D3D11Counter
      • D3D11CounterDataType
      • D3D11CounterDesc
      • D3D11CounterInfo
      • D3D11CounterType
      • D3D11CpuAccessOptions
      • D3D11CreateDeviceOptions
      • D3D11CullMode
      • D3D11DepthStencilDesc
      • D3D11DepthStencilOperationDesc
      • D3D11DepthStencilState
      • D3D11DepthStencilView
      • D3D11DepthStencilViewDesc
      • D3D11DepthStencilViewOptions
      • D3D11DepthWriteMask
      • D3D11Device
      • D3D11DeviceChild
      • D3D11DeviceContext
      • D3D11DeviceContextType
      • D3D11DomainShader
      • D3D11DriverType
      • D3D11DsvDimension
      • D3D11Error
      • D3D11Feature
      • D3D11FeatureDataArchitectureInfo
      • D3D11FeatureDataD3D10XHardwareOptions
      • D3D11FeatureDataD3D11Options
      • D3D11FeatureDataD3D11Options1
      • D3D11FeatureDataD3D9Options
      • D3D11FeatureDataD3D9Options1
      • D3D11FeatureDataD3D9ShadowSupport
      • D3D11FeatureDataD3D9SimpleInstancingSupport
      • D3D11FeatureDataDoubles
      • D3D11FeatureDataFormatSupport
      • D3D11FeatureDataFormatSupport2
      • D3D11FeatureDataMarkerSupport
      • D3D11FeatureDataShaderMinPrecisionSupport
      • D3D11FeatureDataThreading
      • D3D11FeatureLevel
      • D3D11FillMode
      • D3D11Filter
      • D3D11FormatSupport
      • D3D11FormatSupport2
      • D3D11GeometryShader
      • D3D11HullShader
      • D3D11InputClassification
      • D3D11InputElementDesc
      • D3D11InputLayout
      • D3D11MapCpuPermission
      • D3D11MapOptions
      • D3D11MappedSubResource
      • D3D11PixelShader
      • D3D11Predicate
      • D3D11Primitive
      • D3D11PrimitiveTopology
      • D3D11Query
      • D3D11QueryDataPipelineStatistics
      • D3D11QueryDataStreamOutputStatistics
      • D3D11QueryDataTimestampDisjoint
      • D3D11QueryDesc
      • D3D11QueryMiscOptions
      • D3D11QueryType
      • D3D11RaiseOptions
      • D3D11RasterizerDesc
      • D3D11RasterizerState
      • D3D11Rect
      • D3D11RenderTargetBlendDesc
      • D3D11RenderTargetView
      • D3D11RenderTargetViewDesc
      • D3D11Resource
      • D3D11ResourceDimension
      • D3D11ResourceMiscOptions
      • D3D11RtvDimension
      • D3D11SamplerDesc
      • D3D11SamplerState
      • D3D11ShaderMinPrecisionSupports
      • D3D11ShaderResourceView
      • D3D11ShaderResourceViewDesc
      • D3D11SrvDimension
      • D3D11StencilOperation
      • D3D11StreamOutputDeclarationEntry
      • D3D11SubResourceData
      • D3D11Texture1D
      • D3D11Texture1DArrayDsv
      • D3D11Texture1DArrayRtv
      • D3D11Texture1DArraySrv
      • D3D11Texture1DArrayUav
      • D3D11Texture1DDesc
      • D3D11Texture1DDsv
      • D3D11Texture1DRtv
      • D3D11Texture1DSrv
      • D3D11Texture1DUav
      • D3D11Texture2D
      • D3D11Texture2DArrayDsv
      • D3D11Texture2DArrayRtv
      • D3D11Texture2DArraySrv
      • D3D11Texture2DArrayUav
      • D3D11Texture2DDesc
      • D3D11Texture2DDsv
      • D3D11Texture2DMsArrayDsv
      • D3D11Texture2DMsArrayRtv
      • D3D11Texture2DMsArraySrv
      • D3D11Texture2DMsDsv
      • D3D11Texture2DMsRtv
      • D3D11Texture2DMsSrv
      • D3D11Texture2DRtv
      • D3D11Texture2DSrv
      • D3D11Texture2DUav
      • D3D11Texture3D
      • D3D11Texture3DDesc
      • D3D11Texture3DRtv
      • D3D11Texture3DSrv
      • D3D11Texture3DUav
      • D3D11TextureAddressMode
      • D3D11TextureCubeArraySrv
      • D3D11TextureCubeFace
      • D3D11TextureCubeSrv
      • D3D11TiledResourcesTier
      • D3D11UavDimension
      • D3D11UnorderedAccessView
      • D3D11UnorderedAccessViewDesc
      • D3D11Usage
      • D3D11Utils
      • D3D11VertexShader
      • D3D11View
      • D3D11Viewport
      • D3D11WellKnownPrivateDataId
      • DxgiSwapChainExtensions
      • ID3D11Releasable
    • JeremyAnsel.DirectX.D3DCompiler
      • D3DCompile
      • D3DCompileOptions
      • D3DDisassembleOptions
      • D3DShaderMacro
      • D3DTargets
    • JeremyAnsel.DirectX.DWrite
      • DWriteBreakCondition
      • DWriteClusterMetrics
      • DWriteError
      • DWriteFactory
      • DWriteFactoryType
      • DWriteFlowDirection
      • DWriteFont
      • DWriteFontCollection
      • DWriteFontFace
      • DWriteFontFaceType
      • DWriteFontFamily
      • DWriteFontFeature
      • DWriteFontFeatureTag
      • DWriteFontFile
      • DWriteFontFileType
      • DWriteFontList
      • DWriteFontMetrics
      • DWriteFontSimulations
      • DWriteFontStretch
      • DWriteFontStyle
      • DWriteFontWeight
      • DWriteGlyphMetrics
      • DWriteGlyphOffset
      • DWriteGlyphRun
      • DWriteGlyphRunDescription
      • DWriteHitTestMetrics
      • DWriteInformationalStringId
      • DWriteInlineObjectMetrics
      • DWriteLineBreakpoint
      • DWriteLineMetrics
      • DWriteLineSpacingMethod
      • DWriteLocalizedStrings
      • DWriteMatrix
      • DWriteMeasuringMode
      • DWriteNumberSubstitutionMethod
      • DWriteOverhangMetrics
      • DWriteParagraphAlignment
      • DWritePixelGeometry
      • DWriteReadingDirection
      • DWriteRect
      • DWriteRenderingMode
      • DWriteRenderingParams
      • DWriteScriptAnalysis
      • DWriteScriptShape
      • DWriteShapingGlyphProperties
      • DWriteShapingTextProperties
      • DWriteSize
      • DWriteStrikethrough
      • DWriteTextAlignment
      • DWriteTextFormat
      • DWriteTextLayout
      • DWriteTextMetrics
      • DWriteTextRange
      • DWriteTextureType
      • DWriteTrimming
      • DWriteTrimmingGranularity
      • DWriteTypography
      • DWriteUnderline
      • DWriteUtils
      • DWriteWordWrapping
      • IDWriteReleasable
    • JeremyAnsel.DirectX.DXMath
      • XMColor
      • XMComparisonRecord
      • XMFloat2
      • XMFloat3
      • XMFloat3X3
      • XMFloat4
      • XMFloat4X3
      • XMFloat4X4
      • XMInt2
      • XMInt3
      • XMInt4
      • XMKnownColor
      • XMMath
      • XMMatrix
      • XMPermutation
      • XMPlane
      • XMQuaternion
      • XMScalar
      • XMSelection
      • XMSwizzle
      • XMUInt2
      • XMUInt3
      • XMUInt4
      • XMVector
      • XMVector2
      • XMVector3
      • XMVector4
    • JeremyAnsel.DirectX.DXMath.Collision
      • BoundingBox
      • BoundingFrustum
      • BoundingOrientedBox
      • BoundingSphere
      • ContainmentType
      • PlaneIntersectionType
      • TriangleTest
    • JeremyAnsel.DirectX.DXMath.PackedVector
      • Half
      • XMByte2
      • XMByte4
      • XMByteN2
      • XMByteN4
      • XMColorRgba
      • XMDec4
      • XMDecN4
      • XMFloat3Packed
      • XMFloat3SharedExponent
      • XMHalf2
      • XMHalf4
      • XMShort2
      • XMShort4
      • XMShortN2
      • XMShortN4
      • XMU555
      • XMU565
      • XMUByte2
      • XMUByte4
      • XMUByteN2
      • XMUByteN4
      • XMUDec4
      • XMUDecN4
      • XMUDecN4XR
      • XMUNibble4
      • XMUShort2
      • XMUShort4
      • XMUShortN2
      • XMUShortN4
      • XMXDec4
      • XMXDecN4
    • JeremyAnsel.DirectX.Dxgi
      • DxgiAdapter
      • DxgiAdapter1
      • DxgiAdapter2
      • DxgiAdapter3
      • DxgiAdapterDesc
      • DxgiAdapterDesc1
      • DxgiAdapterDesc2
      • DxgiAdapterType
      • DxgiAlphaMode
      • DxgiColorRgb
      • DxgiColorRgba
      • DxgiComputePreemptionGranularity
      • DxgiCpuAccess
      • DxgiCreateFactoryOptions
      • DxgiDevice
      • DxgiDevice1
      • DxgiDevice2
      • DxgiDevice3
      • DxgiDeviceSubObject
      • DxgiEnumModes
      • DxgiError
      • DxgiFactory
      • DxgiFactory1
      • DxgiFactory2
      • DxgiFactory3
      • DxgiFormat
      • DxgiFrameStatistics
      • DxgiGammaControl
      • DxgiGammaControlCapabilities
      • DxgiGraphicsPreemptionGranularity
      • DxgiKeyedMutex
      • DxgiMapOptions
      • DxgiMappedRect
      • DxgiMatrix3x2F
      • DxgiModeDesc
      • DxgiModeDesc1
      • DxgiModeRotation
      • DxgiModeScaling
      • DxgiModeScanlineOrder
      • DxgiObject
      • DxgiOfferResourcePriority
      • DxgiOutput
      • DxgiOutput1
      • DxgiOutput2
      • DxgiOutput3
      • DxgiOutputDesc
      • DxgiPoint
      • DxgiPresentOptions
      • DxgiRational
      • DxgiRect
      • DxgiResidency
      • DxgiResource
      • DxgiResource1
      • DxgiResource2
      • DxgiResource3
      • DxgiResourceEvictionPriority
      • DxgiSampleDesc
      • DxgiScaling
      • DxgiSharedResource
      • DxgiSharedResourceAccess
      • DxgiSurface
      • DxgiSurface1
      • DxgiSurface2
      • DxgiSurface3
      • DxgiSurfaceDesc
      • DxgiSwapChain
      • DxgiSwapChain1
      • DxgiSwapChain2
      • DxgiSwapChain3
      • DxgiSwapChainDesc
      • DxgiSwapChainDesc1
      • DxgiSwapChainFullscreenDesc
      • DxgiSwapChainOptions
      • DxgiSwapEffect
      • DxgiUsages
      • DxgiUtils
      • DxgiWindowAssociationOptions
      • IDxgiReleasable

    Class XMVector3

    The 3D vector functions provided by DirectXMath.

    Inheritance
    object
    XMVector3
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: JeremyAnsel.DirectX.DXMath
    Assembly: JeremyAnsel.DirectX.DXMath.dll
    Syntax
    public static class XMVector3

    Methods

    | Edit this page View Source

    AngleBetweenNormals(XMVector, XMVector)

    Computes the radian angle between two normalized 3D vectors.

    Declaration
    public static XMVector AngleBetweenNormals(XMVector n1, XMVector n2)
    Parameters
    Type Name Description
    XMVector n1

    The first normalized vector.

    XMVector n2

    The second normalized vector.

    Returns
    Type Description
    XMVector

    Returns a vector. The radian angle between N1 and N2 is replicated to each of the components.

    | Edit this page View Source

    AngleBetweenNormalsEst(XMVector, XMVector)

    Estimates the radian angle between two normalized 3D vectors.

    Declaration
    public static XMVector AngleBetweenNormalsEst(XMVector n1, XMVector n2)
    Parameters
    Type Name Description
    XMVector n1

    The first normalized vector.

    XMVector n2

    The second normalized vector.

    Returns
    Type Description
    XMVector

    Returns a vector. The estimate of the radian angle (between N1 and N2) is replicated to each of the components.

    | Edit this page View Source

    AngleBetweenVectors(XMVector, XMVector)

    Computes the radian angle between two 3D vectors.

    Declaration
    public static XMVector AngleBetweenVectors(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    XMVector

    Returns a vector. The radian angle between V1 and V2 is replicated to each of the components.

    | Edit this page View Source

    ClampLength(XMVector, float, float)

    Clamps the length of a 3D vector to a given range.

    Declaration
    public static XMVector ClampLength(XMVector v, float lengthMin, float lengthMax)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    float lengthMin

    The minimum clamp length.

    float lengthMax

    The maximum clamp length.

    Returns
    Type Description
    XMVector

    Returns a 3D vector whose length is clamped to the specified minimum and maximum.

    | Edit this page View Source

    ClampLengthV(XMVector, XMVector, XMVector)

    Clamps the length of a 3D vector to a given range.

    Declaration
    public static XMVector ClampLengthV(XMVector v, XMVector lengthMin, XMVector lengthMax)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    XMVector lengthMin

    A 3D vector whose x, y, and z-components are equal to the minimum clamp length. The x, y, and z-components must be greater-than-or-equal to zero.

    XMVector lengthMax

    A 3D vector whose x, y, and z-components are equal to the maximum clamp length. The x, y, and z-components must be greater-than-or-equal to zero.

    Returns
    Type Description
    XMVector

    Returns a 3D vector whose length is clamped to the specified minimum and maximum.

    | Edit this page View Source

    ComponentsFromNormal(out XMVector, out XMVector, XMVector, XMVector)

    Using a reference normal vector, splits a 3D vector into components that are parallel and perpendicular to the normal.

    Declaration
    public static void ComponentsFromNormal(out XMVector parallel, out XMVector perpendicular, XMVector v, XMVector normal)
    Parameters
    Type Name Description
    XMVector parallel

    The component of V that is parallel to Normal.

    XMVector perpendicular

    The component of V that is perpendicular to Normal.

    XMVector v

    The vector to break into components.

    XMVector normal

    The reference normal vector.

    | Edit this page View Source

    Cross(XMVector, XMVector)

    Computes the cross product between two 3D vectors.

    Declaration
    public static XMVector Cross(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    XMVector

    Returns the cross product of V1 and V2.

    | Edit this page View Source

    Dot(XMVector, XMVector)

    Computes the dot product between 3D vectors.

    Declaration
    public static XMVector Dot(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    XMVector

    Returns a vector. The dot product between V1 and V2 is replicated into each component.

    | Edit this page View Source

    Equal(XMVector, XMVector)

    Tests whether two 3D vectors are equal.

    Declaration
    public static bool Equal(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    bool

    Returns true if the 3D vectors are equal and false otherwise.

    | Edit this page View Source

    EqualInt(XMVector, XMVector)

    Tests whether two 3D vectors are equal, treating each component as an unsigned integer.

    Declaration
    public static bool EqualInt(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    bool

    Returns true if the 3D vectors are equal and false otherwise.

    | Edit this page View Source

    EqualIntR(XMVector, XMVector)

    Tests whether two 3D vectors are equal, treating each component as an unsigned integer. In addition, this function returns a comparison value.

    Declaration
    public static XMComparisonRecord EqualIntR(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    XMComparisonRecord

    Returns a comparison value.

    | Edit this page View Source

    EqualR(XMVector, XMVector)

    Tests whether two 3D vectors are equal. In addition, this function returns a comparison value.

    Declaration
    public static XMComparisonRecord EqualR(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    XMComparisonRecord

    Returns a comparison value.

    | Edit this page View Source

    Greater(XMVector, XMVector)

    Tests whether one 3D vector is greater than another 3D vector.

    Declaration
    public static bool Greater(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    bool

    Returns true if V1 is greater than V2 and false otherwise.

    | Edit this page View Source

    GreaterOrEqual(XMVector, XMVector)

    Tests whether one 3D vector is greater-than-or-equal-to another 3D vector.

    Declaration
    public static bool GreaterOrEqual(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    bool

    Returns true if V1 is greater-than-or-equal-to V2 and false otherwise.

    | Edit this page View Source

    GreaterOrEqualR(XMVector, XMVector)

    Tests whether one 3D vector is greater-than-or-equal-to another 3D vector and returns a comparison value.

    Declaration
    public static XMComparisonRecord GreaterOrEqualR(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    XMComparisonRecord

    Returns a comparison value.

    | Edit this page View Source

    GreaterR(XMVector, XMVector)

    Tests whether one 3D vector is greater than another 3D vector and returns a comparison value.

    Declaration
    public static XMComparisonRecord GreaterR(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    XMComparisonRecord

    Returns a comparison value.

    | Edit this page View Source

    InBounds(XMVector, XMVector)

    Tests whether the components of a 3D vector are within set bounds.

    Declaration
    public static bool InBounds(XMVector v, XMVector bounds)
    Parameters
    Type Name Description
    XMVector v

    The vector to test.

    XMVector bounds

    The vector that determines the bounds.

    Returns
    Type Description
    bool

    Returns true if both the x, y, and z-components of V are within the set bounds, and false otherwise.

    | Edit this page View Source

    InverseRotate(XMVector, XMVector)

    Rotates a 3D vector using the inverse of a quaternion.

    Declaration
    public static XMVector InverseRotate(XMVector v, XMVector rotationQuaternion)
    Parameters
    Type Name Description
    XMVector v

    The vector to rotate.

    XMVector rotationQuaternion

    The quaternion that describes the inverse of the rotation to apply to the vector.

    Returns
    Type Description
    XMVector

    Returns the rotated 3D vector.

    | Edit this page View Source

    IsInfinite(XMVector)

    Tests whether any component of a 3D vector is positive or negative infinity.

    Declaration
    public static bool IsInfinite(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    bool

    Returns true if any component of V is positive or negative infinity, and false otherwise.

    | Edit this page View Source

    IsNaN(XMVector)

    Tests whether any component of a 3D vector is a NaN.

    Declaration
    public static bool IsNaN(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    bool

    Returns true if any component of V is a NaN, and false otherwise.

    | Edit this page View Source

    Length(XMVector)

    Computes the length of a 3D vector.

    Declaration
    public static XMVector Length(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    XMVector

    Returns a vector. The length of V is replicated into each component.

    | Edit this page View Source

    LengthEst(XMVector)

    Estimates the length of a 3D vector.

    Declaration
    public static XMVector LengthEst(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    XMVector

    Returns a vector, each of whose components are estimates of the length of V.

    | Edit this page View Source

    LengthSquare(XMVector)

    Computes the square of the length of a 3D vector.

    Declaration
    public static XMVector LengthSquare(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    XMVector

    Returns a vector. The square of the length of V is replicated into each component.

    | Edit this page View Source

    Less(XMVector, XMVector)

    Tests whether one 3D vector is less than another 3D vector.

    Declaration
    public static bool Less(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The fist vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    bool

    Returns true if V1 is less than V2 and false otherwise.

    | Edit this page View Source

    LessOrEqual(XMVector, XMVector)

    Tests whether one 3D vector is less-than-or-equal-to another 3D vector.

    Declaration
    public static bool LessOrEqual(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    bool

    Returns true if V1 is less-than-or-equal-to V2 and false otherwise.

    | Edit this page View Source

    LinePointDistance(XMVector, XMVector, XMVector)

    Computes the minimum distance between a line and a point.

    Declaration
    public static XMVector LinePointDistance(XMVector linePoint1, XMVector linePoint2, XMVector point)
    Parameters
    Type Name Description
    XMVector linePoint1

    The first point on the line.

    XMVector linePoint2

    The second point on the line.

    XMVector point

    The reference point.

    Returns
    Type Description
    XMVector

    Returns a vector. The minimum distance between the line and the point is replicated to each of the components.

    | Edit this page View Source

    NearEqual(XMVector, XMVector, XMVector)

    Tests whether one 3D vector is near another 3D vector.

    Declaration
    public static bool NearEqual(XMVector v1, XMVector v2, XMVector epsilon)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    XMVector epsilon

    Tolerance value used for judging equality.

    Returns
    Type Description
    bool

    Returns true if V1 is near V2 and false otherwise.

    | Edit this page View Source

    Normalize(XMVector)

    Returns the normalized version of a 3D vector.

    Declaration
    public static XMVector Normalize(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    XMVector

    Returns the normalized version of V.

    | Edit this page View Source

    NormalizeEst(XMVector)

    Estimates the normalized version of a 3D vector.

    Declaration
    public static XMVector NormalizeEst(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    XMVector

    Returns an estimate of the normalized version of V.

    | Edit this page View Source

    NotEqual(XMVector, XMVector)

    Tests whether two 3D vectors are not equal.

    Declaration
    public static bool NotEqual(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    bool

    Returns true if the 3D vectors are not equal and false otherwise.

    | Edit this page View Source

    NotEqualInt(XMVector, XMVector)

    Test whether two 3D vectors are not equal, treating each component as an unsigned integer.

    Declaration
    public static bool NotEqualInt(XMVector v1, XMVector v2)
    Parameters
    Type Name Description
    XMVector v1

    The first vector.

    XMVector v2

    The second vector.

    Returns
    Type Description
    bool

    Returns true if the 3D vectors are not equal and false otherwise.

    | Edit this page View Source

    Orthogonal(XMVector)

    Computes a vector perpendicular to a 3D vector.

    Declaration
    public static XMVector Orthogonal(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    XMVector

    Returns a 3D vector orthogonal to V.

    | Edit this page View Source

    Project(XMVector, float, float, float, float, float, float, XMMatrix, XMMatrix, XMMatrix)

    Project a 3D vector from object space into screen space.

    Declaration
    public static XMVector Project(XMVector v, float viewportX, float viewportY, float viewportWidth, float viewportHeight, float viewportMinZ, float viewportMaxZ, XMMatrix projection, XMMatrix view, XMMatrix world)
    Parameters
    Type Name Description
    XMVector v

    The vector in object space that will be projected into screen space.

    float viewportX

    Pixel coordinate of the upper-left corner of the viewport. Unless you want to render to a subset of the surface, this parameter can be set to 0.

    float viewportY

    Pixel coordinate of the upper-left corner of the viewport on the render-target surface. Unless you want to render to a subset of the surface, this parameter can be set to 0.

    float viewportWidth

    Width dimension of the clip volume, in pixels. Unless you are rendering only to a subset of the surface, this parameter should be set to the width dimension of the render-target surface.

    float viewportHeight

    Height dimension of the clip volume, in pixels. Unless you are rendering only to a subset of the surface, this parameter should be set to the height dimension of the render-target surface.

    float viewportMinZ

    Together with ViewportMaxZ, value describing the range of depth values into which a scene is to be rendered, the minimum and maximum values of the clip volume. Most applications set this value to 0.0f. Clipping is performed after applying the projection matrix.

    float viewportMaxZ

    Together with MinZ, value describing the range of depth values into which a scene is to be rendered, the minimum and maximum values of the clip volume. Most applications set this value to 1.0f. Clipping is performed after applying the projection matrix.

    XMMatrix projection

    Projection matrix.

    XMMatrix view

    View matrix.

    XMMatrix world

    World matrix.

    Returns
    Type Description
    XMVector

    Returns a vector in screen space.

    | Edit this page View Source

    ReciprocalLength(XMVector)

    Computes the reciprocal of the length of a 3D vector.

    Declaration
    public static XMVector ReciprocalLength(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    XMVector

    Returns a vector. The reciprocal of the length of V is replicated into each of the returned vector's components.

    | Edit this page View Source

    ReciprocalLengthEst(XMVector)

    Estimates the reciprocal of the length of a 3D vector.

    Declaration
    public static XMVector ReciprocalLengthEst(XMVector v)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    Returns
    Type Description
    XMVector

    Returns a vector, each of whose components are estimates of the reciprocal of the length of V.

    | Edit this page View Source

    Reflect(XMVector, XMVector)

    Reflects an incident 3D vector across a 3D normal vector.

    Declaration
    public static XMVector Reflect(XMVector incident, XMVector normal)
    Parameters
    Type Name Description
    XMVector incident

    The incident vector to reflect.

    XMVector normal

    The normal vector to reflect the incident vector across.

    Returns
    Type Description
    XMVector

    Returns the reflected incident angle.

    | Edit this page View Source

    Refract(XMVector, XMVector, float)

    Refracts an incident 3D vector across a 3D normal vector.

    Declaration
    public static XMVector Refract(XMVector incident, XMVector normal, float refractionIndex)
    Parameters
    Type Name Description
    XMVector incident

    The incident vector to refract.

    XMVector normal

    The normal vector to refract the incident vector through.

    float refractionIndex

    The index of refraction.

    Returns
    Type Description
    XMVector

    Returns the refracted incident vector.

    | Edit this page View Source

    RefractV(XMVector, XMVector, XMVector)

    Refracts an incident 3D vector across a 3D normal vector.

    Declaration
    public static XMVector RefractV(XMVector incident, XMVector normal, XMVector refractionIndex)
    Parameters
    Type Name Description
    XMVector incident

    The incident vector to refract.

    XMVector normal

    The normal vector to refract the incident vector through.

    XMVector refractionIndex

    A vector whose x, y, and z-components are equal to the index of refraction.

    Returns
    Type Description
    XMVector

    Returns the refracted incident vector.

    | Edit this page View Source

    Rotate(XMVector, XMVector)

    Rotates a 3D vector using a quaternion.

    Declaration
    public static XMVector Rotate(XMVector v, XMVector rotationQuaternion)
    Parameters
    Type Name Description
    XMVector v

    The vector to rotate.

    XMVector rotationQuaternion

    The quaternion that describes the rotation to apply to the vector.

    Returns
    Type Description
    XMVector

    The rotated 3D vector.

    | Edit this page View Source

    Transform(XMVector, XMMatrix)

    Transforms a 3D vector by a matrix.

    Declaration
    public static XMVector Transform(XMVector v, XMMatrix m)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    XMMatrix m

    The transformation matrix.

    Returns
    Type Description
    XMVector

    Returns the transformed vector.

    | Edit this page View Source

    TransformCoord(XMVector, XMMatrix)

    Transforms a 3D vector by a given matrix, projecting the result back into w = 1.

    Declaration
    public static XMVector TransformCoord(XMVector v, XMMatrix m)
    Parameters
    Type Name Description
    XMVector v

    The vector.

    XMMatrix m

    The transformation matrix.

    Returns
    Type Description
    XMVector

    Returns the transformed vector.

    | Edit this page View Source

    TransformNormal(XMVector, XMMatrix)

    Transforms the 3D vector normal by the given matrix.

    Declaration
    public static XMVector TransformNormal(XMVector v, XMMatrix m)
    Parameters
    Type Name Description
    XMVector v

    The normal vector.

    XMMatrix m

    The transformation matrix.

    Returns
    Type Description
    XMVector

    Returns the transformed vector.

    | Edit this page View Source

    Unproject(XMVector, float, float, float, float, float, float, XMMatrix, XMMatrix, XMMatrix)

    Projects a 3D vector from screen space into object space.

    Declaration
    public static XMVector Unproject(XMVector v, float viewportX, float viewportY, float viewportWidth, float viewportHeight, float viewportMinZ, float viewportMaxZ, XMMatrix projection, XMMatrix view, XMMatrix world)
    Parameters
    Type Name Description
    XMVector v

    The vector in screen space that will be projected into object space.

    float viewportX

    Pixel coordinate of the upper-left corner of the viewport. Unless you want to render to a subset of the surface, this parameter can be set to 0.

    float viewportY

    Pixel coordinate of the upper-left corner of the viewport on the render-target surface. Unless you want to render to a subset of the surface, this parameter can be set to 0.

    float viewportWidth

    Width dimension of the clip volume, in pixels. Unless you are rendering only to a subset of the surface, this parameter should be set to the width dimension of the render-target surface.

    float viewportHeight

    Height dimension of the clip volume, in pixels. Unless you are rendering only to a subset of the surface, this parameter should be set to the height dimension of the render-target surface.

    float viewportMinZ

    Together with ViewportMaxZ, value describing the range of depth values into which a scene is to be rendered, the minimum and maximum values of the clip volume. Most applications set this value to 0.0f. Clipping is performed after applying the projection matrix.

    float viewportMaxZ

    Together with MinZ, value describing the range of depth values into which a scene is to be rendered, the minimum and maximum values of the clip volume. Most applications set this value to 1.0f. Clipping is performed after applying the projection matrix.

    XMMatrix projection

    Projection matrix.

    XMMatrix view

    View matrix.

    XMMatrix world

    World matrix.

    Returns
    Type Description
    XMVector

    Returns a vector in object space.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright (c) 2014-2022 Jérémy Ansel