Vector2f64 Class Reference

#include <sse_vector_2f64.h>

详细描述

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

公共成员函数

  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)

静态公共成员函数

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

构造函数 & 析构函数文档编制

◆  Vector2f64() [1/3]

Vector2f64 ( )
default

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

◆  Vector2f64() [2/3]

MAXON_ATTRIBUTE_FORCE_INLINE Vector2f64 ( Float64   d0 ,
Float64   d1  
)
explicit

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

参数
[in] d0 The value that is assigned to vector element 0.
[in] d1 The 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.

参数
[in] p The address where the vector is loaded from.
[in] aligned Should be set to true, if #p is known to be 16-byte aligned.

成员函数文档编制

◆  LoadUnaligned()

MAXON_ATTRIBUTE_FORCE_INLINE void LoadUnaligned ( const Float64 p )

Loads a vector from an address in the memory.

参数
[in] p The 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.

参数
[in] p The 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.

参数
[in] p The 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.

参数
[in] a Input vector A.
Template Parameters
ma1 Decides which element of vector A becomes the new R0.
mb1 Decides which element of vector B becomes the new R0.
返回
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 Vector4f32 vector.

返回
A Vector4f32 vector.

◆  ConvertToVector4f32 [2/2]

Vector4f32 ConvertToVector4f32 ( const Vector2f64 a )
friend

Converts one Vector2f64 Vector4f32 vector.

返回
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.

参数
[in] a The first operand.
[in] b The second operand.
返回
The sum of a and b.

◆  operator*

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

Multiplies two vectors.

参数
[in] a The first operand.
[in] b The second operand.
返回
The sum of a and b.

Member Data Documentation

◆  v

Float64 v[2]
protected