mat_vec_fns_II.cpp File Reference
#include "mat_vec_fns_II.h"
#include <iostream>

Functions

template<class t_scalar >
bool sameSign (t_scalar a, t_scalar b)
 check whether two scalars have the same sign More...
 
int getMissingNode (int n0, int n1, int n2)
 
void getRestOfNodes (int iN, int &iO0, int &iO1, int &iO2)
 
void getMissingPair (int in0, int in1, int &on0, int &on1)
 
template<class t_scalar , class brr3 >
void arr3arr3Add (arr3_view< t_scalar, brr3 > vecA, arr3_view< t_scalar, brr3 > vecB, arr3_view< t_scalar, brr3 > res)
 
template<class t_scalar , class brr3 >
void arr3arr3Substract (arr3_view< t_scalar, brr3 > vecA, arr3_view< t_scalar, brr3 > vecB, arr3_view< t_scalar, brr3 > res)
 
template<class t_scalar , class brr3 >
void arr3arr3VectorProduct (arr3_view< t_scalar, brr3 > u, arr3_view< t_scalar, brr3 > v, arr3_view< t_scalar, brr3 > w)
 
template<class t_scalar , class brr3 >
t_scalar arr3arr3DotProduct (arr3_view< t_scalar, brr3 > vecA, arr3_view< t_scalar, brr3 > vecB)
 
template<class t_scalar , class brr3 >
void arr3Normalise (arr3_view< t_scalar, brr3 > e)
 
template<class t_scalar , class brr3 >
void arr3Normalise2 (arr3_view< t_scalar, brr3 > e, arr3_view< t_scalar, brr3 > n)
 
template<class t_scalar , class brr3 >
void arr3Resize (t_scalar f, arr3_view< t_scalar, brr3 > u)
 
template<class t_scalar , class brr3 >
void arr3Resize2 (t_scalar f, arr3_view< t_scalar, brr3 > u, arr3_view< t_scalar, brr3 > v)
 
template<class t_scalar , class brr3 >
void arr3Resize3 (t_scalar f, arr3_view< t_scalar, brr3 > u, arr3_view< t_scalar, brr3 > v)
 
template<class t_scalar , class brr3 >
void arr3Store (arr3_view< t_scalar, brr3 > u, arr3_view< t_scalar, brr3 > v)
 
template<class t_scalar , class brr3 >
t_scalar arr3arr3Distance (arr3_view< t_scalar, brr3 > vecA, arr3_view< t_scalar, brr3 > vecB)
 
template<class t_scalar , class brr3 >
t_scalar mag (arr3_view< t_scalar, brr3 > v)
 
template<class t_scalar , class brr3 >
t_scalar mag2 (arr3_view< t_scalar, brr3 > v)
 
template<class brr3 >
void arr3Initialise (brr3 &v)
 
template<class t_scalar , class brr3 >
t_scalar detByRows (arr3_view< t_scalar, brr3 > a, arr3_view< t_scalar, brr3 > b, arr3_view< t_scalar, brr3 > c)
 
template<class t_scalar , class brr3 >
t_scalar detByCols (arr3_view< t_scalar, brr3 > a, arr3_view< t_scalar, brr3 > b, arr3_view< t_scalar, brr3 > c)
 
template<class t_scalar , class brr3 >
void tangent (brr3 &vecA, brr3 &vecB, brr3 &t)
 
template<class t_scalar , class brr3 >
void getUnitNormal (brr3 &u, brr3 &v, brr3 &w)
 
template<class t_scalar , class brr3 >
void getNormal (brr3 &v1, brr3 &v2, brr3 &v3, brr3 &n)
 
template<class t_scalar , class brr3 >
void getNormalInwards (brr3(&tetA)[4], int n0, int n1, int n2, brr3(&n))
 
template<class t_scalar , class brr3 >
void getNormalInwards (brr3 &f0, brr3 &f1, brr3 &f2, brr3 &p3, brr3(&n))
 
template<class t_scalar , class brr3 >
bool sameSidePlane (brr3 &vec, brr3 &test, brr3 &p1, brr3 &p2, brr3 &p3)
 
template<class t_scalar , class brr3 >
bool sameSideLine (brr3 &e, brr3 &p1, brr3 &p2, brr3 &p3)
 
template<class t_scalar , class brr3 >
bool nodeInTet (brr3 &vec, brr3(tet)[4])
 
template<class t_scalar , class brr3 >
bool nodeInTet (brr3 &vec, brr3 &tet0, brr3 &tet1, brr3 &tet2, brr3 &tet3)
 
template<class t_scalar , class brr3 >
void linePlaneIntersectionPoint (brr3 &ip, brr3 &e1, brr3 &e2, brr3 &p1, brr3 &p2, brr3 &p3)
 
template<class t_scalar , class brr3 >
bool safeLinePlaneIntersectionPoint (brr3 &ip, brr3 &e1, brr3 &e2, brr3 &p1, brr3 &p2, brr3 &p3)
 
template<class t_scalar , class brr3 >
bool lineFaceIntersectionPoint (brr3(&ip), brr3(&e1), brr3(&e2), brr3(&p1), brr3(&p2), brr3(&p3))
 
template<class t_scalar , class brr3 >
bool isPointInFace (brr3 &ip, brr3 &p1, brr3 &p2, brr3 &p3)
 
template<class t_scalar , class brr3 >
bool intersectionPoint (brr3 &(ip), brr3(&e1), brr3(&e2), brr3(&tet)[4], int f1, int f2, int f3)
 
template<class t_scalar , class brr3 >
bool intersectionPoint (brr3 &ip, brr3 &e1, brr3 &e2, brr3 &f1, brr3 &f2, brr3 &f3)
 
template<class t_scalar , class brr3 >
void intersectingPointToLine (arr3_view< t_scalar, brr3 > p0, arr3_view< t_scalar, brr3 > p1, arr3_view< t_scalar, brr3 > p2p1, arr3_view< t_scalar, brr3 > p3)
 
template<class t_scalar , class brr3 >
void intersectingPointToLine (vector3 &p0, arr3_view< t_scalar, brr3 > p1, arr3_view< t_scalar, brr3 > p2p1, arr3_view< t_scalar, brr3 > p3)
 
