geometry
Class J3Utility

java.lang.Object
  extended by geometry.J3Utility

public class J3Utility
extends java.lang.Object


  This class provides some utility for common geometrical calculation.


Constructor Summary
J3Utility()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

J3Utility

public J3Utility()
Method Detail

getDistanceFromLineToPoint

public static double getDistanceFromLineToPoint(J3Line line,
                                                J3Vector r)
returns distance between a line and a point


moveLineVectorToPlane

public 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


setJ3LinePositiveAxisLengthForGivenLength

public static void setJ3LinePositiveAxisLengthForGivenLength(J3Line line,
                                                             double lineLength)
Set J3Line's axis length so that its absolute length |J3Line| is equal to the given length.
       J3Line line        :   J3Line vector you want to set.
       lineLength         :   The value you have for |line|.
       
Choose the positive value of axis length.


setJ3LineNegativeAxisLengthForGivenLength

public static void setJ3LineNegativeAxisLengthForGivenLength(J3Line line,
                                                             double lineLength)
Set J3Line's axis length so that its absolute length |J3Line| is equal to the given length.
       J3Line line        :   J3Line vector you want to set.
       lineLength         :   The value you have for |line|.
       
Choose the negative value of axis length.


setJ3LinePositiveAxisLengthForGivenLength

public 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.
       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.


setJ3LineNegativeAxisLengthForGivenLength

public 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.
       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.


getThePerpendicularOnLineFromPoint

public static J3Vector getThePerpendicularOnLineFromPoint(J3Line line,
                                                          J3Vector r)