Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Crux::Vector< T, N > Struct Template Reference

General N-dimensional fixed-size vector container. More...

#include <Vector.h>

Public Member Functions

constexpr Vector ()=default
constexpr T & operator[] (usize index)
 Access component by index.
constexpr const T & operator[] (usize index) const
 Access component by index.

Public Attributes

Data [N]
 Underlying component storage.

Detailed Description

template<typename T, usize N>
struct Crux::Vector< T, N >

General N-dimensional fixed-size vector container.

Template Parameters
TNumeric element type.
NDimension (number of components).
Note
Provides operator[] for indexed access.

Constructor & Destructor Documentation

◆ Vector()

template<typename T, usize N>
Crux::Vector< T, N >::Vector ( )
constexprdefault

Member Function Documentation

◆ operator[]() [1/2]

template<typename T, usize N>
T & Crux::Vector< T, N >::operator[] ( usize index)
inlineconstexpr

Access component by index.

Parameters
indexZero-based component index (0 <= index < N).
Returns
Reference to the component.

◆ operator[]() [2/2]

template<typename T, usize N>
const T & Crux::Vector< T, N >::operator[] ( usize index) const
inlineconstexpr

Access component by index.

Parameters
indexZero-based component index (0 <= index < N).
Returns
const Reference to the component.

Member Data Documentation

◆ Data

template<typename T, usize N>
T Crux::Vector< T, N >::Data[N]

Underlying component storage.


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