ofDocsdocumentation glm gtxsimd_vec4 (functions)

gtxsimd_vec4 (functions)


glm::abs( ... )

detail::fvec4SIMD glm::abs(const detail::fvec4SIMD &x)

glm::ceil( ... )

detail::fvec4SIMD glm::ceil(const detail::fvec4SIMD &x)

Returns a value equal to the nearest integer that is greater than or equal to x.

See also: gtx_simd_vec4


glm::clamp( ... )

detail::fvec4SIMD glm::clamp(const detail::fvec4SIMD &x, const detail::fvec4SIMD &minVal, const detail::fvec4SIMD &maxVal)

Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal and maxVal.

See also: gtx_simd_vec4


glm::clamp( ... )

detail::fvec4SIMD glm::clamp(const detail::fvec4SIMD &x, const float &minVal, const float &maxVal)

glm::cross( ... )

detail::fvec4SIMD glm::cross(const detail::fvec4SIMD &x, const detail::fvec4SIMD &y)

Returns the cross product of x and y.

See also: gtx_simd_vec4


glm::distance( ... )

float glm::distance(const detail::fvec4SIMD &p0, const detail::fvec4SIMD &p1)

Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).

See also: gtx_simd_vec4


glm::distance4( ... )

detail::fvec4SIMD glm::distance4(const detail::fvec4SIMD &p0, const detail::fvec4SIMD &p1)

Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).

See also: gtx_simd_vec4


glm::dot4( ... )

detail::fvec4SIMD glm::dot4(const detail::fvec4SIMD &x, const detail::fvec4SIMD &y)

Returns the dot product of x and y, i.e., result = x * y.

See also: gtx_simd_vec4


glm::fastInversesqrt( ... )

detail::fvec4SIMD glm::fastInversesqrt(const detail::fvec4SIMD &x)

Returns the reciprocal of the positive square root of x. Faster than inversesqrt but less accurate.

See also: gtx_simd_vec4


glm::fastLength( ... )

float glm::fastLength(const detail::fvec4SIMD &x)

Returns the length of x, i.e., sqrt(x * x). Less accurate but much faster than simdLength.

See also: gtx_simd_vec4


glm::fastLength4( ... )

detail::fvec4SIMD glm::fastLength4(const detail::fvec4SIMD &x)

Returns the length of x, i.e., sqrt(x * x). Less accurate but much faster than simdLength4.

See also: gtx_simd_vec4


glm::fastNormalize( ... )

detail::fvec4SIMD glm::fastNormalize(const detail::fvec4SIMD &x)

Returns a vector in the same direction as x but with length of 1. Less accurate but much faster than simdNormalize.

See also: gtx_simd_vec4


glm::fastSqrt( ... )

detail::fvec4SIMD glm::fastSqrt(const detail::fvec4SIMD &x)

Returns the positive square root of x Less accurate but much faster than sqrt.

See also: gtx_simd_vec4


glm::floor( ... )

detail::fvec4SIMD glm::floor(const detail::fvec4SIMD &x)

Returns a value equal to the nearest integer that is less then or equal to x.

See also: gtx_simd_vec4


glm::fma( ... )

detail::fvec4SIMD glm::fma(const detail::fvec4SIMD &a, const detail::fvec4SIMD &b, const detail::fvec4SIMD &c)

Computes and returns a * b + c.

See also: gtx_simd_vec4


glm::fract( ... )

detail::fvec4SIMD glm::fract(const detail::fvec4SIMD &x)

Return x - floor(x).

See also: gtx_simd_vec4


glm::inversesqrt( ... )

detail::fvec4SIMD glm::inversesqrt(const detail::fvec4SIMD &x)

Returns the reciprocal of the positive square root of x.

See also: gtx_simd_vec4


glm::length( ... )

float glm::length(const detail::fvec4SIMD &x)

Returns the length of x, i.e., sqrt(x * x).

See also: gtx_simd_vec4


glm::length4( ... )

detail::fvec4SIMD glm::length4(const detail::fvec4SIMD &x)

Returns the length of x, i.e., sqrt(x * x).

See also: gtx_simd_vec4


glm::max( ... )

detail::fvec4SIMD glm::max(const detail::fvec4SIMD &x, const detail::fvec4SIMD &y)

Returns y if x < y; otherwise, it returns x.

See also: gtx_simd_vec4


glm::max( ... )

detail::fvec4SIMD glm::max(const detail::fvec4SIMD &x, const float &y)

glm::min( ... )

detail::fvec4SIMD glm::min(const detail::fvec4SIMD &x, const detail::fvec4SIMD &y)

Returns y if y < x; otherwise, it returns x.

See also: gtx_simd_vec4


glm::min( ... )

detail::fvec4SIMD glm::min(const detail::fvec4SIMD &x, const float &y)

glm::mix( ... )

