Exemplo n.º 1
0
        public g3Line vertical(g3RowVec point)                                                     // must be moved to g2Line, only for testing, all z-Values must be 0 for testing
        {
            g3Line ret = new g3Line(this);

            ret.ePoint.x = point.x + dir.y;
            ret.ePoint.y = point.y - dir.x;
            ret.init(point, ret.ePoint);
            return(ret);
        }
Exemplo n.º 2
0
 private void init(g3RowVec start, g3RowVec end)
 {
     if (!selfTested)
     {
         selfTest();
     }
     this.sPoint = start;
     this.ePoint = end;
     this.pnt.x  = start.x; this.pnt.y = start.y; this.pnt.z = start.z;
     this.dir.x  = end[1, 1, 1] - start[1, 1, 1]; this.dir.y = end[1, 2, 1] - start[1, 2, 1]; this.dir.z = end[1, 3, 1] - start[1, 3, 1];
     len         = Math.Sqrt(this.dir.x * this.dir.x + this.dir.y * this.dir.y + this.dir.z * this.dir.z);
     this.dir.x  = this.dir.x / len; this.dir.y = this.dir.y / len; this.dir.z = this.dir.z / len;
 }
Exemplo n.º 3
0
 public g3Line(g3RowVec start, g3RowVec end)
 {
     init(start, end);
 }
Exemplo n.º 4
0
 public g3RowVec(g3RowVec cloneFrom) : base(3, 1, 1)
 {
     this.x = cloneFrom.x; this.y = cloneFrom.y; this.z = cloneFrom.z;
 }