template<class t_scalar , class brr3 >
t_scalar distanceFromPointToLine (arr3_view< t_scalar, brr3 > p0, arr3_view< t_scalar, brr3 > p1, arr3_view< t_scalar, brr3 > p2)
 
template<class t_scalar , class brr3 >
t_scalar getTetrahedraVolume (arr3_view< t_scalar, brr3 > p0, arr3_view< t_scalar, brr3 > p1, arr3_view< t_scalar, brr3 > p2, arr3_view< t_scalar, brr3 > p3)
 
template<class brr3 >
void getTetrahedraCM (brr3 &p1, brr3 &p2, brr3 &p3, brr3 &p4, brr3 &c)
 
template<class t_scalar , class brr3 , class brr4 >
void getLocalCoordinatesForLinTet (arr3_view< t_scalar, brr3 > t0, arr3_view< t_scalar, brr3 > t1, arr3_view< t_scalar, brr3 > t2, arr3_view< t_scalar, brr3 > t3, arr3_view< t_scalar, brr3 > p, brr4 &phi)
 
template<class brr3 >
void vec3Vec3SubsToArr3 (vector3 &u, vector3 &v, brr3(&w))
 
void vec3Arr3SubsToArr3 (vector3 &u, arr3(&v), arr3(&w))
 
void arr3Vec3SubsToArr3 (arr3(&u), vector3 &v, arr3(&w))
 
void vec3Arr3AddToArr3 (vector3 &u, arr3(&v), arr3(&w))
 
void vec3ResizeToArr3 (scalar f, vector3 &u, arr3(&v))
 
scalar vec3Arr3DotProduct (vector3 &u, arr3 &v)
 
template bool sameSign< scalar > (scalar a, scalar b)
 
template void arr3arr3Add< scalar, arr3 > (arr3_view< scalar, arr3 > vecA, arr3_view< scalar, arr3 > vecB, arr3_view< scalar, arr3 > res)
 
template void arr3arr3Substract< scalar, arr3 > (arr3_view< scalar, arr3 > vecA, arr3_view< scalar, arr3 > vecB, arr3_view< scalar, arr3 > res)
 
template void arr3arr3VectorProduct< scalar, arr3 > (arr3_view< scalar, arr3 > u, arr3_view< scalar, arr3 > v, arr3_view< scalar, arr3 > w)
 
template scalar arr3arr3DotProduct< scalar, arr3 > (arr3_view< scalar, arr3 > vecA, arr3_view< scalar, arr3 > vecB)
 
template void arr3Normalise< scalar, arr3 > (arr3_view< scalar, arr3 > e)
 
template void arr3Normalise2< scalar, arr3 > (arr3_view< scalar, arr3 > e, arr3_view< scalar, arr3 > n)
 
template void arr3Resize< scalar, arr3 > (scalar f, arr3_view< scalar, arr3 > u)
 
template void arr3Resize2< scalar, arr3 > (scalar f, arr3_view< scalar, arr3 > u, arr3_view< scalar, arr3 > v)
 
template void arr3Resize3< scalar, arr3 > (scalar f, arr3_view< scalar, arr3 > u, arr3_view< scalar, arr3 > v)
 
template void arr3Store< scalar, arr3 > (arr3_view< scalar, arr3 > u, arr3_view< scalar, arr3 > v)
 
template scalar arr3arr3Distance< scalar, arr3 > (arr3_view< scalar, arr3 > vecA, arr3_view< scalar, arr3 > vecB)
 
template scalar mag< scalar, arr3 > (arr3_view< scalar, arr3 > v)
 
template scalar mag2< scalar, arr3 > (arr3_view< scalar, arr3 > v)
 
template void arr3Initialise< arr3 > (arr3 &v)
 
template scalar detByRows< scalar, arr3 > (arr3_view< scalar, arr3 > a, arr3_view< scalar, arr3 > b, arr3_view< scalar, arr3 > c)
 
template scalar detByCols< scalar, arr3 > (arr3_view< scalar, arr3 > a, arr3_view< scalar, arr3 > b, arr3_view< scalar, arr3 > c)
 
template bool sameSign< geoscalar > (geoscalar a, geoscalar b)
 
template void arr3arr3Add< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > vecA, arr3_view< geoscalar, grr3 > vecB, arr3_view< geoscalar, grr3 > res)
 
template void arr3arr3Substract< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > vecA, arr3_view< geoscalar, grr3 > vecB, arr3_view< geoscalar, grr3 > res)
 
template void arr3arr3VectorProduct< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > u, arr3_view< geoscalar, grr3 > v, arr3_view< geoscalar, grr3 > w)
 
template geoscalar arr3arr3DotProduct< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > vecA, arr3_view< geoscalar, grr3 > vecB)
 
template void arr3Normalise< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > e)
 
template void arr3Normalise2< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > e, arr3_view< geoscalar, grr3 > n)
 
template void arr3Resize< geoscalar, grr3 > (geoscalar f, arr3_view< geoscalar, grr3 > u)
 
template void arr3Resize2< geoscalar, grr3 > (geoscalar f, arr3_view< geoscalar, grr3 > u, arr3_view< geoscalar, grr3 > v)
 
template void arr3Resize3< geoscalar, grr3 > (geoscalar f, arr3_view< geoscalar, grr3 > u, arr3_view< geoscalar, grr3 > v)
 
template void arr3Store< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > u, arr3_view< geoscalar, grr3 > v)
 
template geoscalar arr3arr3Distance< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > vecA, arr3_view< geoscalar, grr3 > vecB)
 
template geoscalar mag< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > v)
 
template geoscalar mag2< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > v)
 
template void arr3Initialise< grr3 > (grr3 &v)
 
template geoscalar detByRows< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > a, arr3_view< geoscalar, grr3 > b, arr3_view< geoscalar, grr3 > c)
 
template geoscalar detByCols< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > a, arr3_view< geoscalar, grr3 > b, arr3_view< geoscalar, grr3 > c)
 
template void tangent< scalar, arr3 > (arr3 &vecA, arr3 &vecB, arr3 &t)
 
template void getUnitNormal< scalar, arr3 > (arr3 &u, arr3 &v, arr3 &w)
 
