|
|
Go to the documentation of this file.
3 #include "TEveVector.h"
11 return (
val < 0 ) ? -1 : 1;
16 cross(
const TEveVector &v1,
const TEveVector &v2 )
20 vec.fX = ( v1.fY * v2.fZ ) - ( v1.fZ * v2.fY );
21 vec.fY = ( v1.fZ * v2.fX ) - ( v1.fX * v2.fZ );
22 vec.fZ = ( v1.fX * v2.fY ) - ( v1.fY * v2.fX );
29 dot(
const TEveVector &v1,
const TEveVector &v2 )
31 float result = ( v1.fX * v2.fX ) + ( v1.fY * v2.fY ) + ( v1.fZ * v1.fZ );
42 float dx = v1.fX - v2.fX;
43 float dy = v1.fY - v2.fY;
45 float D = ( ( v2.fX * v1.fY ) - ( v1.fX * v2.fY ) );
47 float rtDescrim =
sqrt( ( (
r *
r ) * (
dr *
dr ) ) - (
D *
D ) );
51 x = (
D *
dy ) - ( (
sgn(
dy) *
dx ) * rtDescrim );
54 y = ( -
D *
dx ) - ( fabs(
dy ) * rtDescrim );
60 x = (
D *
dy ) + ( (
sgn(
dy) *
dx ) * rtDescrim );
63 y = ( -
D *
dx ) + ( fabs(
dy ) * rtDescrim );
67 TEveVector
result = TEveVector( x, y, 0.001 );
75 TEveVector
a =
p2 -
p1;
76 TEveVector
b =
p4 -
p3;
77 TEveVector
c =
p3 -
p1;
95 y = ( ( z - fabs(
p1.fZ ) ) *
p2.fY ) + ( ( fabs(
p2.fZ ) - z ) *
p1.fY );
96 y /= ( fabs(
p2.fZ) - fabs(
p1.fZ ) );
105 float h =
sqrt( (
p.fX *
p.fX ) + (
p.fY *
p.fY ) );
117 TEveVector vec = centre;
TEveVector lineLineIntersect(const TEveVector &v1, const TEveVector &v2, const TEveVector &v3, const TEveVector &v4)
float calculateEt(const TEveVector ¢re, float e)
float dot(const TEveVector &v1, const TEveVector &v2)
bool checkIntersect(const TEveVector &vec, float r)
TEveVector cross(const TEveVector &v1, const TEveVector &v2)
TEveVector lineCircleIntersect(const TEveVector &v1, const TEveVector &v2, float r)
DecomposeProduct< arg, typename Div::arg > D
float linearInterpolation(const TEveVector &p1, const TEveVector &p2, float r)