Beispiel #1
0
        /// <summary>
        /// Constructor (Named) -
        /// </summary>
        /// <param name="arc_visitor"></param>
        /// <param name="angular_position"></param>
        /// <param name="extrusion"></param>
        /// <param name="transformation"></param>
        /// <returns></returns>
        public static ShapeVisitor geometry_visitor(ArcVisitor arc_visitor, float angular_position, float extrusion, Transform transformation)
        {
            ShapeVisitor result = new ShapeVisitor(arc_visitor, extrusion, transformation);

            result.set_position(angular_position);
            return(result);
        }
Beispiel #2
0
 private ShapeVisitor(ArcVisitor arc_visitor, float extrusion, Transform transformation)
 {
     this.arc_visitor = arc_visitor;
     block_transform  = transformation;
     last_extrusion   = extrusion;
     angular_position = 0;
     initialize();
     calculate_location();
 }
Beispiel #3
0
        /// <summary>
        /// Returns the index of any existing arc within the shape that matches the external reference.
        /// </summary>
        /// <param name="arc">The reference to the external arc that will be compared to the shape's arc list.</param>
        /// <returns>The index of the match if the arc exists in the container; a nonexistent index otherwise.</returns>
        public optional <ArcVisitor> arc_visitor(Arc arc)
        {
            int arc_list_index = Array.IndexOf(arc_list, arc);

            if (arc_list_index == -1)
            {
                return(new optional <ArcVisitor>());
            }
            return(ArcVisitor.arc_visitor(this, arc_list_index));
        }