template void getNormal< scalar, arr3 > (arr3 &v1, arr3 &v2, arr3 &v3, arr3 &n)
 
template void getNormalInwards< scalar, arr3 > (arr3(&tetA)[4], int n0, int n1, int n2, arr3(&n))
 
template void getNormalInwards< scalar, arr3 > (arr3 &f0, arr3 &f1, arr3 &f2, arr3 &p3, arr3(&n))
 
template bool sameSidePlane< scalar, arr3 > (arr3 &vec, arr3 &test, arr3 &p1, arr3 &p2, arr3 &p3)
 
template bool sameSideLine< scalar, arr3 > (arr3 &e, arr3 &p1, arr3 &p2, arr3 &p3)
 
template bool nodeInTet< scalar, arr3 > (arr3 &vec, arr3(tet)[4])
 
template bool nodeInTet< scalar, grr3 > (arr3 &vec, arr3 &tet0, arr3 &tet1, arr3 &tet2, arr3 &tet3)
 
template void linePlaneIntersectionPoint< scalar, arr3 > (arr3 &ip, arr3 &e1, arr3 &e2, arr3 &p1, arr3 &p2, arr3 &p3)
 
template bool safeLinePlaneIntersectionPoint< scalar, arr3 > (arr3 &ip, arr3 &e1, arr3 &e2, arr3 &p1, arr3 &p2, arr3 &p3)
 
template bool lineFaceIntersectionPoint< scalar, arr3 > (arr3(&ip), arr3(&e1), arr3(&e2), arr3(&p1), arr3(&p2), arr3(&p3))
 
template bool isPointInFace< scalar, arr3 > (arr3 &ip, arr3 &p1, arr3 &p2, arr3 &p3)
 
template bool intersectionPoint< scalar, arr3 > (arr3 &(ip), arr3(&e1), arr3(&e2), arr3(&tet)[4], int f1, int f2, int f3)
 
template bool intersectionPoint< scalar, arr3 > (arr3 &ip, arr3 &e1, arr3 &e2, arr3 &f1, arr3 &f2, arr3 &f3)
 
template void intersectingPointToLine< scalar, arr3 > (arr3_view< scalar, arr3 > p0, arr3_view< scalar, arr3 > p1, arr3_view< scalar, arr3 > p2p1, arr3_view< scalar, arr3 > p3)
 
template void intersectingPointToLine< scalar, arr3 > (vector3 &p0, arr3_view< scalar, arr3 > p1, arr3_view< scalar, arr3 > p2p1, arr3_view< scalar, arr3 > p3)
 
template scalar distanceFromPointToLine< scalar, arr3 > (arr3_view< scalar, arr3 > p0, arr3_view< scalar, arr3 > p1, arr3_view< scalar, arr3 > p2)
 
template scalar getTetrahedraVolume< scalar, arr3 > (arr3_view< scalar, arr3 > p0, arr3_view< scalar, arr3 > p1, arr3_view< scalar, arr3 > p2, arr3_view< scalar, arr3 > p3)
 
template void getTetrahedraCM< arr3 > (arr3 &p1, arr3 &p2, arr3 &p3, arr3 &p4, arr3 &c)
 
template void getLocalCoordinatesForLinTet< scalar, arr3, arr4 > (arr3_view< scalar, arr3 > t0, arr3_view< scalar, arr3 > t1, arr3_view< scalar, arr3 > t2, arr3_view< scalar, arr3 > t3, arr3_view< scalar, arr3 > p, arr4 &phi)
 
template void vec3Vec3SubsToArr3< arr3 > (vector3 &u, vector3 &v, arr3(&w))
 
template void tangent< geoscalar, grr3 > (grr3 &vecA, grr3 &vecB, grr3 &t)
 
template void getUnitNormal< geoscalar, grr3 > (grr3 &u, grr3 &v, grr3 &w)
 
template void getNormal< geoscalar, grr3 > (grr3 &v1, grr3 &v2, grr3 &v3, grr3 &n)
 
template void getNormalInwards< geoscalar, grr3 > (grr3(&tetA)[4], int n0, int n1, int n2, grr3(&n))
 
template void getNormalInwards< geoscalar, grr3 > (grr3 &f0, grr3 &f1, grr3 &f2, grr3 &p3, grr3(&n))
 
template bool sameSidePlane< geoscalar, grr3 > (grr3 &vec, grr3 &test, grr3 &p1, grr3 &p2, grr3 &p3)
 
template bool sameSideLine< geoscalar, grr3 > (grr3 &e, grr3 &p1, grr3 &p2, grr3 &p3)
 
template bool nodeInTet< geoscalar, grr3 > (grr3 &vec, grr3(tet)[4])
 
template bool nodeInTet< geoscalar, grr3 > (grr3 &vec, grr3 &tet0, grr3 &tet1, grr3 &tet2, grr3 &tet3)
 
template void linePlaneIntersectionPoint< geoscalar, grr3 > (grr3 &ip, grr3 &e1, grr3 &e2, grr3 &p1, grr3 &p2, grr3 &p3)
 
template bool safeLinePlaneIntersectionPoint< geoscalar, grr3 > (grr3 &ip, grr3 &e1, grr3 &e2, grr3 &p1, grr3 &p2, grr3 &p3)
 
template bool lineFaceIntersectionPoint< geoscalar, grr3 > (grr3(&ip), grr3(&e1), grr3(&e2), grr3(&p1), grr3(&p2), grr3(&p3))
 
template bool isPointInFace< geoscalar, grr3 > (grr3 &ip, grr3 &p1, grr3 &p2, grr3 &p3)
 
template bool intersectionPoint< geoscalar, grr3 > (grr3 &(ip), grr3(&e1), grr3(&e2), grr3(&tet)[4], int f1, int f2, int f3)
 
template bool intersectionPoint< geoscalar, grr3 > (grr3 &ip, grr3 &e1, grr3 &e2, grr3 &f1, grr3 &f2, grr3 &f3)
 
template void intersectingPointToLine< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > p0, arr3_view< geoscalar, grr3 > p1, arr3_view< geoscalar, grr3 > p2p1, arr3_view< geoscalar, grr3 > p3)
 
