Main Page
Class Categories
Classes
Namespaces
File List
File Members
exper-sw
cosmosw
AugerSW
Offline
source
main
Utilities
Geometry
Line.cc
Go to the documentation of this file.
1
#include <cmath>
2
#include <utl/Line.h>
3
#include <utl/Plane.h>
4
#include <utl/ErrorLogger.h>
5
6
using namespace
std;
7
using namespace
utl;
8
9
10
Line::Line(
const
Point
& anchor,
const
Vector
& direction) :
11
fAnchor(anchor)
12
{
13
const
double
norm2 = direction.
GetMag2
();
14
if
(norm2) {
15
fDirection
= direction;
16
fDirection
/=
sqrt
(norm2);
17
}
else
{
18
ERROR
(
"Line class initialized with invalid direction!"
);
19
fDirection
=
Vector
();
20
}
21
}
utl::Point
Point object.
Definition:
Point.h:32
utl::Line::fDirection
Vector fDirection
Definition:
Line.h:34
sqrt
double sqrt(const size_t x)
Definition:
Tools/InclinedShowers/TankResponse/Tabular/TankResponse.cc:28
utl::Vector
Vector object.
Definition:
Vector.h:30
ERROR
#define ERROR(message)
Macro for logging error messages.
Definition:
ErrorLogger.h:165
utl::Vector::GetMag2
double GetMag2() const
Definition:
Vector.h:61
, generated on Tue Sep 26 2023.