Open Search
    Vector2f64 Class Reference

    #include <sse_vector_2f64.h>

    Detailed Description

    The class and the default constructor are always defined. The functions of this class are only defined when C4D_HAS_SSE2_CAPABILITY is set. Instances of this class must be aligned to 16 bytes. The layout in the memory is as follows: address + 0 + 1 R0 R1

    Public Types

    using ValueType = Float64
     

    Public Member Functions

     Vector2f64 ()=default
     
    MAXON_ATTRIBUTE_FORCE_INLINE Vector2f64 (Float64 d0, Float64 d1)
     
    MAXON_ATTRIBUTE_FORCE_INLINE Vector2f64 (const Float64 *p, Bool aligned)
     
    MAXON_ATTRIBUTE_FORCE_INLINE void LoadUnaligned (const Float64 *p)
     
    MAXON_ATTRIBUTE_FORCE_INLINE void LoadAligned (const Float64 *p)
     
    MAXON_ATTRIBUTE_FORCE_INLINE void LoadSingle (const double *p)
     

    Static Public Member Functions

    template<int mb1, int ma1>
    static MAXON_ATTRIBUTE_FORCE_INLINE Vector2f64 Shuffle (const Vector2f64 &a)
     

    Protected Attributes

    Float64 v [2]
     

    Friends

    Vector4f32 ConvertToVector4f32 (const Vector2f64 &a, const Vector2f64 &b)
     
    Vector4f32 ConvertToVector4f32 (const Vector2f64 &a)
     
    void ConvertToVectors2f64 (const Vector4f32 &a, Vector2f64 &result1, Vector2f64 &result2)
     
    MAXON_ATTRIBUTE_FORCE_INLINE friend Vector2f64 operator+ (const Vector2f64 &a, const Vector2f64 &b)
     
    MAXON_ATTRIBUTE_FORCE_INLINE friend Vector2f64 operator* (const Vector2f64 &a, const Vector2f64 &b)
     

    Member Typedef Documentation

    ◆ ValueType

    using ValueType = Float64

    Constructor & Destructor Documentation

    ◆ Vector2f64() [1/3]

    Vector2f64 ( )
    default

    Constructs the object. It does not set a default value.

    ◆ Vector2f64() [2/3]

    Constructs the object and sets all values to f0...f3.

    Parameters
    [in]d0The value that is assigned to vector element 0.
    [in]d1The value that is assigned to vector element 1.

    ◆ Vector2f64() [3/3]

    MAXON_ATTRIBUTE_FORCE_INLINE Vector2f64 ( const Float64 p,
    Bool  aligned 
    )
    explicit

    Constructs a vector from an address in the memory.

    Parameters
    [in]pThe address where the vector is loaded from.
    [in]alignedShould be set to true, if p is known to be 16-byte aligned.

    Member Function Documentation

    ◆ LoadUnaligned()

    MAXON_ATTRIBUTE_FORCE_INLINE void LoadUnaligned ( const Float64 p)

    Loads a vector from an address in the memory.

    Parameters
    [in]pThe address where the vector is loaded from.

    ◆ LoadAligned()

    MAXON_ATTRIBUTE_FORCE_INLINE void LoadAligned ( const Float64 p)

    Loads a vector from an address in the memory.

    Parameters
    [in]pThe address where the vector is loaded from. It must be 16-byte aligned.

    ◆ LoadSingle()

    MAXON_ATTRIBUTE_FORCE_INLINE void LoadSingle ( const double *  p)

    Loads a single value from an address in the memory to the lower value of the vector. The upper part is set to zero.

    Parameters
    [in]pThe address where the vector is loaded from.

    ◆ Shuffle()

    static MAXON_ATTRIBUTE_FORCE_INLINE Vector2f64 Shuffle ( const Vector2f64 a)
    static

    Shuffles the components of the input vectors. Note that the template arguments must be numeric constants and be either 0 or 1.

    Parameters
    [in]aInput vector A.
    Template Parameters
    ma1Decides which element of vector A becomes the new R0.
    mb1Decides which element of vector B becomes the new R0.
    Returns
    A vector consisting of R0=A[ma1], R1=B[mb1]

    Friends And Related Function Documentation

    ◆ ConvertToVector4f32 [1/2]

    Vector4f32 ConvertToVector4f32 ( const Vector2f64 a,
    const Vector2f64 b 
    )
    friend

    Converts two Vector2f64 to a Vector4f32 vector.

    Returns
    A Vector4f32 vector.

    ◆ ConvertToVector4f32 [2/2]

    Vector4f32 ConvertToVector4f32 ( const Vector2f64 a)
    friend

    Converts one Vector2f64 to a Vector4f32 vector.

    Returns
    A Vector4f32 vector. The two lower values are the converted members from the source vector, the two upper values are zero.

    ◆ ConvertToVectors2f64

    void ConvertToVectors2f64 ( const Vector4f32 a,
    Vector2f64 result1,
    Vector2f64 result2 
    )
    friend

    ◆ operator+

    MAXON_ATTRIBUTE_FORCE_INLINE friend Vector2f64 operator+ ( const Vector2f64 a,
    const Vector2f64 b 
    )
    friend

    Adds two vectors.

    Parameters
    [in]aThe first operand.
    [in]bThe second operand.
    Returns
    The sum of a and b.

    ◆ operator*

    MAXON_ATTRIBUTE_FORCE_INLINE friend Vector2f64 operator* ( const Vector2f64 a,
    const Vector2f64 b 
    )
    friend

    Multiplies two vectors.

    Parameters
    [in]aThe first operand.
    [in]bThe second operand.
    Returns
    The sum of a and b.

    Member Data Documentation

    ◆ v

    Float64 v[2]
    protected