template void intersectingPointToLine< geoscalar, grr3 > (vector3 &p0, arr3_view< geoscalar, grr3 > p1, arr3_view< geoscalar, grr3 > p2p1, arr3_view< geoscalar, grr3 > p3)
 
template geoscalar distanceFromPointToLine< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > p0, arr3_view< geoscalar, grr3 > p1, arr3_view< geoscalar, grr3 > p2)
 
template geoscalar getTetrahedraVolume< geoscalar, grr3 > (arr3_view< geoscalar, grr3 > p0, arr3_view< geoscalar, grr3 > p1, arr3_view< geoscalar, grr3 > p2, arr3_view< geoscalar, grr3 > p3)
 
template void getTetrahedraCM< grr3 > (grr3 &p1, grr3 &p2, grr3 &p3, grr3 &p4, grr3 &c)
 
template void getLocalCoordinatesForLinTet< geoscalar, grr3, grr4 > (arr3_view< geoscalar, grr3 > t0, arr3_view< geoscalar, grr3 > t1, arr3_view< geoscalar, grr3 > t2, arr3_view< geoscalar, grr3 > t3, arr3_view< geoscalar, grr3 > p, grr4 &phi)
 
template void vec3Vec3SubsToArr3< grr3 > (vector3 &u, vector3 &v, grr3(&w))
 

Function Documentation

◆ arr3arr3Add()

template<class t_scalar , class brr3 >
void arr3arr3Add ( arr3_view< t_scalar, brr3 >  vecA,
arr3_view< t_scalar, brr3 >  vecB,
arr3_view< t_scalar, brr3 >  res 
)

SECTION 1 /////////////////////// Basic operations for arr3, i. e., scalar v[3]// Add vectors vecA and vecB into res. res can also be vecA or vecB

◆ arr3arr3Add< geoscalar, grr3 >()

template void arr3arr3Add< geoscalar, grr3 > ( arr3_view< geoscalar, grr3 vecA,
arr3_view< geoscalar, grr3 vecB,
arr3_view< geoscalar, grr3 res 
)

Referenced by vec3Arr3DotProduct().

◆ arr3arr3Add< scalar, arr3 >()

template void arr3arr3Add< scalar, arr3 > ( arr3_view< scalar, arr3 vecA,
arr3_view< scalar, arr3 vecB,
arr3_view< scalar, arr3 res 
)

Referenced by vec3Arr3DotProduct().

◆ arr3arr3Distance()

template<class t_scalar , class brr3 >
t_scalar arr3arr3Distance ( arr3_view< t_scalar, brr3 >  vecA,
arr3_view< t_scalar, brr3 >  vecB 
)

return the distance from vecA to vecB

◆ arr3arr3Distance< geoscalar, grr3 >()

Referenced by vec3Arr3DotProduct().

◆ arr3arr3Distance< scalar, arr3 >()

template scalar arr3arr3Distance< scalar, arr3 > ( arr3_view< scalar, arr3 vecA,
arr3_view< scalar, arr3 vecB 
)

Referenced by vec3Arr3DotProduct().

◆ arr3arr3DotProduct()

template<class t_scalar , class brr3 >
t_scalar arr3arr3DotProduct ( arr3_view< t_scalar, brr3 >  vecA,
arr3_view< t_scalar, brr3 >  vecB 
)

return the dot product for arrays vecA and vecB

◆ arr3arr3DotProduct< geoscalar, grr3 >()

◆ arr3arr3DotProduct< scalar, arr3 >()

◆ arr3arr3Substract()

template<class t_scalar , class brr3 >
void arr3arr3Substract ( arr3_view< t_scalar, brr3 >  vecA,
arr3_view< t_scalar, brr3 >  vecB,
arr3_view< t_scalar, brr3 >  res 
)

res = vecA - vecB res can be either vecA or vecB

◆ arr3arr3Substract< geoscalar, grr3 >()

template void arr3arr3Substract< geoscalar, grr3 > ( arr3_view< geoscalar, grr3 vecA,
arr3_view< geoscalar, grr3 vecB,
arr3_view< geoscalar, grr3 res 
)

Referenced by vec3Arr3DotProduct().

◆ arr3arr3Substract< scalar, arr3 >()

◆ arr3arr3VectorProduct()

template<class t_scalar , class brr3 >
void arr3arr3VectorProduct ( arr3_view< t_scalar, brr3 >  u,
arr3_view< t_scalar, brr3 >  v,
arr3_view< t_scalar, brr3 >  w 
)

w = u x v (w != u) && (w != v)

◆ arr3arr3VectorProduct< geoscalar, grr3 >()

◆ arr3arr3VectorProduct< scalar, arr3 >()

◆ arr3Initialise()

template<class brr3 >
void arr3Initialise ( brr3 &  v)

Initialise the input vector with (0, 0, 0)

Referenced by findCM(), maxVolume(), and maxVolumeAndArea().

◆ arr3Initialise< arr3 >()

template void arr3Initialise< arr3 > ( arr3 v)

Referenced by vec3Arr3DotProduct().

◆ arr3Initialise< grr3 >()

◆ arr3Normalise()

template<class t_scalar , class brr3 >
void arr3Normalise ( arr3_view< t_scalar, brr3 >  e)

Normalise vector arr3 e

◆ arr3Normalise2()

template<class t_scalar , class brr3 >
void arr3Normalise2 ( arr3_view< t_scalar, brr3 >  e,
arr3_view< t_scalar, brr3 >  n 
)

get the normalised vector of arr3 e into arr3 n

◆ arr3Normalise2< geoscalar, grr3 >()

template void arr3Normalise2< geoscalar, grr3 > ( arr3_view< geoscalar, grr3 e,
arr3_view< geoscalar, grr3 n 
)

Referenced by vec3Arr3DotProduct().

◆ arr3Normalise2< scalar, arr3 >()

template void arr3Normalise2< scalar, arr3 > ( arr3_view< scalar, arr3 e,
arr3_view< scalar, arr3 n 
)

◆ arr3Normalise< geoscalar, grr3 >()

template void arr3Normalise< geoscalar, grr3 > ( arr3_view< geoscalar, grr3 e)

