Openholo  v4.2
Open Source Digital Holographic Library
oph::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 &)
 
 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 &)
 
 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 &)
 
 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

structure for 3-dimensional Real type vector and its arithmetic.

Definition at line 466 of file vec.h.

Constructor & Destructor Documentation

◆ vec3() [1/20]

oph::vec3::vec3 ( )
inline

Definition at line 470 of file vec.h.

◆ vec3() [2/20]

oph::vec3::vec3 ( Real  a)
inline

Definition at line 471 of file vec.h.

◆ vec3() [3/20]

oph::vec3::vec3 ( Real  v_1,
Real  v_2,
Real  v_3 
)
inline

Definition at line 472 of file vec.h.

◆ vec3() [4/20]

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

Definition at line 473 of file vec.h.

◆ vec3() [5/20]

oph::vec3::vec3 ( const vec3 a)
inline

Definition at line 474 of file vec.h.

◆ vec3() [6/20]

oph::vec3::vec3 ( )
inline

Definition at line 470 of file vec.h.

◆ vec3() [7/20]

oph::vec3::vec3 ( Real  a)
inline

Definition at line 471 of file vec.h.

◆ vec3() [8/20]

oph::vec3::vec3 ( Real  v_1,
Real  v_2,
Real  v_3 
)
inline

Definition at line 472 of file vec.h.

◆ vec3() [9/20]

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

Definition at line 473 of file vec.h.

◆ vec3() [10/20]

oph::vec3::vec3 ( const vec3 a)
inline

Definition at line 474 of file vec.h.

◆ vec3() [11/20]

oph::vec3::vec3 ( )
inline

Definition at line 470 of file vec.h.

◆ vec3() [12/20]

oph::vec3::vec3 ( Real  a)
inline

Definition at line 471 of file vec.h.

◆ vec3() [13/20]

oph::vec3::vec3 ( Real  v_1,
Real  v_2,
Real  v_3 
)
inline

Definition at line 472 of file vec.h.

◆ vec3() [14/20]

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

Definition at line 473 of file vec.h.

◆ vec3() [15/20]

oph::vec3::vec3 ( const vec3 a)
inline

Definition at line 474 of file vec.h.

◆ vec3() [16/20]

oph::vec3::vec3 ( )
inline

Definition at line 470 of file vec.h.

◆ vec3() [17/20]

oph::vec3::vec3 ( Real  a)
inline

Definition at line 471 of file vec.h.

◆ vec3() [18/20]

oph::vec3::vec3 ( Real  v_1,
Real  v_2,
Real  v_3 
)
inline

Definition at line 472 of file vec.h.

◆ vec3() [19/20]

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

Definition at line 473 of file vec.h.

◆ vec3() [20/20]

oph::vec3::vec3 ( const vec3 a)
inline

Definition at line 474 of file vec.h.

Member Function Documentation

◆ is_parallel() [1/4]

int oph::vec3::is_parallel ( const vec3 vv,
Real  angle_tolerance = angle_tolerance 
) const

Definition at line 187 of file vec.cpp.

◆ is_parallel() [2/4]

int oph::vec3::is_parallel ( const vec3 ,
Real  = angle_tolerance 
) const

◆ is_parallel() [3/4]

int oph::vec3::is_parallel ( const vec3 ,
Real  = angle_tolerance 
) const

◆ is_parallel() [4/4]

int oph::vec3::is_parallel ( const vec3 ,
Real  = angle_tolerance 
) const

◆ is_perpendicular() [1/4]

bool oph::vec3::is_perpendicular ( const vec3 ,
Real  = angle_tolerance 
) const

◆ is_perpendicular() [2/4]

bool oph::vec3::is_perpendicular ( const vec3 vv,
Real  angle_tolerance = angle_tolerance 
) const

Definition at line 209 of file vec.cpp.

◆ is_perpendicular() [3/4]

bool oph::vec3::is_perpendicular ( const vec3 ,
Real  = angle_tolerance 
) const

◆ is_perpendicular() [4/4]

bool oph::vec3::is_perpendicular ( const vec3 ,
Real  = angle_tolerance 
) const

◆ is_tiny() [1/4]

bool oph::vec3::is_tiny ( Real  tiny_tol = epsilon) const
inline

Definition at line 483 of file vec.h.

◆ is_tiny() [2/4]

bool oph::vec3::is_tiny ( Real  tiny_tol = epsilon) const
inline

Definition at line 483 of file vec.h.

◆ is_tiny() [3/4]

bool oph::vec3::is_tiny ( Real  tiny_tol = epsilon) const
inline

Definition at line 483 of file vec.h.

◆ is_tiny() [4/4]

