1.3.49
 
Loading...
Searching...
No Matches
helios::int3 Struct Reference

Vector of three elements of type 'int'. More...

#include <helios_vector_types.h>

Public Member Functions

constexpr int3 ()
 Default constructor.
 
 int3 (const std::vector< int > &v)
 Construct int3 from a vector of ints.
 
constexpr int3 (const int v[3])
 Construct int3 from an array of ints.
 
constexpr int3 (int v0, int v1, int v2)
 Construct int3 from three ints.
 
constexpr int3 operator+ (const int3 &a) const noexcept
 Add two int3 vectors.
 
int3operator+= (const int3 &a) noexcept
 Increment int3 vector.
 
int3operator-= (const int3 &a) noexcept
 Decrement int3 vector.
 
constexpr int3 operator- (const int3 &a) const noexcept
 Subtract two int3 vectors.
 
constexpr bool operator== (const int3 &a) const noexcept
 Equality for all elements.
 
constexpr bool operator!= (const int3 &a) const noexcept
 Inequality for all elements.
 
constexpr int3 operator- () const noexcept
 Multiply each element by -1.
 

Data Fields

int x
 First element in vector.
 
int y
 Second element in vector.
 
int z
 Third element in vector.
 

Friends

std::ostream & operator<< (std::ostream &os, const helios::int3 &vec)
 Write int3 to output stream.
 

Detailed Description

Vector of three elements of type 'int'.

Definition at line 147 of file helios_vector_types.h.

Constructor & Destructor Documentation

◆ int3() [1/4]

constexpr helios::int3::int3 ( )
inlineconstexpr

Default constructor.

Definition at line 158 of file helios_vector_types.h.

◆ int3() [2/4]

helios::int3::int3 ( const std::vector< int > &  v)
inlineexplicit

Construct int3 from a vector of ints.

Definition at line 162 of file helios_vector_types.h.

◆ int3() [3/4]

constexpr helios::int3::int3 ( const int  v[3])
inlineexplicitconstexpr

Construct int3 from an array of ints.

Definition at line 171 of file helios_vector_types.h.

◆ int3() [4/4]

constexpr helios::int3::int3 ( int  v0,
int  v1,
int  v2 
)
inlineconstexpr

Construct int3 from three ints.

Definition at line 175 of file helios_vector_types.h.

Member Function Documentation

◆ operator!=()

constexpr bool helios::int3::operator!= ( const int3 a) const
constexprnoexcept

Inequality for all elements.

Definition at line 235 of file helios_vector_types.h.

◆ operator+()

constexpr int3 helios::int3::operator+ ( const int3 a) const
constexprnoexcept

Add two int3 vectors.

Definition at line 209 of file helios_vector_types.h.

◆ operator+=()

int3 & helios::int3::operator+= ( const int3 a)
inlinenoexcept

Increment int3 vector.

Definition at line 213 of file helios_vector_types.h.

◆ operator-() [1/2]

constexpr int3 helios::int3::operator- ( ) const
constexprnoexcept

Multiply each element by -1.

Definition at line 239 of file helios_vector_types.h.

◆ operator-() [2/2]

constexpr int3 helios::int3::operator- ( const int3 a) const
constexprnoexcept

Subtract two int3 vectors.

Definition at line 227 of file helios_vector_types.h.

◆ operator-=()

int3 & helios::int3::operator-= ( const int3 a)
inlinenoexcept

Decrement int3 vector.

Definition at line 220 of file helios_vector_types.h.

◆ operator==()

constexpr bool helios::int3::operator== ( const int3 a) const
constexprnoexcept

Equality for all elements.

Definition at line 231 of file helios_vector_types.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const helios::int3 vec 
)
friend

Write int3 to output stream.

Definition at line 194 of file helios_vector_types.h.

Field Documentation

◆ x

int helios::int3::x

First element in vector.

Definition at line 150 of file helios_vector_types.h.

◆ y

int helios::int3::y

Second element in vector.

Definition at line 152 of file helios_vector_types.h.

◆ z

int helios::int3::z

Third element in vector.

Definition at line 154 of file helios_vector_types.h.


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