Skip to content

rtm/mask4f.h

#include "rtm/mask4f.h"

mask_get_x

uint32_t mask_get_x(mask4f input)

Returns the mask4f [x] component.

mask_get_y

uint32_t mask_get_y(mask4f input)

Returns the mask4f [y] component.

mask_get_z

uint32_t mask_get_z(mask4f input)

Returns the mask4f [z] component.

mask_get_w

uint32_t mask_get_w(mask4f input)

Returns the mask4f [w] component.

mask_all_true

bool mask_all_true(mask4f input)

Returns true if all 4 components are true, otherwise false: all(input.xyzw != 0).

mask_all_true2

bool mask_all_true2(mask4f input)

Returns true if all [xy] components are true, otherwise false: all(input.xy != 0).

mask_all_true3

bool mask_all_true3(mask4f input)

Returns true if all [xyz] components are true, otherwise false: all(input.xyz != 0).

mask_any_true

bool mask_any_true(mask4f input)

Returns true if any 4 components are true, otherwise false: any(input.xyzw != 0).

mask_any_true2

bool mask_any_true2(mask4f input)

Returns true if any [xy] components are true, otherwise false: any(input.xy != 0).

mask_any_true3

bool mask_any_true3(mask4f input)

Returns true if any [xyz] components are true, otherwise false: any(input.xyz != 0).

mask_all_equal

bool mask_all_equal(mask4f lhs, mask4f rhs)

Returns true if all 4 components are equal, otherwise false: all(lhs.xyzw == rhs.xyzw).

mask_all_equal2

bool mask_all_equal2(mask4f lhs, mask4f rhs)

Returns true if all [xy] components are equal, otherwise false: all(lhs.xy == rhs.xy).

mask_all_equal3

bool mask_all_equal3(mask4f lhs, mask4f rhs)

Returns true if all [xyz] components are equal, otherwise false: all(lhs.xyz == rhs.xyz).

mask_any_equal

bool mask_any_equal(mask4f lhs, mask4f rhs)

Returns true if any 4 components are equal, otherwise false: any(lhs.xyzw == rhs.xyzw).

mask_any_equal2

bool mask_any_equal2(mask4f lhs, mask4f rhs)

Returns true if any [xy] components are equal, otherwise false: any(lhs.xy == rhs.xy).

mask_any_equal3

bool mask_any_equal3(mask4f lhs, mask4f rhs)

Returns true if any [xyz] components are equal, otherwise false: any(lhs.xyz == rhs.xyz).

mask_and

mask4f mask_and(mask4f lhs, mask4f rhs)

Per component logical AND between the inputs: lhs & rhs.

mask_or

mask4f mask_or(mask4f lhs, mask4f rhs)

Per component logical OR between the inputs: lhs | rhs.

mask_xor

mask4f mask_xor(mask4f lhs, mask4f rhs)

Per component logical XOR between the inputs: lhs ^ rhs.

mask_not

mask4f mask_not(mask4f input)

Per component logical NOT of the input: ~input.

mask_set

mask4f mask_set(bool x, bool y, bool z, bool w)

Creates a mask4 from all 4 bool components.

The return value also converts to mask4d, mask4q and mask4i.

mask4f mask_set(uint32_t x, uint32_t y, uint32_t z, uint32_t w)

Creates a mask4 from 4 uint32 components.

The return value also converts to mask4i.

mask_true

mask4f mask_true()

Creates a mask4 with all 4 components set to true.

The return value also converts to mask4d, mask4q and mask4i.

mask_false

mask4f mask_false()

Creates a mask4 with all 4 components set to false.

The return value also converts to mask4d, mask4q and mask4i.