3PL_ALWAYS_INLINE plSimdVec4u::plSimdVec4u()
5#if PL_ENABLED(PL_MATH_CHECK_FOR_NAN)
10PL_ALWAYS_INLINE plSimdVec4u::plSimdVec4u(plUInt32 xyzw)
15PL_ALWAYS_INLINE plSimdVec4u::plSimdVec4u(plUInt32 x, plUInt32 y, plUInt32 z, plUInt32 w)
25PL_ALWAYS_INLINE
void plSimdVec4u::Set(plUInt32 xyzw)
30PL_ALWAYS_INLINE
void plSimdVec4u::Set(plUInt32 x, plUInt32 y, plUInt32 z, plUInt32 w)
35PL_ALWAYS_INLINE
void plSimdVec4u::SetZero()
41PL_ALWAYS_INLINE plSimdVec4i::plSimdVec4i(
const plSimdVec4u& u)
42 : m_v(u.m_v.x, u.m_v.y, u.m_v.z, u.m_v.w)
46PL_ALWAYS_INLINE plSimdVec4u::plSimdVec4u(
const plSimdVec4i& i)
47 : m_v(i.m_v.x, i.m_v.y, i.m_v.z, i.m_v.w)
51PL_ALWAYS_INLINE
plSimdVec4f plSimdVec4u::ToFloat()
const
54 result.m_v.x = (float)m_v.x;
55 result.m_v.y = (float)m_v.y;
56 result.m_v.z = (float)m_v.z;
57 result.m_v.w = (float)m_v.w;
68 result.m_v.x = (plUInt32)clampedF.m_v.x;
69 result.m_v.y = (plUInt32)clampedF.m_v.y;
70 result.m_v.z = (plUInt32)clampedF.m_v.z;
71 result.m_v.w = (plUInt32)clampedF.m_v.w;
77PL_ALWAYS_INLINE plUInt32 plSimdVec4u::GetComponent()
const
82PL_ALWAYS_INLINE plUInt32 plSimdVec4u::x()
const
87PL_ALWAYS_INLINE plUInt32 plSimdVec4u::y()
const
92PL_ALWAYS_INLINE plUInt32 plSimdVec4u::z()
const
97PL_ALWAYS_INLINE plUInt32 plSimdVec4u::w()
const
102template <plSwizzle::Enum s>
103PL_ALWAYS_INLINE
plSimdVec4u plSimdVec4u::Get()
const
107 const plUInt32* v = &m_v.x;
108 result.m_v.x = v[(s & 0x3000) >> 12];
109 result.m_v.y = v[(s & 0x0300) >> 8];
110 result.m_v.z = v[(s & 0x0030) >> 4];
111 result.m_v.w = v[(s & 0x0003)];
134 result.m_v.x = m_v.x | v.m_v.x;
135 result.m_v.y = m_v.y | v.m_v.y;
136 result.m_v.z = m_v.z | v.m_v.z;
137 result.m_v.w = m_v.w | v.m_v.w;
145 result.m_v.x = m_v.x & v.m_v.x;
146 result.m_v.y = m_v.y & v.m_v.y;
147 result.m_v.z = m_v.z & v.m_v.z;
148 result.m_v.w = m_v.w & v.m_v.w;
156 result.m_v.x = m_v.x ^ v.m_v.x;
157 result.m_v.y = m_v.y ^ v.m_v.y;
158 result.m_v.z = m_v.z ^ v.m_v.z;
159 result.m_v.w = m_v.w ^ v.m_v.w;
164PL_ALWAYS_INLINE
plSimdVec4u plSimdVec4u::operator~()
const
167 result.m_v.x = ~m_v.x;
168 result.m_v.y = ~m_v.y;
169 result.m_v.z = ~m_v.z;
170 result.m_v.w = ~m_v.w;
175PL_ALWAYS_INLINE
plSimdVec4u plSimdVec4u::operator<<(plUInt32 uiShift)
const
178 result.m_v.x = m_v.x << uiShift;
179 result.m_v.y = m_v.y << uiShift;
180 result.m_v.z = m_v.z << uiShift;
181 result.m_v.w = m_v.w << uiShift;
186PL_ALWAYS_INLINE
plSimdVec4u plSimdVec4u::operator>>(plUInt32 uiShift)
const
189 result.m_v.x = m_v.x >> uiShift;
190 result.m_v.y = m_v.y >> uiShift;
191 result.m_v.z = m_v.z >> uiShift;
192 result.m_v.w = m_v.w >> uiShift;
236PL_ALWAYS_INLINE
plSimdVec4u& plSimdVec4u::operator<<=(plUInt32 uiShift)
245PL_ALWAYS_INLINE
plSimdVec4u& plSimdVec4u::operator>>=(plUInt32 uiShift)
267 result[0] = m_v.x == v.m_v.x;
268 result[1] = m_v.y == v.m_v.y;
269 result[2] = m_v.z == v.m_v.z;
270 result[3] = m_v.w == v.m_v.w;
272 return plSimdVec4b(result[0], result[1], result[2], result[3]);
277 return !(*
this == v);
288 result[0] = m_v.x < v.m_v.x;
289 result[1] = m_v.y < v.m_v.y;
290 result[2] = m_v.z < v.m_v.z;
291 result[3] = m_v.w < v.m_v.w;
293 return plSimdVec4b(result[0], result[1], result[2], result[3]);
304 result[0] = m_v.x > v.m_v.x;
305 result[1] = m_v.y > v.m_v.y;
306 result[2] = m_v.z > v.m_v.z;
307 result[3] = m_v.w > v.m_v.w;
309 return plSimdVec4b(result[0], result[1], result[2], result[3]);
A 4-component SIMD vector class.
Definition SimdVec4f.h:8
static plSimdVec4f MakeZero()
Creates an plSimdVec4f that is initialized to zero.
Definition SimdVec4f_inl.h:8
A SIMD 4-component vector class of signed 32b integers.
Definition SimdVec4i.h:9
A SIMD 4-component vector class of unsigned 32b integers.
Definition SimdVec4u.h:7
static plSimdVec4u MakeZero()
Creates an plSimdVec4u that is initialized to zero.
Definition FPUVec4u_inl.h:313
A 4-component vector class.
Definition Vec4.h:9
const plVec4Template< Type > CompMin(const plVec4Template< Type > &rhs) const
Returns the component-wise minimum of *this and rhs.
Definition Vec4_inl.h:327
void SetZero()
Sets the vector to all zero.
Definition Vec4_inl.h:139
static plVec4Template< Type > MakeZero()
Returns a vector with all components set to zero.
Definition Vec4.h:41
void Set(Type xyzw)
Sets all 4 components to this value.
Definition Vec4_inl.h:121
const plVec4Template< Type > CompMul(const plVec4Template< Type > &rhs) const
Returns the component-wise multiplication of *this and rhs.
Definition Vec4_inl.h:355
const plVec4Template< Type > CompMax(const plVec4Template< Type > &rhs) const
Returns the component-wise maximum of *this and rhs.
Definition Vec4_inl.h:336