Squeak Class Documentation category index | class index  
 
LineSegment
  category: Balloon-Geometry
  superclass: Object
  subclasses: Bezier2Segment Bezier3Segment LineIntersectionSegment

This class represents a straight line segment between two points

Instance variables:
start <Point> start point of the line
end <Point> end point of the line

instance methods
  accessing
  bounds
direction
end
start

  converting
  asBezier2Segment
asIntegerSegment
asLineSegment

  initialize
  from:to:

  printing
  printOn:

  private
  debugDraw

  testing
  hasZeroLength
isBezier2Segment
isLineSegment
isStraight

  vector functions
  length
lineSegmentsDo:
sideOfPoint:
tangentAt:
tangentAtEnd
tangentAtStart
valueAt:
valueAtEnd
valueAtStart

class methods
  instance creation
  from:to:

instance methods
  accessing top  
 

bounds

Return the bounds containing the receiver


 

direction


 

end

Return the end point


 

start

Return the start point


  converting top  
 

asBezier2Segment

Represent the receiver as quadratic bezier segment


 

asIntegerSegment

Convert the receiver into integer representation


 

asLineSegment

Represent the receiver as a straight line segment


  initialize top  
 

from:to:

Initialize the receiver


  printing top  
 

printOn:

Print the receiver on aStream


  private top  
 

debugDraw


  testing top  
 

hasZeroLength

Return true if the receiver has zero length


 

isBezier2Segment

Return true if the receiver is a quadratic bezier segment


 

isLineSegment

Return true if the receiver is a line segment


 

isStraight

Return true if the receiver represents a straight line


  vector functions top  
 

length

Return the length of the receiver


 

lineSegmentsDo:

Evaluate aBlock with the receiver's line segments


 

sideOfPoint:

Return the side of the receiver this point is on. The method returns
-1: if aPoint is left
0: if aPoint is on
+1: if a point is right
of the receiver.


 

tangentAt:

Return the tangent at the given parametric value along the receiver


 

tangentAtEnd

Return the tangent for the last point


 

tangentAtStart

Return the tangent for the last point


 

valueAt:

Evaluate the receiver at the given parametric value


 

valueAtEnd

Evaluate the receiver at it's end point (e.g., self valueAtEnd = (self valueAt: 1.0))


 

valueAtStart

Evaluate the receiver at it's start point (e.g., self valueAtEnd = (self valueAt: 0.0))


class methods
  instance creation top  
 

from:to: