Openholo  v5.0
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 &)
 

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/5]

oph::vec3::vec3 ( )
inline

Definition at line 470 of file vec.h.

◆ vec3() [2/5]

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

Definition at line 471 of file vec.h.

◆ vec3() [3/5]

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

Definition at line 472 of file vec.h.

◆ vec3() [4/5]

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

Definition at line 473 of file vec.h.

◆ vec3() [5/5]

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

Definition at line 474 of file vec.h.

Member Function Documentation

◆ is_parallel()

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

Definition at line 187 of file vec.cpp.

◆ is_perpendicular()

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

Definition at line 209 of file vec.cpp.

◆ is_tiny()

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

Definition at line 483 of file vec.h.

◆ is_zero()

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

Definition at line 482 of file vec.h.

◆ length()

Real oph::vec3::length ( ) const

Definition at line 182 of file vec.cpp.

◆ operator()() [1/2]

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

Definition at line 479 of file vec.h.

◆ operator()() [2/2]

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

Definition at line 480 of file vec.h.

◆ operator=()

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

Definition at line 476 of file vec.h.

◆ operator[]() [1/2]

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

Definition at line 477 of file vec.h.

◆ operator[]() [2/2]

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

Definition at line 478 of file vec.h.

◆ perpendicular() [1/2]

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

Definition at line 227 of file vec.cpp.

◆ perpendicular() [2/2]

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

Definition at line 289 of file vec.cpp.

◆ unit()

bool oph::vec3::unit ( )

Definition at line 173 of file vec.cpp.

Member Data Documentation

◆ n

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

Definition at line 468 of file vec.h.

◆ v

Real oph::vec3::v[3]

Definition at line 467 of file vec.h.


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