Referenced by vec3Arr3DotProduct().

◆ arr3Normalise< scalar, arr3 >()

template void arr3Normalise< scalar, arr3 > ( arr3_view< scalar, arr3 e)

◆ arr3Resize()

template<class t_scalar , class brr3 >
void arr3Resize ( t_scalar  f,
arr3_view< t_scalar, brr3 >  u 
)

resize vector u, given scalar f

◆ arr3Resize2()

template<class t_scalar , class brr3 >
void arr3Resize2 ( t_scalar  f,
arr3_view< t_scalar, brr3 >  u,
arr3_view< t_scalar, brr3 >  v 
)

resize vector u into vector v, given scalar f

◆ arr3Resize2< geoscalar, grr3 >()

◆ arr3Resize2< scalar, arr3 >()

◆ arr3Resize3()

template<class t_scalar , class brr3 >
void arr3Resize3 ( t_scalar  f,
arr3_view< t_scalar, brr3 >  u,
arr3_view< t_scalar, brr3 >  v 
)

Given a scalar f, change v so that v += f*u

◆ arr3Resize3< geoscalar, grr3 >()

template void arr3Resize3< geoscalar, grr3 > ( geoscalar  f,
arr3_view< geoscalar, grr3 u,
arr3_view< geoscalar, grr3 v 
)

Referenced by vec3Arr3DotProduct().

◆ arr3Resize3< scalar, arr3 >()

◆ arr3Resize< geoscalar, grr3 >()

◆ arr3Resize< scalar, arr3 >()

◆ arr3Store()

template<class t_scalar , class brr3 >
void arr3Store ( arr3_view< t_scalar, brr3 >  u,
arr3_view< t_scalar, brr3 >  v 
)

cp arr3 u into arr3 v

Referenced by intersectingPointToLine().

◆ arr3Store< geoscalar, grr3 >()

template void arr3Store< geoscalar, grr3 > ( arr3_view< geoscalar, grr3 u,
arr3_view< geoscalar, grr3 v 
)

Referenced by vec3Arr3DotProduct().

◆ arr3Store< scalar, arr3 >()

◆ arr3Vec3SubsToArr3()

void arr3Vec3SubsToArr3 ( arr3 u,
vector3 v,
arr3 w 
)

◆ detByCols()

template<class t_scalar , class brr3 >
t_scalar detByCols ( arr3_view< t_scalar, brr3 >  a,
arr3_view< t_scalar, brr3 >  b,
arr3_view< t_scalar, brr3 >  c 
)

calculate the determinant of a 3x3 matrix given by cols a, b, c

◆ detByCols< geoscalar, grr3 >()

◆ detByCols< scalar, arr3 >()

template scalar detByCols< scalar, arr3 > ( arr3_view< scalar, arr3 a,
arr3_view< scalar, arr3 b,
arr3_view< scalar, arr3 c 
)

Referenced by vec3Arr3DotProduct().

◆ detByRows()

template<class t_scalar , class brr3 >
t_scalar detByRows ( arr3_view< t_scalar, brr3 >  a,
arr3_view< t_scalar, brr3 >  b,
arr3_view< t_scalar, brr3 >  c 
)

calculate the determinant of a 3x3 matrix given by rows a, b, c

◆ detByRows< geoscalar, grr3 >()

◆ detByRows< scalar, arr3 >()

template scalar detByRows< scalar, arr3 > ( arr3_view< scalar, arr3 a,
arr3_view< scalar, arr3 b,
arr3_view< scalar, arr3 c 
)

Referenced by vec3Arr3DotProduct().

◆ distanceFromPointToLine()

template<class t_scalar , class brr3 >
t_scalar distanceFromPointToLine ( arr3_view< t_scalar, brr3 >  p0,
arr3_view< t_scalar, brr3 >  p1,
arr3_view< t_scalar, brr3 >  p2 
)

Given a line defined by points p1 and p2, return the distance from p0, to this line.

◆ distanceFromPointToLine< geoscalar, grr3 >()

◆ distanceFromPointToLine< scalar, arr3 >()

Referenced by vec3Arr3DotProduct().

◆ getLocalCoordinatesForLinTet()

template<class t_scalar , class brr3 , class brr4 >
void getLocalCoordinatesForLinTet ( arr3_view< t_scalar, brr3 >  t0,
arr3_view< t_scalar, brr3 >  t1,
arr3_view< t_scalar, brr3 >  t2,
arr3_view< t_scalar, brr3 >  t3,
arr3_view< t_scalar, brr3 >  p,
brr4 &  phi 
)

◆ getLocalCoordinatesForLinTet< geoscalar, grr3, grr4 >()

◆ getLocalCoordinatesForLinTet< scalar, arr3, arr4 >()

template void getLocalCoordinatesForLinTet< scalar, arr3, arr4 > ( arr3_view< scalar, arr3 t0,
arr3_view< scalar, arr3 t1,
arr3_view< scalar, arr3 t2,
arr3_view< scalar, arr3 t3,
arr3_view< scalar, arr3 p,
arr4 phi 
)

Referenced by vec3Arr3DotProduct().

◆ getMissingNode()

int getMissingNode ( int  n0,
int  n1,
int  n2 
)

Given 3 integers n0, n1, n2 return the index missing in the list [0,1,2,3]

Referenced by getBAndN(), getMissingPair(), getNormalInwards(), volumeAndAreaForIntPoint(), and volumeForIntPoint().

◆ getMissingPair()

void getMissingPair ( int  in0,
int  in1,
int &  on0,
int &  on1 
)

Given 1 integers iN, return the index missing indices of the list [0,1,2,3]

◆ getNormal()

template<class t_scalar , class brr3 >
void getNormal ( brr3 &  v1,
brr3 &  v2,
brr3 &  v3,
brr3 &  n 
)

calculate the normal vector n to the plane defined by the three points

◆ getNormal< geoscalar, grr3 >()

template void getNormal< geoscalar, grr3 > ( grr3 v1,
grr3 v2,
grr3 v3,
grr3 n 
)

Referenced by vec3Arr3DotProduct().

◆ getNormal< scalar, arr3 >()

template void getNormal< scalar, arr3 > ( arr3 v1,
arr3 v2,
arr3 v3,
arr3 n 
)

