protected override void SolveInstance(IGH_DataAccess DA) { if (DA.Iteration == 0) { _vectors = new List <DisplayVector>(); _bounds = BoundingBox.Unset; } Point3d point = Point3d.Unset; Vector3d vector = Vector3d.Unset; Color colour = Color.Black; int width = 1; if (!DA.GetData(0, ref point)) { return; } if (!DA.GetData(1, ref vector)) { return; } if (!DA.GetData(2, ref colour)) { return; } if (!DA.GetData(3, ref width)) { return; } DisplayVector dispVec = new DisplayVector(); dispVec.Colour = colour; dispVec.Point = point; dispVec.Vector = vector; dispVec.Width = width; _vectors.Add(dispVec); _bounds.Union(point); _bounds.Union((Point3d)(point + vector)); }
protected override void SolveInstance(IGH_DataAccess DA) { if (DA.Iteration == 0) { _vectors = new List<DisplayVector>(); _bounds = BoundingBox.Unset; } Point3d point = Point3d.Unset; Vector3d vector = Vector3d.Unset; Color colour = Color.Black; int width = 1; if (!DA.GetData(0, ref point)) { return; } if (!DA.GetData(1, ref vector)) { return; } if (!DA.GetData(2, ref colour)) { return; } if (!DA.GetData(3, ref width)) { return; } DisplayVector dispVec = new DisplayVector(); dispVec.Colour = colour; dispVec.Point = point; dispVec.Vector = vector; dispVec.Width = width; _vectors.Add(dispVec); _bounds.Union(point); _bounds.Union((Point3d)(point + vector)); }