# Wrj4P5

### Latest File Release

 l4P5 (beta-003) 2009-05-05 20:38 Loc (beta-005) 2009-05-05 20:33 wrj4p5 (alpha-011) 2009-05-05 20:41

## Class Rod - the model of 3D-Line

`  * Class Rod, the model of partial line on the 3D space,  *                      spanned from it's stern to it's bow  *                                      created by Classiclll, 6/28/2008         Rod(Loc s, Loc b)               // only constructor you can use         Loc at(float t)                 // location at t, at(0):stern, at(me.length):bow         Rod move(Loc to)                // move stern to "to"         Rod shift(Loc diff)             // shift stern by "diff"         Rod shiftI(Loc diff)            // inverse shift         Rod scale(float factor)         // scale the size of me by factor         Rod scaleI(float factor)        // inverse scaling         Loc intersect2D(Rod to)         // intersect position on the x-y plane         Rod rotate(Loc dir, float ang)  // rotate me around the directonal vector         Rod rotate(Rod ax, float ang)   // rotate me around the ax (Rod, model of 3D line)         float signedDist2D(Rod pt)// distance with sign of left/right side on the x-y plane         float dist2D(Loc pt)            // distance between "me" and "pt" on the x-y plane         Loc normal(Loc pt)              // the normal directional vector from "me" to "pt"         Rod ortho(Loc pt)               // the shortest rod connecting from "me" to "pt"         Rod nearest(Rod to)             // the shortest rod connecting from "me" to "to"         float dist(Loc pt)              // distance between "me" and "pt"         boolean having(Loc pt)          // is "me" having "pt" on myself ?         float dist(Rod to)              // least distance between "me" and line "to"         boolean crossing(Rod to)        // are "me" and "to" crossing each other ?         float length()                  // length of me         Loc stern()                     // location of the stern of me         Loc bow()                       // location of the bow of me         Loc fore()                      // foward direction of me, the unit vector         Boolean equals(Object to)         String toString()`