Exemple #1
0
        //---------------------------------OVERRIDES------------------------------------//

        /**
         * Clones the Line object
         *
         * @return cloned Line object
         */
        public Line Clone()
        {
            Line clone = new Line();

            clone.direction = direction.Clone();
            clone.point     = point.Clone();
            return(clone);
        }
        //-----------------------------------OVERRIDES----------------------------------//

        /**
         * Clones the Segment object
         *
         * @return cloned Segment object
         */
        public Segment Clone()
        {
            Segment clone = new Segment();

            clone.line        = line.Clone();
            clone.index       = index;
            clone.startDist   = startDist;
            clone.endDist     = endDist;
            clone.startDist   = startType;
            clone.middleType  = middleType;
            clone.endType     = endType;
            clone.startVertex = startVertex.Clone();
            clone.endVertex   = endVertex.Clone();
            clone.startPos    = startPos.Clone();
            clone.endPos      = endPos.Clone();

            return(clone);
        }
Exemple #3
0
 /**
  * Constructor for a ray
  *
  * @param direction direction ray
  * @param point beginning of the ray
  */
 public Line(Vector3d direction, Point3d point)
 {
     this.direction = direction.Clone();
     this.point     = point.Clone();
     direction.normalize();
 }
Exemple #4
0
        //-----------------------------------SETS---------------------------------------//

        /**
         * Sets a new point
         *
         * @param point new point
         */
        public void setPoint(Point3d point)
        {
            this.point = point.Clone();
        }