detail::fvec4SIMD glm::mix(const detail::fvec4SIMD &x, const detail::fvec4SIMD &y, const detail::fvec4SIMD &a)

\return If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1].

\return If genTypeU is a boolean scalar or vector: Selects which vector each returned component comes from. For a component of a that is false, the corresponding component of x is returned. For a component of a that is true, the corresponding component of y is returned. Components of x and y that are not selected are allowed to be invalid floating point values and will have no effect on the results. Thus, this provides different functionality than genType mix(genType x, genType y, genType(a)) where a is a Boolean vector.

From GLSL 1.30.08 specification, section 8.3

\param[in] x Floating point scalar or vector. \param[in] y Floating point scalar or vector. \param[in] a Floating point or boolean scalar or vector.

\todo Test when 'a' is a boolean.

See also: gtx_simd_vec4


glm::mod( ... )

detail::fvec4SIMD glm::mod(const detail::fvec4SIMD &x, const detail::fvec4SIMD &y)

Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.

See also: gtx_simd_vec4


glm::mod( ... )

detail::fvec4SIMD glm::mod(const detail::fvec4SIMD &x, const float &y)

Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.

See also: gtx_simd_vec4


glm::niceLength( ... )

float glm::niceLength(const detail::fvec4SIMD &x)

Returns the length of x, i.e., sqrt(x * x). Slightly more accurate but much slower than simdLength.

See also: gtx_simd_vec4


glm::niceLength4( ... )

detail::fvec4SIMD glm::niceLength4(const detail::fvec4SIMD &x)

Returns the length of x, i.e., sqrt(x * x). Slightly more accurate but much slower than simdLength4.

See also: gtx_simd_vec4


glm::niceSqrt( ... )

detail::fvec4SIMD glm::niceSqrt(const detail::fvec4SIMD &x)

Returns the positive square root of x with the nicest quality but very slow. Slightly more accurate but much slower than simdSqrt.

See also: gtx_simd_vec4


glm::normalize( ... )

detail::fvec4SIMD glm::normalize(const detail::fvec4SIMD &x)

Returns a vector in the same direction as x but with length of 1.

See also: gtx_simd_vec4


glm::reflect( ... )

detail::fvec4SIMD glm::reflect(const detail::fvec4SIMD &I, const detail::fvec4SIMD &N)

For the incident vector I and surface orientation N, returns the reflection direction : result = I - 2.0 * dot(N, I) * N.

See also: gtx_simd_vec4


glm::refract( ... )

detail::fvec4SIMD glm::refract(const detail::fvec4SIMD &I, const detail::fvec4SIMD &N, const float &eta)

For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector.

See also: gtx_simd_vec4


glm::round( ... )

detail::fvec4SIMD glm::round(const detail::fvec4SIMD &x)

Returns a value equal to the nearest integer to x. The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest. This includes the possibility that round(x) returns the same value as roundEven(x) for all values of x.

See also: gtx_simd_vec4


glm::sign( ... )

detail::fvec4SIMD glm::sign(const detail::fvec4SIMD &x)

glm::simdDot( ... )

float glm::simdDot(const detail::fvec4SIMD &x, const detail::fvec4SIMD &y)

Returns the dot product of x and y, i.e., result = x * y.

See also: gtx_simd_vec4


glm::simdFaceforward( ... )

detail::fvec4SIMD glm::simdFaceforward(const detail::fvec4SIMD &N, const detail::fvec4SIMD &I, const detail::fvec4SIMD &Nref)

If dot(Nref, I) < 0.0, return N, otherwise, return -N.

See also: gtx_simd_vec4


glm::smoothstep( ... )

detail::fvec4SIMD glm::smoothstep(const detail::fvec4SIMD &edge0, const detail::fvec4SIMD &edge1, const detail::fvec4SIMD &x)

glm::smoothstep( ... )

detail::fvec4SIMD glm::smoothstep(const float &edge0, const float &edge1, const detail::fvec4SIMD &x)

glm::sqrt( ... )

detail::fvec4SIMD glm::sqrt(const detail::fvec4SIMD &x)

Returns the positive square root of x.

See also: gtx_simd_vec4


glm::step( ... )

detail::fvec4SIMD glm::step(const detail::fvec4SIMD &edge, const detail::fvec4SIMD &x)

Returns 0.0 if x < edge, otherwise it returns 1.0.

See also: gtx_simd_vec4


glm::step( ... )

detail::fvec4SIMD glm::step(const float &edge, const detail::fvec4SIMD &x)

glm::trunc( ... )

detail::fvec4SIMD glm::trunc(const detail::fvec4SIMD &x)

Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolute value of x.

See also: gtx_simd_vec4


glm::vec4_cast( ... )

glm::vec4 glm::vec4_cast(const detail::fvec4SIMD &x)

Convert a simdVec4 to a vec4.

See also: gtx_simd_vec4