Geometric functions. More...
Go to the source code of this file.
Functions | |
void | min_max3 (double a1, double a2, double a3, double &min, double &max) |
Find minimum and maximum of 3 numbers. More... | |
void | min_max4 (double a1, double a2, double a3, double a4, double &min, double &max) |
Find minimum and maximum of 4 numbers. More... | |
void | min_max6 (double a1, double a2, double a3, double a4, double a5, double a6, double &min, double &max) |
Find minimum and maximum of 6 numbers. More... | |
void | min_max12 (double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9, double a10, double a11, double a12, double &min, double &max) |
Find minimum and maximum of 12 numbers. More... | |
double | angle (Vector_3< double > v1, Vector_3< double > v2) |
Compute the angle between two vectors. More... | |
double | f_angle (Vector_3< double > v1, Vector_3< double >v2) |
Compute the angle between two faces. More... | |
void | printv (const Vector_3< double > &v) |
Print a vector. More... | |
void | unit_normal (const Vector_3< double > &v1, const Vector_3< double > &v2, Vector_3< double > &v3) |
Compute the unit vector normal to two input vectors. More... | |
double | edge_length (const Vector_3< double > &v) |
Compute the edge length of a vector. More... | |
double | tri_area (const Vector_3< double > &v1, const Vector_3< double > &v2, const Vector_3< double > &v3) |
Compute the area of a triangle defined by its three sides as vectors. More... | |
double | tet_vol (const Vector_3< double > &a, const Vector_3< double > &b, const Vector_3< double > &c) |
Compute the volume of a tetrahedron given three edges from a point as vectors. More... | |
Geometric functions.
Implementation of geometric helper functions used by 2D and 3D geometric mesh quality measures.
Definition in file geometry.C.
Compute the angle between two vectors.
Definition at line 61 of file geometry.C.
References cimg_library::acos(), angle(), dot_product(), dotP(), nvc::norm2(), and sqrt().
Referenced by angle(), Geo_Metric_Base_2::compute_angles(), Geo_Metric_Base_3::compute_angles(), Rocmop::compute_medial_quadric(), FaceOffset_3::compute_quadrics(), CImg< uintT >::cone3d(), CFacet::contains_point(), CImg< uintT >::cylinder3d(), CImg< uintT >::draw_arrow(), f_angle(), and CImg< uintT >::FFT().
double edge_length | ( | const Vector_3< double > & | v | ) |
Compute the edge length of a vector.
Definition at line 89 of file geometry.C.
References sqrt().
Referenced by Geo_Metric_Base_2::compute_aspects(), Geo_Metric_Base_3::compute_aspects(), and tri_area().
Compute the angle between two faces.
Definition at line 72 of file geometry.C.
References angle().
Referenced by Geo_Metric_Base_3::compute_angles().
void min_max12 | ( | double | a1, |
double | a2, | ||
double | a3, | ||
double | a4, | ||
double | a5, | ||
double | a6, | ||
double | a7, | ||
double | a8, | ||
double | a9, | ||
double | a10, | ||
double | a11, | ||
double | a12, | ||
double & | min, | ||
double & | max | ||
) |
Find minimum and maximum of 12 numbers.
Definition at line 53 of file geometry.C.
References min_max6().
Referenced by Geo_Metric_Base_3::compute_angles().
void min_max3 | ( | double | a1, |
double | a2, | ||
double | a3, | ||
double & | min, | ||
double & | max | ||
) |
Find minimum and maximum of 3 numbers.
Definition at line 36 of file geometry.C.
Referenced by Geo_Metric_Base_2::compute_angles(), min_max4(), and min_max6().
void min_max4 | ( | double | a1, |
double | a2, | ||
double | a3, | ||
double | a4, | ||
double & | min, | ||
double & | max | ||
) |
Find minimum and maximum of 4 numbers.
Definition at line 41 of file geometry.C.
References min_max3().
Referenced by Geo_Metric_Base_2::compute_angles().
void min_max6 | ( | double | a1, |
double | a2, | ||
double | a3, | ||
double | a4, | ||
double | a5, | ||
double | a6, | ||
double & | min, | ||
double & | max | ||
) |
Find minimum and maximum of 6 numbers.
Definition at line 46 of file geometry.C.
References min_max3().
Referenced by Geo_Metric_Base_3::compute_angles(), and min_max12().
void printv | ( | const Vector_3< double > & | v | ) |
Print a vector.
Definition at line 76 of file geometry.C.
double tet_vol | ( | const Vector_3< double > & | a, |
const Vector_3< double > & | b, | ||
const Vector_3< double > & | c | ||
) |
Compute the volume of a tetrahedron given three edges from a point as vectors.
Definition at line 103 of file geometry.C.
References NTS::abs(), crossP(), and dotP().
Referenced by Geo_Metric_Base_3::compute_aspects().
double tri_area | ( | const Vector_3< double > & | v1, |
const Vector_3< double > & | v2, | ||
const Vector_3< double > & | v3 | ||
) |
Compute the area of a triangle defined by its three sides as vectors.
Definition at line 93 of file geometry.C.
References edge_length(), s, and sqrt().
Referenced by Geo_Metric_Base_3::compute_aspects().
void unit_normal | ( | const Vector_3< double > & | v1, |
const Vector_3< double > & | v2, | ||
Vector_3< double > & | v3 | ||
) |
Compute the unit vector normal to two input vectors.
Definition at line 80 of file geometry.C.
References crossP(), dotP(), and sqrt().
Referenced by Geo_Metric_Base_3::compute_angles().