ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
Loading...
Searching...
No Matches
vec4 Union Reference

Four-component single-precision vector. Component layout matches GLSL vec4. More...

#include <Mathlib.h>

Data Fields

float xyzw [4]
 Array accessor.
 
struct { 
 
   float   x 
 
   float   y 
 
   float   z 
 
   float   w 
 
};  
 Component accessors.
 
vec3 xyz
 Swizzle to vec3.
 
struct { 
 
   vec2   xy 
 
   vec2   zw 
 
};  
 Swizzles to vec2.
 

Detailed Description

Four-component single-precision vector. Component layout matches GLSL vec4.

.xyz swizzles to vec3; .xy and .zw swizzle to vec2.

Field Documentation

◆ [struct]

struct { ... } vec4

Component accessors.

◆ [struct]

struct { ... } vec4

Swizzles to vec2.

◆ w

float vec4::w

◆ x

float vec4::x

◆ xy

vec2 vec4::xy

◆ xyz

vec3 vec4::xyz

Swizzle to vec3.

◆ xyzw

float vec4::xyzw[4]

Array accessor.

◆ y

float vec4::y

◆ z

float vec4::z

◆ zw

vec2 vec4::zw

The documentation for this union was generated from the following file: