Package snap.gfx3d
Class Line3D
java.lang.Object
snap.gfx3d.Line3D
- All Implemented Interfaces:
Cloneable
This class represents a 3D line.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Standard clone implementation.void
extendEndPointForFraction
(double aValue) Changes line end point for fractional value.double
Returns the angle between two XY points.static double
getAngleBetweenPoints2DInDeg
(double x1, double y1, double x2, double y2) Returns the angle between two XY points.double
Returns the distance between the XY components (assumes the line is in View space).double
Returns the distance between the XY components (assumes the line is in View space).getP1()
Returns the first point.getP2()
Returns the second point.
-
Constructor Details
-
Line3D
Constructor. -
Line3D
public Line3D(double x1, double y1, double z1, double x2, double y2, double z2) Constructor.
-
-
Method Details
-
getP1
Returns the first point. -
getP2
Returns the second point. -
getLength
public double getLength()Returns the distance between the XY components (assumes the line is in View space). -
getLengthXY
public double getLengthXY()Returns the distance between the XY components (assumes the line is in View space). -
extendEndPointForFraction
public void extendEndPointForFraction(double aValue) Changes line end point for fractional value. E.g.: 2 doubles length of line. -
getAngle2DInDeg
public double getAngle2DInDeg()Returns the angle between two XY points. -
clone
Standard clone implementation. -
getAngleBetweenPoints2DInDeg
public static double getAngleBetweenPoints2DInDeg(double x1, double y1, double x2, double y2) Returns the angle between two XY points.
-