29 #ifndef __GEOMETRY_H__
30 #define __GEOMETRY_H__
39 void min_max3(
double a1,
double a2,
double a3,
double &
min,
43 void min_max4(
double a1,
double a2,
double a3,
double a4,
47 void min_max6(
double a1,
double a2,
double a3,
double a4,
48 double a5,
double a6,
double &
min,
double &
max);
51 void min_max12(
double a1,
double a2,
double a3,
double a4,
52 double a5,
double a6,
double a7,
double a8,
53 double a9,
double a10,
double a11,
double a12,
66 return (v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2]);
73 v3[0]= (v1[1]*v2[2]-v2[1]*v1[2]); v3[1]= (v2[0]*v1[2]-v1[0]*v2[2]);
74 v3[2]= (v1[0]*v2[1]-v2[0]*v1[1]);
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
void min_max4(double a1, double a2, double a3, double a4, double &min, double &max)
Find minimum and maximum of 4 numbers.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE v
double f_angle(Vector_3< double > v1, Vector_3< double >v2)
Compute the angle between two faces.
MOP_BEGIN_NAMESPACE void min_max3(double a1, double a2, double a3, double &min, double &max)
Find minimum and maximum of 3 numbers.
double angle(Vector_3< double > v1, Vector_3< double > v2)
Compute the angle between two vectors.
void printv(const Vector_3< double > &v)
Print a vector.
#define MOP_END_NAMESPACE
void crossP(const Vector_3< double > &v1, const Vector_3< double > &v2, Vector_3< double > &v3)
Compute the cross Product of two vectors.
double dotP(const Vector_3< double > &v1, const Vector_3< double > &v2)
Compute the dot Product of two vectors.
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
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.
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.
#define MOP_BEGIN_NAMESPACE
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.
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.
double edge_length(const Vector_3< double > &v)
Compute the edge length of a vector.
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.