<HTML>
<HEAD>
<TITLE>Untitled file 'Segment.html'</TITLE>
<!-- Copyright (c) 1996 by The Geometry Center. All Rights Reserved. -->
</HEAD>
<BODY BGCOLOR="FFFFFF">
<!-- *Navigation-Links -->
<B>Up:</B> <A HREF="source.html"><I>Java Kali Source Code and Documentation</I></A><BR>
<HR>
<p>

<!-- *Begin-Document-Body -->
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Mon Sep 16 15:21:24 CDT 1996 -->
<A NAME="_top_"></A>
<TITLE>
  Class Segment
</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<H1>Class Segment</H1>
<PRE>
<A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.Object.html#_top_">java.lang.Object</A>
   |
   +----Segment
</PRE>
<HR>
<DL>
  <DT>class <B>Segment</B>
  <DT>extends <A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.Object.html#_top_">Object</A>
</DL>
A Segment is simply a collection of two DVectors; it's the
basic unit of drawing in Kali.
<HR>
<A NAME="index"></A>
<H2><IMG SRC="images/constructor-index.gif" WIDTH=275 HEIGHT=38 ALT="Constructor Index"></H2>
<DL>
  <DT><IMG SRC="images/yellow-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#Segment(double, double, double, double)"><B>Segment</B></A>(double, double, double, double)
  <DD>Create a new segment from 4 doubles

  <DT><IMG SRC="images/yellow-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#Segment(DVector, DVector)"><B>Segment</B></A>(DVector, DVector)
  <DD>Create a new segment from 2 DVectors.
</DL>
<H2><IMG SRC="images/method-index.gif" WIDTH=207 HEIGHT=38 ALT="Method Index"></H2>
<DL>
  <DT><IMG SRC="images/green-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#array(double, double, double, double)"><B>array</B></A>(double, double, double, double)
  <DD>Construct an array of Segments; the array method takes
4, 8, 12, or 16 doubles, and returns an array of 1,2,3, or
4 Segments, respectively.
  <DT><IMG SRC="images/green-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#array(double, double, double, double, double, double, double, double)"><B>array</B></A>(double, double, double, double, double, double, double, double)
<DD><DT><IMG SRC="images/green-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#array(double, double, double, double, double, double, double, double, double, double, double, double)"><B>array</B></A>(double, double, double, double, double, double, double, double, double, double, double, double)
<DD><DT><IMG SRC="images/green-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#array(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)"><B>array</B></A>(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)
<DD><DT><IMG SRC="images/green-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#aString(Segment[])"><B>aString</B></A>(Segment[])
  <DD>Convert an array of Segments to a string

  <DT><IMG SRC="images/red-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#copy()"><B>copy</B></A>()
  <DD>Return a new segment which is a copy of this one.
  <DT><IMG SRC="images/red-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#reverse()"><B>reverse</B></A>()
  <DD>Swap the two endpoints of this segment.
  <DT><IMG SRC="images/red-ball-small.gif" WIDTH=6 HEIGHT=6 ALT=" o ">
	<A HREF="#toString()"><B>toString</B></A>()
  <DD>Convert this segment to a string

</DL>
<A NAME="constructors"></A>
<H2><IMG SRC="images/constructors.gif" WIDTH=231 HEIGHT=38 ALT="Constructors"></H2>
<A NAME="Segment"></A>
<A NAME="Segment(double, double, double, double)"><IMG SRC="images/yellow-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<B>Segment</B>
<PRE>
  public Segment(double x0,
                 double y0,
                 double x1,
                 double y1)
</PRE>
<DL>
  <DD>Create a new segment from 4 doubles
</DL>
<A NAME="Segment(DVector, DVector)"><IMG SRC="images/yellow-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<B>Segment</B>
<PRE>
  public Segment(<A HREF="DVector.html#_top_">DVector</A> p0,
                 <A HREF="DVector.html#_top_">DVector</A> p1)
</PRE>
<DL>
  <DD>Create a new segment from 2 DVectors.