bool oph::vec3::is_tiny ( Real  tiny_tol = epsilon) const
inline

Definition at line 483 of file vec.h.

◆ is_zero() [1/4]

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

Definition at line 482 of file vec.h.

◆ is_zero() [2/4]

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

Definition at line 482 of file vec.h.

◆ is_zero() [3/4]

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

Definition at line 482 of file vec.h.

◆ is_zero() [4/4]

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

Definition at line 482 of file vec.h.

◆ length() [1/4]

Real oph::vec3::length ( ) const

◆ length() [2/4]

Real oph::vec3::length ( ) const

◆ length() [3/4]

Real oph::vec3::length ( ) const

Definition at line 182 of file vec.cpp.

◆ length() [4/4]

Real oph::vec3::length ( ) const

◆ operator()() [1/8]

Real& oph::vec3::operator() ( int  i)
inline

Definition at line 479 of file vec.h.

◆ operator()() [2/8]

Real& oph::vec3::operator() ( int  i)
inline

Definition at line 479 of file vec.h.

◆ operator()() [3/8]

Real& oph::vec3::operator() ( int  i)
inline

Definition at line 479 of file vec.h.

◆ operator()() [4/8]

Real& oph::vec3::operator() ( int  i)
inline

Definition at line 479 of file vec.h.

◆ operator()() [5/8]

const Real& oph::vec3::operator() ( int  i) const
inline

Definition at line 480 of file vec.h.

◆ operator()() [6/8]

const Real& oph::vec3::operator() ( int  i) const
inline

Definition at line 480 of file vec.h.

◆ operator()() [7/8]

const Real& oph::vec3::operator() ( int  i) const
inline

Definition at line 480 of file vec.h.

◆ operator()() [8/8]

const Real& oph::vec3::operator() ( int  i) const
inline

Definition at line 480 of file vec.h.

◆ operator=() [1/4]

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

Definition at line 476 of file vec.h.

◆ operator=() [2/4]

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

Definition at line 476 of file vec.h.

◆ operator=() [3/4]

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

Definition at line 476 of file vec.h.

◆ operator=() [4/4]

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

Definition at line 476 of file vec.h.

◆ operator[]() [1/8]

Real& oph::vec3::operator[] ( int  i)
inline

Definition at line 477 of file vec.h.

◆ operator[]() [2/8]

Real& oph::vec3::operator[] ( int  i)
inline

Definition at line 477 of file vec.h.

◆ operator[]() [3/8]

Real& oph::vec3::operator[] ( int  i)
inline

Definition at line 477 of file vec.h.

◆ operator[]() [4/8]

Real& oph::vec3::operator[] ( int  i)
inline

Definition at line 477 of file vec.h.

◆ operator[]() [5/8]

const Real& oph::vec3::operator[] ( int  i) const
inline

Definition at line 478 of file vec.h.

◆ operator[]() [6/8]

const Real& oph::vec3::operator[] ( int  i) const
inline

Definition at line 478 of file vec.h.

◆ operator[]() [7/8]

const Real& oph::vec3::operator[] ( int  i) const
inline

Definition at line 478 of file vec.h.

◆ operator[]() [8/8]

const Real& oph::vec3::operator[] ( int  i) const
inline

Definition at line 478 of file vec.h.

◆ perpendicular() [1/8]

bool oph::vec3::perpendicular ( const vec3 )

◆ perpendicular() [2/8]

bool oph::vec3::perpendicular ( const vec3 )

◆ perpendicular() [3/8]

bool oph::vec3::perpendicular ( const vec3 )

◆ perpendicular() [4/8]

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

Definition at line 227 of file vec.cpp.

◆ perpendicular() [5/8]

bool oph::vec3::perpendicular ( const vec3 ,
const vec3 ,
const vec3  
)

◆ perpendicular() [6/8]

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

Definition at line 289 of file vec.cpp.

◆ perpendicular() [7/8]

bool oph::vec3::perpendicular ( const vec3 ,
const vec3 ,
const vec3  
)

◆ perpendicular() [8/8]

bool oph::vec3::perpendicular ( const vec3 ,
const vec3 ,
const vec3  
)

◆ unit() [1/4]

bool oph::vec3::unit ( )

◆ unit() [2/4]

bool oph::vec3::unit ( )

Definition at line 173 of file vec.cpp.

◆ unit() [3/4]

bool oph::vec3::unit ( )

◆ unit() [4/4]

bool oph::vec3::unit ( )

Member Data Documentation

◆ n

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

Definition at line 468 of file vec.h.

◆ v

Real oph::vec3::v

Definition at line 467 of file vec.h.


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