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

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

#include <vec.h>

Public Member Functions

 vec3 ()
 
 vec3 (real a)
 
 vec3 (real v_1, real v_2, real v_3)
 
 vec3 (const ivec3 &a)
 
 vec3 (const vec3 &a)
 
vec3operator= (const vec3 &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
 
int is_parallel (const vec3 &, real=angle_tolerance) const
 
bool is_perpendicular (const vec3 &, real=angle_tolerance) const
 
bool perpendicular (const vec3 &)
 
bool perpendicular (const vec3 &, const vec3 &, const vec3 &)
 

Public Attributes

real v [3]
 

Static Public Attributes

static const int n = 3
 

Detailed Description

Definition at line 444 of file vec.h.

Constructor & Destructor Documentation

◆ vec3() [1/5]

graphics::vec3::vec3 ( )
inline

Definition at line 448 of file vec.h.

◆ vec3() [2/5]

graphics::vec3::vec3 ( real  a)
inline

Definition at line 449 of file vec.h.

◆ vec3() [3/5]

graphics::vec3::vec3 ( real  v_1,
real  v_2,
real  v_3 
)
inline

Definition at line 454 of file vec.h.

◆ vec3() [4/5]

graphics::vec3::vec3 ( const ivec3 a)
inline

Definition at line 459 of file vec.h.

◆ vec3() [5/5]

graphics::vec3::vec3 ( const vec3 a)
inline

Definition at line 464 of file vec.h.

Member Function Documentation

◆ is_parallel()

int graphics::vec3::is_parallel ( const vec3 vv,
real  angle_tolerance = angle_tolerance 
) const

Definition at line 142 of file vec.cpp.

◆ is_perpendicular()

bool graphics::vec3::is_perpendicular ( const vec3 vv,
real  angle_tolerance = angle_tolerance 
) const

Definition at line 164 of file vec.cpp.

◆ is_tiny()

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

Definition at line 481 of file vec.h.

◆ is_zero()

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

Definition at line 480 of file vec.h.

◆ length()

real graphics::vec3::length ( ) const

Definition at line 137 of file vec.cpp.

◆ operator()() [1/2]

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

Definition at line 477 of file vec.h.

◆ operator()() [2/2]

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

Definition at line 478 of file vec.h.

◆ operator=()

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

Definition at line 469 of file vec.h.

◆ operator[]() [1/2]

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

Definition at line 475 of file vec.h.

◆ operator[]() [2/2]

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

Definition at line 476 of file vec.h.

◆ perpendicular() [1/2]

bool graphics::vec3::perpendicular ( const vec3 vv)

Definition at line 182 of file vec.cpp.

◆ perpendicular() [2/2]

bool graphics::vec3::perpendicular ( const vec3 P0,
const vec3 P1,
const vec3 P2 
)

Definition at line 244 of file vec.cpp.

◆ unit()

bool graphics::vec3::unit ( )

Definition at line 128 of file vec.cpp.

Member Data Documentation

◆ n

const int graphics::vec3::n = 3
static

Definition at line 446 of file vec.h.

◆ v

real graphics::vec3::v[3]

Definition at line 445 of file vec.h.


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