move::vectormath::gpuvec2 struct
#include <gpuvec2.hpp>

A 2D vector that is guaranteed to be correctly laid out for GPU usage.

This is a 2D vector that is guaranteed to be correctly laid out for GPU usage. It should be used whenever a 2D vector is needed for GPU usage.

Constructors, destructors, conversion operators

gpuvec2() defaulted
gpuvec2(const gpuvec2&) defaulted
gpuvec2(gpuvec2&&) defaulted
gpuvec2(const vec2f& v)
gpuvec2(const vec2d& v)
gpuvec2(float x, float y)
Constructs a gpuvec2 with the given x and y values.
operator vec2f() const
operator vec2d() const

Public functions

auto operator=(const gpuvec2&) -> gpuvec2& defaulted
auto operator=(gpuvec2&&) -> gpuvec2& defaulted
auto as_array() -> float*

Public variables

float x
float y

Function documentation

move::vectormath::gpuvec2::gpuvec2(float x, float y)

Constructs a gpuvec2 with the given x and y values.

Parameters
x The x value of the gpuvec2.
y The y value of the gpuvec2.