com.hedgehog.geo.twod.curves
Class InfiniteStraightLine2D

java.lang.Object
  extended by com.hedgehog.HObject
      extended by com.hedgehog.geo.GeometricObject
          extended by com.hedgehog.geo.twod.GeometricObject2D
              extended by com.hedgehog.geo.twod.curves.Curve2D
                  extended by com.hedgehog.geo.twod.curves.LinearLine2D
                      extended by com.hedgehog.geo.twod.curves.InfiniteStraightLine2D
All Implemented Interfaces:
ModelObject, java.lang.Comparable, java.util.Comparator

public class InfiniteStraightLine2D
extends LinearLine2D
implements ModelObject

Title: InfiniteStraightLine2D - models an infinite straight line.

Description: Models a 2D straight line of infinite extent. InfiniteStraightLine2D extends LinearLine2D can be viewed as merely an alternative naming of class LinearLine2D.

Copyright: Copyright (c) Hedgehog Software 2007-2009.

Company: Hedgehog Software

Since:
1.0
Version:
1.1

Field Summary
 
Fields inherited from class com.hedgehog.geo.twod.curves.LinearLine2D
mLinearEquation
 
Fields inherited from class com.hedgehog.geo.twod.curves.Curve2D
mp0, mp1
 
Fields inherited from class com.hedgehog.HObject
mID, mName
 
Constructor Summary
InfiniteStraightLine2D()
          Default constructor.
InfiniteStraightLine2D(ID id)
          Constructor.
InfiniteStraightLine2D(InfiniteStraightLine2D object)
          Copy constructor.
InfiniteStraightLine2D(LinearLine2D line)
          Constructor.
InfiniteStraightLine2D(Point2D p0, Point2D p1)
          Constructor.
InfiniteStraightLine2D(java.lang.String name)
          Constructor.
InfiniteStraightLine2D(java.lang.String name, ID id)
          Constructor.
 
Method Summary
 double minimumDistance(Point2D p, double tolerance)
          Returns the minimum distance from the specified point to an infinite straight-line.
 java.lang.String toString()
          Returns a String representation of an InfiniteStraightLine2D object.
 
Methods inherited from class com.hedgehog.geo.twod.curves.LinearLine2D
angleBetween, angleOfInclination, childModelObjects, databaseInsertStatement, databaseUpdateStatement, distanceToLine, fromDatabase, fromXMLNode, getLinearEquation, gradient, intersection, isHorizontal, isParallel, isPoint, isValid, isVertical, length, lineOffsetDistanceFromLine, minimumDistance, normal, normalise, onSameSide, perpendcularLineThroughPoint, pointNearestOrigin, pointOffsetDistanceAlongLine, pointOnCurve, pointOnCurve, pointOnLeft, pointOnRight, projectedDistance, projectedPoint, setEquationCoefficients, setLinearEquation, tangent, toX3DNode, toXMLNode, xIntercept, xLinearPolynomial, yIntercept, yLinearPolynomial
 
Methods inherited from class com.hedgehog.geo.twod.curves.Curve2D
commonEndPoint, curvature, curvePoints, distanceBetweenTwoPointsAlongCurve, distanceBetweenTwoPointsAlongCurve, equals, evenlySpacedIntermediatePoints, getP0, getP1, interpolation, is2D, is3D, isCurve, isEndPoint, isEndPointP0, isEndPointP1, isGrid, isMesh, isOpen, isP0Set, isP1Set, isPointSet, isShape, isSurface, jacobianDeterminant, length, lengthCoordinates, lengthFunction, maximumX, maximumY, midPoint, minimumX, minimumY, nearestEndPoint, nearestEndPoint, nearestPoint, nearestPointApprox, otherEndPoint, parametricVariable, pointOfCurve, pointXOnCurve, pointYOnCurve, randomPoint, reverse, sameCurve, sameEndPoints, secondDerivative, setP0, setP1, shapeFunctions, shapeFunctions, shapeFunctionsDerivatives, shareEndPoint, tangent, toPolyStraightLine2D, trihedron, unitBiNormalVector, unitPrincipalNormalVector
 
Methods inherited from class com.hedgehog.geo.GeometricObject
objectDimension
 
Methods inherited from class com.hedgehog.HObject
clone, compare, compareTo, copy, getID, getName, hashCode, hasID, hasName, setID, setName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hedgehog.model.ModelObject
childModelObjects, databaseInsertStatement, databaseUpdateStatement, fromDatabase, fromXMLNode, toX3DNode, toXMLNode
 

Constructor Detail

InfiniteStraightLine2D

public InfiniteStraightLine2D()
Default constructor.


InfiniteStraightLine2D

public InfiniteStraightLine2D(Point2D p0,
                              Point2D p1)
Constructor. Sets the end points to the specified points.

Parameters:
p0 - End-point p0.
p1 - End-point p1.

InfiniteStraightLine2D

public InfiniteStraightLine2D(LinearLine2D line)
Constructor. Converts a LinearLine2D object to an InfiniteStraightLine2D object.

Parameters:
line - LinearLine2D object.

InfiniteStraightLine2D

public InfiniteStraightLine2D(java.lang.String name)
Constructor.

Parameters:
name - Object name.

InfiniteStraightLine2D

public InfiniteStraightLine2D(ID id)
Constructor.

Parameters:
id - Object ID.

InfiniteStraightLine2D

public InfiniteStraightLine2D(java.lang.String name,
                              ID id)
Constructor.

Parameters:
name - Object name.
id - Object ID.

InfiniteStraightLine2D

public InfiniteStraightLine2D(InfiniteStraightLine2D object)
Copy constructor.

Parameters:
object - Object to copy.
Method Detail

minimumDistance

public double minimumDistance(Point2D p,
                              double tolerance)
Returns the minimum distance from the specified point to an infinite straight-line. Note that unlike a Ray3D, the points that define the infinite line are not taken account, just the line direction.

Overrides:
minimumDistance in class Curve2D
Parameters:
p - Point to find minimum distance to this line.
tolerance - Required tolerance.
Returns:
Minimum distance between this line and the specified point.

toString

public java.lang.String toString()
Returns a String representation of an InfiniteStraightLine2D object.

Overrides:
toString in class LinearLine2D
Returns:
A String representation of an InfiniteStraightLine2D object.