Class LineSegment

java.lang.Object
  |
  +--LineSegment

public class LineSegment
extends java.lang.Object

Class to represent a single line segment.


Field Summary
 RegionPixelStats core_stats
          stats about the pixels contained within the line's core region
 DPoint direction
           
 DPoint end
          the other endpoint
 EndPoint endpoint1
          the EndPoint object corresponding to start
 EndPoint endpoint2
          the EndPoint object corresponding to end
 int id
          Its id - same ID as its corresponding quadric group
 QuadricGroup quads
           
 DPoint start
          one endpoint of the line
 double width
          the width, in pixels
 RegionPixelStats wing1_stats
          stats about the pixels contained in wing #1
 RegionPixelStats wing2_stats
          stats about the pixels contained in wing #2
 
Constructor Summary
LineSegment(int _id, DPoint p1, DPoint p2, double w, RegionPixelStats _core_stats, RegionPixelStats _wing1_stats, RegionPixelStats _wing2_stats, QuadricGroup qg)
          create a new LineSegment with given id, start, end, and width
 
Method Summary
 java.lang.String toString()
          for debug printing
static DPoint unitVector(DPoint p1, DPoint p2)
          return a unit vector representing the direction of the segment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public int id
Its id - same ID as its corresponding quadric group


start

public DPoint start
one endpoint of the line


end

public DPoint end
the other endpoint


width

public double width
the width, in pixels


core_stats

public RegionPixelStats core_stats
stats about the pixels contained within the line's core region


wing1_stats

public RegionPixelStats wing1_stats
stats about the pixels contained in wing #1


wing2_stats

public RegionPixelStats wing2_stats
stats about the pixels contained in wing #2


direction

public DPoint direction

quads

public QuadricGroup quads

endpoint1

public EndPoint endpoint1
the EndPoint object corresponding to start


endpoint2

public EndPoint endpoint2
the EndPoint object corresponding to end

Constructor Detail

LineSegment

public LineSegment(int _id,
                   DPoint p1,
                   DPoint p2,
                   double w,
                   RegionPixelStats _core_stats,
                   RegionPixelStats _wing1_stats,
                   RegionPixelStats _wing2_stats,
                   QuadricGroup qg)
create a new LineSegment with given id, start, end, and width

Method Detail

unitVector

public static DPoint unitVector(DPoint p1,
                                DPoint p2)
return a unit vector representing the direction of the segment


toString

public java.lang.String toString()
for debug printing

Overrides:
toString in class java.lang.Object