geometry
public class J3Utility extends java.lang.Object
This class provides some utility for common geometrical calculation.
| Constructor and Description | 
|---|
J3Utility()  | 
| Modifier and Type | Method and Description | 
|---|---|
static double | 
getDistanceFromLineToPoint(J3Line line,
                          J3Vector r)
returns distance between a line and a point 
 | 
static J3Vector | 
getThePerpendicularOnLineFromPoint(J3Line line,
                                  J3Vector r)  | 
static void | 
moveLineVectorToPlane(J3Line line,
                     J3UnitVector nPlane,
                     J3Vector rPlane)
Move the line vector to where it crosses a plane with
        a fixed point vector rPlane and plane direction nPlane 
 | 
static void | 
setJ3LineNegativeAxisLengthForGivenLength(J3Line line,
                                         double lineLength)
Set J3Line's axis length so that its absolute length |J3Line|
       is equal to the given length. 
 | 
static void | 
setJ3LineNegativeAxisLengthForGivenLength(J3Line line,
                                         J3Vector r,
                                         double lineLength)
Set J3Line's axis length so that its absolute length |J3Line-J3Vector|
       is equal to the given length. 
 | 
static void | 
setJ3LinePositiveAxisLengthForGivenLength(J3Line line,
                                         double lineLength)
Set J3Line's axis length so that its absolute length |J3Line|
       is equal to the given length. 
 | 
static void | 
setJ3LinePositiveAxisLengthForGivenLength(J3Line line,
                                         J3Vector r,
                                         double lineLength)
Set J3Line's axis length so that its absolute length |J3Line-J3Vector|
       is equal to the given length. 
 | 
public static double getDistanceFromLineToPoint(J3Line line, J3Vector r)
public static void moveLineVectorToPlane(J3Line line, J3UnitVector nPlane, J3Vector rPlane)
public static void setJ3LinePositiveAxisLengthForGivenLength(J3Line line, double lineLength)
       J3Line line        :   J3Line vector you want to set.
       lineLength         :   The value you have for |line|.
       
       Choose the positive value of axis length.public static void setJ3LineNegativeAxisLengthForGivenLength(J3Line line, double lineLength)
       J3Line line        :   J3Line vector you want to set.
       lineLength         :   The value you have for |line|.
       
       Choose the negative value of axis length.public static void setJ3LinePositiveAxisLengthForGivenLength(J3Line line, J3Vector r, double lineLength)
       J3Line line        :   J3Line vector you want to set.
       J3Vector r         :   J3Vector from which the vector goes to J3Line above
       lineLength         :   The value you have for |line|.
       
       Choose the positive value of axis length.public static void setJ3LineNegativeAxisLengthForGivenLength(J3Line line, J3Vector r, double lineLength)
       J3Line line        :   J3Line vector you want to set.
       J3Vector r         :   J3Vector from which the vector goes to J3Line above
       lineLength         :   The value you have for |line|.
       
       Choose the negative value of axis length.