</DL>
<A NAME="methods"></A>
<H2><IMG SRC="images/methods.gif" WIDTH=151 HEIGHT=38 ALT="Methods"></H2>
<A NAME="copy()"><IMG SRC="images/red-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="copy"><B>copy</B></A>
<PRE>
  public <A HREF="#_top_">Segment</A> copy()
</PRE>
<DL>
  <DD>Return a new segment which is a copy of this one.
</DL>
<A NAME="reverse()"><IMG SRC="images/red-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="reverse"><B>reverse</B></A>
<PRE>
  public void reverse()
</PRE>
<DL>
  <DD>Swap the two endpoints of this segment.
</DL>
<A NAME="toString()"><IMG SRC="images/red-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="toString"><B>toString</B></A>
<PRE>
  public <A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.String.html#_top_">String</A> toString()
</PRE>
<DL>
  <DD>Convert this segment to a string
  <DL>
    <DT><B>Overrides:</B>
    <DD><A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.Object.html#toString()">toString</A> in class <A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.Object.html">Object</A>
  </DL>
</DL>
<A NAME="array(double, double, double, double)"><IMG SRC="images/green-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="array"><B>array</B></A>
<PRE>
  public static <A HREF="#_top_">Segment</A>[] array(double x0,
                                double y0,
                                double x1,
                                double y1)
</PRE>
<DL>
  <DD>Construct an array of Segments; the array method takes
4, 8, 12, or 16 doubles, and returns an array of 1,2,3, or
4 Segments, respectively.
</DL>
<A NAME="array(double, double, double, double, double, double, double, double)"><IMG SRC="images/green-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="array"><B>array</B></A>
<PRE>
  public static <A HREF="#_top_">Segment</A>[] array(double x0,
                                double y0,
                                double x1,
                                double y1,
                                double x2,
                                double y2,
                                double x3,
                                double y3)
</PRE>
<A NAME="array(double, double, double, double, double, double, double, double, double, double, double, double)"><IMG SRC="images/green-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="array"><B>array</B></A>
<PRE>
  public static <A HREF="#_top_">Segment</A>[] array(double x0,
                                double y0,
                                double x1,
                                double y1,
                                double x2,
                                double y2,
                                double x3,
                                double y3,
                                double x4,
                                double y4,
                                double x5,
                                double y5)
</PRE>
<A NAME="array(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)"><IMG SRC="images/green-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="array"><B>array</B></A>
<PRE>
  public static <A HREF="#_top_">Segment</A>[] array(double x0,
                                double y0,
                                double x1,
                                double y1,
                                double x2,
                                double y2,
                                double x3,
                                double y3,
                                double x4,
                                double y4,
                                double x5,
                                double y5,
                                double x6,
                                double y6,
                                double x7,
                                double y7)
</PRE>
<A NAME="aString(Segment[])"><IMG SRC="images/green-ball.gif" WIDTH=12 HEIGHT=12 ALT=" o "></A>
<A NAME="aString"><B>aString</B></A>
<PRE>
  public static <A HREF="http://www.javasoft.com/products/JDK/CurrentRelease/api/java.lang.String.html#_top_">String</A> aString(<A HREF="#_top_">Segment</A> s[])
</PRE>
<DL>
  <DD>Convert an array of Segments to a string
</DL>
<!-- *End-Document-Body -->
<p>

<!-- *Navigation-Links -->
<HR>
<B>Up:</B> <A HREF="source.html"><I>Java Kali Source Code and Documentation</I></A><BR>

<!-- *GC-Common-Footer -->
<HR>
<NOBR><A HREF="/"><IMG SRC="/pix/home.gif" ALT="[HOME]" ALIGN=MIDDLE></A>
<I>The Geometry Center Home Page</I></NOBR>
<p>
Author: <A HREF="http://www.geom.umn.edu/locate/mbp">Mark Phillips</A><BR>
Comments to:
<A HREF="/admin/mail/webmaster.html">webmaster@geom.umn.edu</A><BR>
Created:  Sep 16 1996 --- 
<!-- hhmts start -->
Last modified: Sep 18 1996
<!-- hhmts end -->
</BODY>
</HTML>