Referenced by vec3Arr3DotProduct().

◆ getNormalInwards() [1/2]

template<class t_scalar , class brr3 >
void getNormalInwards ( brr3(&)  tetA[4],
int  n0,
int  n1,
int  n2,
brr3 &  n 
)

Given the face formed by tetA[0]:tetA[1]:tetA[2] [ or the face formed by f0, f1, and f2, and knowing the remaining p3 for a tetrahedron ] get n, the normal to a face pointing inwards.

◆ getNormalInwards() [2/2]

template<class t_scalar , class brr3 >
void getNormalInwards ( brr3 &  f0,
brr3 &  f1,
brr3 &  f2,
brr3 &  p3,
brr3 &  n 
)

Given the face formed by f0, f1, and f2, and knowing the remaining p3 for a tetrahedron, get n, the normal to a face pointing inwards.

◆ getNormalInwards< geoscalar, grr3 >() [1/2]

template void getNormalInwards< geoscalar, grr3 > ( grr3(&)  tetA[4],
int  n0,
int  n1,
int  n2,
grr3 n 
)

Referenced by vec3Arr3DotProduct().

◆ getNormalInwards< geoscalar, grr3 >() [2/2]

template void getNormalInwards< geoscalar, grr3 > ( grr3 f0,
grr3 f1,
grr3 f2,
grr3 p3,
grr3 n 
)

◆ getNormalInwards< scalar, arr3 >() [1/2]

template void getNormalInwards< scalar, arr3 > ( arr3(&)  tetA[4],
int  n0,
int  n1,
int  n2,
arr3 n 
)

Referenced by vec3Arr3DotProduct().

◆ getNormalInwards< scalar, arr3 >() [2/2]

template void getNormalInwards< scalar, arr3 > ( arr3 f0,
arr3 f1,
arr3 f2,
arr3 p3,
arr3 n 
)

◆ getRestOfNodes()

void getRestOfNodes ( int  iN,
int &  iO0,
int &  iO1,
int &  iO2 
)

Given 1 integers iN, return the index missing indices of the list [0,1,2,3]

◆ getTetrahedraCM()

template<class brr3 >
void getTetrahedraCM ( brr3 &  p1,
brr3 &  p2,
brr3 &  p3,
brr3 &  p4,
brr3 &  c 
)

Return the center of coordinates for four points p1, p2, p3, p4 in c

◆ getTetrahedraCM< arr3 >()

template void getTetrahedraCM< arr3 > ( arr3 p1,
arr3 p2,
arr3 p3,
arr3 p4,
arr3 c 
)

Referenced by vec3Arr3DotProduct().

◆ getTetrahedraCM< grr3 >()

template void getTetrahedraCM< grr3 > ( grr3 p1,
grr3 p2,
grr3 p3,
grr3 p4,
grr3 c 
)

Referenced by vec3Arr3DotProduct().

◆ getTetrahedraVolume()

template<class t_scalar , class brr3 >
t_scalar getTetrahedraVolume ( arr3_view< t_scalar, brr3 >  p0,
arr3_view< t_scalar, brr3 >  p1,
arr3_view< t_scalar, brr3 >  p2,
arr3_view< t_scalar, brr3 >  p3 
)

◆ getTetrahedraVolume< geoscalar, grr3 >()

◆ getTetrahedraVolume< scalar, arr3 >()

