public class TwoSegment extends Object
Modifier and Type | Field and Description |
---|---|
private TwoSpacePoint |
_a |
private TwoSpacePoint |
_b |
private double |
_length |
Constructor and Description |
---|
TwoSegment(TwoSpacePoint a,
TwoSpacePoint b)
Constructor
|
Modifier and Type | Method and Description |
---|---|
TwoSpacePoint |
endPoint()
Fetch the ending point
|
static TwoSpacePoint |
intersection(TwoSegment a,
TwoSegment b)
return intersection point of two line segments
|
double |
length()
Return the length of the segment
|
double |
minimumDistance(TwoSpacePoint p)
calculate the minimum distance between this segment and a point p
|
double |
phi()
Return the azimuthal angle of this segment, the angle from point 1 to 2
zero & 3pi/4 is vertical
pi and 2pi is horizontal
|
TwoSpacePoint |
startPoint()
Fetch the starting point
|
String |
toString()
String representation of this object
|
private TwoSpacePoint _a
private TwoSpacePoint _b
private double _length
public TwoSegment(TwoSpacePoint a, TwoSpacePoint b)
a
- beginning TwoSpacePointb
- ending TwoSpacePointpublic TwoSpacePoint startPoint()
public TwoSpacePoint endPoint()
public double length()
public double phi()
public double minimumDistance(TwoSpacePoint p)
p
- The TwoSpacePointpublic static TwoSpacePoint intersection(TwoSegment a, TwoSegment b)
a
- The first line segmentb
- The second line segmentCopyright © 2016 Linear Collider Detector (LCD). All rights reserved.