HologramDepthmap Library
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
graphics::vec4 Struct Reference

structure for 4-dimensional real type vector and its arithmetic. More...

#include <vec.h>

Public Member Functions

 vec4 ()
 
 vec4 (real a)
 
 vec4 (real v_1, real v_2, real v_3, real v_4)
 
 vec4 (const ivec4 &a)
 
 vec4 (const vec4 &a)
 
vec4operator= (const vec4 &a)
 
realoperator[] (int i)
 
const realoperator[] (int i) const
 
realoperator() (int i)
 
const realoperator() (int i) const
 
bool is_zero () const
 
bool is_tiny (real tiny_tol=epsilon) const
 
bool unit ()
 
real length () const
 

Public Attributes

real v [4]
 

Static Public Attributes

static const int n = 4
 

Detailed Description

Definition at line 864 of file vec.h.

Constructor & Destructor Documentation

◆ vec4() [1/5]

graphics::vec4::vec4 ( )
inline

Definition at line 868 of file vec.h.

◆ vec4() [2/5]

graphics::vec4::vec4 ( real  a)
inline

Definition at line 869 of file vec.h.

◆ vec4() [3/5]

graphics::vec4::vec4 ( real  v_1,
real  v_2,
real  v_3,
real  v_4 
)
inline

Definition at line 874 of file vec.h.

◆ vec4() [4/5]

graphics::vec4::vec4 ( const ivec4 a)
inline

Definition at line 879 of file vec.h.

◆ vec4() [5/5]

graphics::vec4::vec4 ( const vec4 a)
inline

Definition at line 884 of file vec.h.

Member Function Documentation

◆ is_tiny()

bool graphics::vec4::is_tiny ( real  tiny_tol = epsilon) const
inline

Definition at line 901 of file vec.h.

◆ is_zero()

bool graphics::vec4::is_zero ( ) const
inline

Definition at line 900 of file vec.h.

◆ length()

real graphics::vec4::length ( ) const

Definition at line 353 of file vec.cpp.

◆ operator()() [1/2]

real& graphics::vec4::operator() ( int  i)
inline

Definition at line 897 of file vec.h.

◆ operator()() [2/2]

const real& graphics::vec4::operator() ( int  i) const
inline

Definition at line 898 of file vec.h.

◆ operator=()

vec4& graphics::vec4::operator= ( const vec4 a)
inline

Definition at line 889 of file vec.h.

◆ operator[]() [1/2]

real& graphics::vec4::operator[] ( int  i)
inline

Definition at line 895 of file vec.h.

◆ operator[]() [2/2]

const real& graphics::vec4::operator[] ( int  i) const
inline

Definition at line 896 of file vec.h.

◆ unit()

bool graphics::vec4::unit ( )

Definition at line 344 of file vec.cpp.

Member Data Documentation

◆ n

const int graphics::vec4::n = 4
static

Definition at line 866 of file vec.h.

◆ v

real graphics::vec4::v[4]

Definition at line 865 of file vec.h.


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