3 #include "TEveVector.h" 7 float sgn(
float val) {
return (
val < 0) ? -1 : 1; }
10 TEveVector
cross(
const TEveVector &v1,
const TEveVector &v2) {
13 vec.fX = (v1.fY * v2.fZ) - (v1.fZ * v2.fY);
14 vec.fY = (v1.fZ * v2.fX) - (v1.fX * v2.fZ);
15 vec.fZ = (v1.fX * v2.fY) - (v1.fY * v2.fX);
21 float dot(
const TEveVector &v1,
const TEveVector &v2) {
22 float result = (v1.fX * v2.fX) + (v1.fY * v2.fY) + (v1.fZ * v1.fZ);
31 float dx = v1.fX - v2.fX;
32 float dy = v1.fY - v2.fY;
34 float D = ((v2.fX * v1.fY) - (v1.fX * v2.fY));
36 float rtDescrim =
sqrt(((r * r) * (dr * dr)) - (
D *
D));
43 y = (-
D *
dx) - (fabs(
dy) * rtDescrim);
49 y = (-
D *
dx) + (fabs(
dy) * rtDescrim);
53 TEveVector
result = TEveVector(
x, y, 0.001);
59 TEveVector
a =
p2 -
p1;
60 TEveVector
b = p4 -
p3;
61 TEveVector
c =
p3 -
p1;
77 y = ((z - fabs(
p1.fZ)) *
p2.fY) + ((fabs(
p2.fZ) - z) *
p1.fY);
78 y /= (fabs(
p2.fZ) - fabs(
p1.fZ));
85 float h =
sqrt((
p.fX *
p.fX) + (
p.fY *
p.fY));
95 TEveVector vec = centre;
TEveVector cross(const TEveVector &v1, const TEveVector &v2)
float linearInterpolation(const TEveVector &p1, const TEveVector &p2, float r)
bool checkIntersect(const TEveVector &vec, float r)
float calculateEt(const TEveVector ¢re, float e)
DecomposeProduct< arg, typename Div::arg > D
float dot(const TEveVector &v1, const TEveVector &v2)
TEveVector lineCircleIntersect(const TEveVector &v1, const TEveVector &v2, float r)
TEveVector lineLineIntersect(const TEveVector &v1, const TEveVector &v2, const TEveVector &v3, const TEveVector &v4)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.