template scalar getTetrahedraVolume< scalar, arr3 > ( arr3_view< scalar, arr3 p0,
arr3_view< scalar, arr3 p1,
arr3_view< scalar, arr3 p2,
arr3_view< scalar, arr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ getUnitNormal()

template<class t_scalar , class brr3 >
void getUnitNormal ( brr3 &  u,
brr3 &  v,
brr3 &  w 
)

w = unit(u x v) (w != u) && (w != v)

◆ getUnitNormal< geoscalar, grr3 >()

template void getUnitNormal< geoscalar, grr3 > ( grr3 u,
grr3 v,
grr3 w 
)

Referenced by vec3Arr3DotProduct().

◆ getUnitNormal< scalar, arr3 >()

template void getUnitNormal< scalar, arr3 > ( arr3 u,
arr3 v,
arr3 w 
)

Referenced by vec3Arr3DotProduct().

◆ intersectingPointToLine() [1/2]

template<class t_scalar , class brr3 >
void intersectingPointToLine ( arr3_view< t_scalar, brr3 >  p0,
arr3_view< t_scalar, brr3 >  p1,
arr3_view< t_scalar, brr3 >  p2p1,
arr3_view< t_scalar, brr3 >  p3 
)

Given a line defined by point p1 and vector p2p1, get the intersecting point p3, in that line from a third point p0. Essentially implementing "Intersection of two lines in three-space", by Ronald Goldman, in Graphics Gems I.

◆ intersectingPointToLine() [2/2]

template<class t_scalar , class brr3 >
void intersectingPointToLine ( vector3 p0,
arr3_view< t_scalar, brr3 >  p1,
arr3_view< t_scalar, brr3 >  p2p1,
arr3_view< t_scalar, brr3 >  p3 
)

◆ intersectingPointToLine< geoscalar, grr3 >() [1/2]

Referenced by vec3Arr3DotProduct().

◆ intersectingPointToLine< geoscalar, grr3 >() [2/2]

template void intersectingPointToLine< geoscalar, grr3 > ( vector3 p0,
arr3_view< geoscalar, grr3 p1,
arr3_view< geoscalar, grr3 p2p1,
arr3_view< geoscalar, grr3 p3 
)

◆ intersectingPointToLine< scalar, arr3 >() [1/2]

template void intersectingPointToLine< scalar, arr3 > ( arr3_view< scalar, arr3 p0,
arr3_view< scalar, arr3 p1,
arr3_view< scalar, arr3 p2p1,
arr3_view< scalar, arr3 p3 
)

◆ intersectingPointToLine< scalar, arr3 >() [2/2]

template void intersectingPointToLine< scalar, arr3 > ( vector3 p0,
arr3_view< scalar, arr3 p1,
arr3_view< scalar, arr3 p2p1,
arr3_view< scalar, arr3 p3 
)

◆ intersectionPoint() [1/2]

template<class t_scalar , class brr3 >
bool intersectionPoint ( brr3 &  ip,
brr3 &  e1,
brr3 &  e2,
brr3(&)  tet[4],
int  f1,
int  f2,
int  f3 
)

Check whether an edge and a plane intersect, and return the intersection point ip and true if found, false otherwise. more specifically check that both:

  • both ends of the edge (e1 and e2) are on different sides of the plane defined by the vectors (tet[f2] - tet[f1]) and (tet[f3] - tet[f1]).
  • the intersection of a line is a point in the plane

◆ intersectionPoint() [2/2]

template<class t_scalar , class brr3 >
bool intersectionPoint ( brr3 &  ip,
brr3 &  e1,
brr3 &  e2,
brr3 &  f1,
brr3 &  f2,
brr3 &  f3 
)

Check whether an edge and a plane intersect, and return the intersection point ip and true if found, false otherwise. more specifically check that both:

  • both ends of the edge (e1 and e2) are on different sides of the plane defined by the vectors (f2 - f1) and (f3 - f1).
  • the intersection of a line is a point in the plane

◆ intersectionPoint< geoscalar, grr3 >() [1/2]

template bool intersectionPoint< geoscalar, grr3 > ( grr3 ip,
grr3 e1,
grr3 e2,
grr3(&)  tet[4],
int  f1,
int  f2,
int  f3 
)

Referenced by vec3Arr3DotProduct().

◆ intersectionPoint< geoscalar, grr3 >() [2/2]

template bool intersectionPoint< geoscalar, grr3 > ( grr3 ip,
grr3 e1,
grr3 e2,
grr3 f1,
grr3 f2,
grr3 f3 
)

◆ intersectionPoint< scalar, arr3 >() [1/2]

template bool intersectionPoint< scalar, arr3 > ( arr3 ip,
arr3 e1,
arr3 e2,
arr3(&)  tet[4],
int  f1,
int  f2,
int  f3 
)

Referenced by vec3Arr3DotProduct().

◆ intersectionPoint< scalar, arr3 >() [2/2]

template bool intersectionPoint< scalar, arr3 > ( arr3 ip,
arr3 e1,
arr3 e2,
arr3 f1,
arr3 f2,
arr3 f3 
)

◆ isPointInFace()

template<class t_scalar , class brr3 >
bool isPointInFace ( brr3 &  ip,
brr3 &  p1,
brr3 &  p2,
brr3 &  p3 
)

Check whether point ip is inside of the three half-planes formed by the triangle's edges p1, p2, p3.

◆ isPointInFace< geoscalar, grr3 >()

template bool isPointInFace< geoscalar, grr3 > ( grr3 ip,
grr3 p1,
grr3 p2,
grr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ isPointInFace< scalar, arr3 >()

template bool isPointInFace< scalar, arr3 > ( arr3 ip,
arr3 p1,
arr3 p2,
arr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ lineFaceIntersectionPoint()

template<class t_scalar , class brr3 >
bool lineFaceIntersectionPoint ( brr3 &  ip,
brr3 &  e1,
brr3 &  e2,
brr3 &  p1,
brr3 &  p2,
brr3 &  p3 
)

Return true and the intersection point ip of the line that passes through the points e1 and e2 and face defined by points p1, p2, p3 if this intersection actually occurs, and false otherwise.

Warning
p1, p2, and p3 are assumed to be non-colinear.

◆ lineFaceIntersectionPoint< geoscalar, grr3 >()

template bool lineFaceIntersectionPoint< geoscalar, grr3 > ( grr3 ip,
grr3 e1,
grr3 e2,
grr3 p1,
grr3 p2,
grr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ lineFaceIntersectionPoint< scalar, arr3 >()

template bool lineFaceIntersectionPoint< scalar, arr3 > ( arr3 ip,
arr3 e1,
arr3 e2,
arr3 p1,
arr3 p2,
arr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ linePlaneIntersectionPoint()

template<class t_scalar , class brr3 >
void linePlaneIntersectionPoint ( brr3 &  ip,
brr3 &  e1,
brr3 &  e2,
brr3 &  p1,
brr3 &  p2,
brr3 &  p3 
)

find the intersection point of the line that passes through the points e1 and e2, and the plane defined by points p1, p2 and p3.

Warning
{this function should be called ONLY in the case that intersection is known to occur.}

◆ linePlaneIntersectionPoint< geoscalar, grr3 >()

template void linePlaneIntersectionPoint< geoscalar, grr3 > ( grr3 ip,
grr3 e1,
grr3 e2,
grr3 p1,
grr3 p2,
grr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ linePlaneIntersectionPoint< scalar, arr3 >()

template void linePlaneIntersectionPoint< scalar, arr3 > ( arr3 ip,
arr3 e1,
arr3 e2,
arr3 p1,
arr3 p2,
arr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ mag()

template<class t_scalar , class brr3 >
t_scalar mag ( arr3_view< t_scalar, brr3 >  v)

Return the length of a vector v

◆ mag2()

template<class t_scalar , class brr3 >
t_scalar mag2 ( arr3_view< t_scalar, brr3 >  v)

Return the squared length of a vector v

◆ mag2< geoscalar, grr3 >()

template geoscalar mag2< geoscalar, grr3 > ( arr3_view< geoscalar, grr3 v)

Referenced by vec3Arr3DotProduct().

◆ mag2< scalar, arr3 >()

template scalar mag2< scalar, arr3 > ( arr3_view< scalar, arr3 v)

Referenced by vec3Arr3DotProduct().

◆ mag< geoscalar, grr3 >()

template geoscalar mag< geoscalar, grr3 > ( arr3_view< geoscalar, grr3 v)

Referenced by vec3Arr3DotProduct().

◆ mag< scalar, arr3 >()

◆ nodeInTet() [1/2]

template<class t_scalar , class brr3 >
bool nodeInTet ( brr3 &  vec,
brr3(tet)  [4] 
)

check whether vector vec is in tetrahedron B. more specifically, it will be there if for each plane of the tetrahedron, the point is on the same side as the remaining vertex

◆ nodeInTet() [2/2]

template<class t_scalar , class brr3 >
bool nodeInTet ( brr3 &  vec,
brr3 &  tet0,
brr3 &  tet1,
brr3 &  tet2,
brr3 &  tet3 
)

◆ nodeInTet< geoscalar, grr3 >() [1/2]

template bool nodeInTet< geoscalar, grr3 > ( grr3 vec,
grr3(tet)  [4] 
)

Referenced by vec3Arr3DotProduct().

◆ nodeInTet< geoscalar, grr3 >() [2/2]

template bool nodeInTet< geoscalar, grr3 > ( grr3 vec,
grr3 tet0,
grr3 tet1,
grr3 tet2,
grr3 tet3 
)

◆ nodeInTet< scalar, arr3 >()

template bool nodeInTet< scalar, arr3 > ( arr3 vec,
arr3(tet)  [4] 
)

Referenced by vec3Arr3DotProduct().

◆ nodeInTet< scalar, grr3 >()

template bool nodeInTet< scalar, grr3 > ( arr3 vec,
arr3 tet0,
arr3 tet1,
arr3 tet2,
arr3 tet3 
)

Referenced by vec3Arr3DotProduct().

◆ safeLinePlaneIntersectionPoint()

template<class t_scalar , class brr3 >
bool safeLinePlaneIntersectionPoint ( brr3 &  ip,
brr3 &  e1,
brr3 &  e2,
brr3 &  p1,
brr3 &  p2,
brr3 &  p3 
)

Return true and the intersection point of the line that passes through the points e1 and e2 and the plane defined by points p1, p2, p3 if this intersection actually occurs, and false otherwise.

Warning
p1, p2, and p3 are assumed to be non-colinear.

◆ safeLinePlaneIntersectionPoint< geoscalar, grr3 >()

template bool safeLinePlaneIntersectionPoint< geoscalar, grr3 > ( grr3 ip,
grr3 e1,
grr3 e2,
grr3 p1,
grr3 p2,
grr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ safeLinePlaneIntersectionPoint< scalar, arr3 >()

template bool safeLinePlaneIntersectionPoint< scalar, arr3 > ( arr3 ip,
arr3 e1,
arr3 e2,
arr3 p1,
arr3 p2,
arr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ sameSideLine()

template<class t_scalar , class brr3 >
bool sameSideLine ( brr3 &  e,
brr3 &  p1,
brr3 &  p2,
brr3 &  p3 
)

Given 4 co-planar points, check if ip and p1 lay on the same side of the of the line formed by p2 and p3. More specifically we check whether pl23 x pl21 and pl23 x pl2e are parallel or antiparallel.

◆ sameSideLine< geoscalar, grr3 >()

template bool sameSideLine< geoscalar, grr3 > ( grr3 e,
grr3 p1,
grr3 p2,
grr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ sameSideLine< scalar, arr3 >()

template bool sameSideLine< scalar, arr3 > ( arr3 e,
arr3 p1,
arr3 p2,
arr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ sameSidePlane()

template<class t_scalar , class brr3 >
bool sameSidePlane ( brr3 &  vec,
brr3 &  test,
brr3 &  p1,
brr3 &  p2,
brr3 &  p3 
)

check if points vec and test are at the same side of the plane formed by p1, p2 and p3

◆ sameSidePlane< geoscalar, grr3 >()

template bool sameSidePlane< geoscalar, grr3 > ( grr3 vec,
grr3 test,
grr3 p1,
grr3 p2,
grr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ sameSidePlane< scalar, arr3 >()

template bool sameSidePlane< scalar, arr3 > ( arr3 vec,
arr3 test,
arr3 p1,
arr3 p2,
arr3 p3 
)

Referenced by vec3Arr3DotProduct().

◆ sameSign()

template<class t_scalar >
bool sameSign ( t_scalar  a,
t_scalar  b 
)

check whether two scalars have the same sign

check whether two scalars have the same sign

Referenced by getBAndN(), getNormalInwards(), and sameSidePlane().

◆ sameSign< geoscalar >()

template bool sameSign< geoscalar > ( geoscalar  a,
geoscalar  b 
)

Referenced by vec3Arr3DotProduct().

◆ sameSign< scalar >()

template bool sameSign< scalar > ( scalar  a,
scalar  b 
)

Referenced by vec3Arr3DotProduct().

◆ tangent()

template<class t_scalar , class brr3 >
void tangent ( brr3 &  vecA,
brr3 &  vecB,
brr3 &  t 
)

t = unit(vecA - vecB) t can be either vecA or vecB

◆ tangent< geoscalar, grr3 >()

template void tangent< geoscalar, grr3 > ( grr3 vecA,
grr3 vecB,
grr3 t 
)

Referenced by vec3Arr3DotProduct().

◆ tangent< scalar, arr3 >()

template void tangent< scalar, arr3 > ( arr3 vecA,
arr3 vecB,
arr3 t 
)

Referenced by vec3Arr3DotProduct().

◆ vec3Arr3AddToArr3()

void vec3Arr3AddToArr3 ( vector3 u,
arr3 v,
arr3 w 
)

◆ vec3Arr3DotProduct()

scalar vec3Arr3DotProduct ( vector3 u,
arr3 v 
)

◆ vec3Arr3SubsToArr3()

void vec3Arr3SubsToArr3 ( vector3 u,
arr3 v,
arr3 w 
)

◆ vec3ResizeToArr3()

void vec3ResizeToArr3 ( scalar  f,
vector3 u,
arr3 v 
)

Given a scalar f, resize vec3 u into arr3 u

◆ vec3Vec3SubsToArr3()

template<class brr3 >
void vec3Vec3SubsToArr3 ( vector3 u,
vector3 v,
brr3 &  w 
)

SECTION 3 //////////////////// Transition functions from vector3 to arr3 //

◆ vec3Vec3SubsToArr3< arr3 >()

template void vec3Vec3SubsToArr3< arr3 > ( vector3 u,
vector3 v,
arr3 w 
)

Referenced by vec3Arr3DotProduct().

◆ vec3Vec3SubsToArr3< grr3 >()

template void vec3Vec3SubsToArr3< grr3 > ( vector3 u,
vector3 v,
grr3 w 
)

Referenced by vec3Arr3DotProduct().