Line segment in two dimensions.
More...
#include <JSegment2D.hh>
Line segment in two dimensions.
Definition at line 35 of file JSegment2D.hh.
JGEOMETRY2D::JSegment2D::JSegment2D |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 42 of file JSegment2D.hh.
std::pair< JPosition2D, JPosition2D > JSegment2D_t
Type definition of line segment in two dimensions.
Constructor.
- Parameters
-
A | start position |
B | end position |
Definition at line 53 of file JSegment2D.hh.
std::pair< JPosition2D, JPosition2D > JSegment2D_t
Type definition of line segment in two dimensions.
double JGEOMETRY2D::JSegment2D::getLengthSquared |
( |
| ) |
const |
|
inline |
Get length squared.
- Returns
- square of length
Definition at line 64 of file JSegment2D.hh.
Data structure for vector in two dimensions.
double getLengthSquared() const
Get length squared.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
double JGEOMETRY2D::JSegment2D::getLength |
( |
| ) |
const |
|
inline |
Get length.
- Returns
- length
Definition at line 75 of file JSegment2D.hh.
double getLengthSquared() const
Get length squared.
bool JGEOMETRY2D::JSegment2D::intersects |
( |
const JSegment2D & |
segment | ) |
const |
|
inline |
Test whether two line segments intersect.
- Parameters
-
- Returns
- true if two line segment intersect; else false
Definition at line 87 of file JSegment2D.hh.
90 getCCW(segment.first,
this->first, segment.second) !=
getCCW(segment.first,
this->second, segment.second));
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn this
bool getCCW(const T &a, const T &b, const T &c)
Check sequence of three points in X-Y plane.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Get intersection of two line segments.
- Parameters
-
- Returns
- intersection point
Definition at line 100 of file JSegment2D.hh.
103 JVector2D db(segment.second - segment.first);
118 throw JDivisionByZero(
"JSegment2D::getIntersection()");
Data structure for vector in two dimensions.
double getPerpDot(const JFirst_t &first, const JSecond_t &second)
Get perpendicular dot product of objects.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
double JGEOMETRY2D::JSegment2D::getDistanceSquared |
( |
const JVector2D & |
point | ) |
const |
|
inline |
Get squared of distance to point.
- Parameters
-
- Returns
- square of distance
Definition at line 129 of file JSegment2D.hh.
133 const double gp =
D.getLengthSquared();
139 double u =
D.getDot(U);
151 return D.getLengthSquared();
155 return first.getDistanceSquared(point);
Data structure for vector in two dimensions.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
do echo Generating $dir eval D
double JGEOMETRY2D::JSegment2D::getDistance |
( |
const JVector2D & |
point | ) |
const |
|
inline |
Get distance to point.
- Parameters
-
- Returns
- distance
Definition at line 166 of file JSegment2D.hh.
double getDistanceSquared(const JVector2D &point) const
Get squared of distance to point.
double JGEOMETRY2D::JSegment2D::getDot |
( |
const JSegment2D & |
segment | ) |
const |
|
inline |
Get dot product.
- Parameters
-
- Returns
- dot product
Definition at line 178 of file JSegment2D.hh.
Data structure for vector in two dimensions.
double getDot(const JVector2D &point) const
Get dot product.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Read segment from input.
- Parameters
-
- Returns
- reader
Definition at line 191 of file JSegment2D.hh.
194 in >> segment.second;
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Write segment to output.
- Parameters
-
- Returns
- writer
Definition at line 207 of file JSegment2D.hh.
209 out << segment.first;
210 out << segment.second;
The documentation for this class was generated from the following file: