Package eu.iv4xr.framework.spatial
Class Line
java.lang.Object
eu.iv4xr.framework.spatial.Line
A partial line that lies between point a and b.
- Author:
- Naraenda
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
a
Point A, also used as origin point. -
b
Point B
-
-
Constructor Details
-
Line
Constructs a line between two point.- Parameters:
a
- Point Ab
- Point B
-
-
Method Details
-
direction
- Returns:
- Normalized vector from origin A to B.
-
origin
- Returns:
- The origin A.
-
alongLine
- Parameters:
d
- Distance from the origin.- Returns:
- Origin() + d * Direcition()
-
length
public float length()- Returns:
- Distance between A and B.
-