コード例 #1
0
 /// <summary>
 /// Constructor for a polygon (surface or opening)
 /// </summary>
 /// <param name="window">True if the polygon is an opening otherwise false</param>
 /// <param name="id">Unique identifier for the polygon</param>
 /// <param name="points">Basic points of the polygon</param>
 /// <param name="openings">Optional: List of all openings in the traverse</param>
 public Surface(bool window, String id, List <Point3D> points, List <Surface> openings = null)
 {
     Id = id;
     if (points != null)
     {
         foreach (Point3D p in points)
         {
             var p1 = new PointVS(p);
             Points.Add(p1);
         }
     }
     if (openings != null || window == false)
     {
         this.openings = new List <Surface>();
         if (openings != null)
         {
             Openings = openings;
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Full constructor for the shadow service
 /// </summary>
 /// <param name="sun">3D Vector representing the solar beam (x,y,z)</param>
 /// <param name="surfaces">List of polygons</param>
 public ShadowServ(Vector3D sun, List <Surface> surfaces)
 {
     Sun   = new PointVS(sun);
     polys = new List <Surface>();
     polys.AddRange(surfaces);
 }
コード例 #3
0
 /// <summary>
 /// Default constructor:
 /// List of polygons is empty
 /// sun vector: 0 0 0
 /// </summary>
 public ShadowServ()
 {
     sun   = new PointVS(new Vector3D(0, 0, 0));
     polys = new List <Surface>();
 }