public hLine(wPoint Start, wPoint End) { StartX = Start.X; StartY = Start.Y; EndX = End.X; EndY = End.Y; }
public hEllipse(wPoint Center, double UniformRadius) { CenterX = Center.X; CenterY = Center.Y; RadiusX = UniformRadius; RadiusY = UniformRadius; }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { Point3d P = new Point3d(0, 0, 0); double R = 1.0; if (!DA.GetData(0, ref P)) { return; } if (!DA.GetData(1, ref R)) { return; } wPoint O = new wPoint(P.X, P.Y, P.Z); wCurve Crv = new wCircle(O, R); wShape Shape = new wShape(Crv); wShapeCollection Shapes = new wShapeCollection(Shape); wPlane Pln = new wPlane().XYPlane(); Pln.Origin = O; Shapes.Boundary = new wRectangle(Pln, R, R); Shapes.Type = Crv.GetCurveType; Shapes.Graphics = new wGraphic().BlackFill(); Shapes.Effects = new wEffects(); wObject WindObject = new wObject(Shapes, "Hoopoe", Shapes.Type); DA.SetData(0, WindObject); }
public wPointLight(wPoint Light_Origin, wColor Light_Color) { Origin = Light_Origin; LightColor = Light_Color; SetWPFLight(); }
public wCircle(wPlane BasePlane, double RadiusValue) { IsClosed = true; Plane = BasePlane; Center = Plane.Origin; Radius = RadiusValue; }
public wVertex(wPoint VertexPoint, int VertexIndex) { X = VertexPoint.X; Y = VertexPoint.Y; Z = VertexPoint.Z; Index = VertexIndex; }
public wCircle(wPoint CenterPoint, double RadiusValue) { IsClosed = true; Center = CenterPoint; Plane.SetOrigin(Center); Radius = RadiusValue; }
private void SetLocation() { double X = Target.X + Math.Cos(Pivot) * Math.Sin(Tilt) * Distance; double Y = Target.Y + Math.Sin(Pivot) * Math.Sin(Tilt) * Distance; double Z = Target.Z + Math.Cos(Tilt) * Distance; Location = new wPoint(X, Y, Z); }
// public wLightSpot(wPoint Light_Location, wPoint Light_Target) { Location = Light_Location; Target = Light_Target; SetWPFLight(); }
public wCameraStandard(wPoint PositionPoint, wPoint TargetPoint, wVector UpVector, double Length) { SetLocation(PositionPoint); SetTarget(TargetPoint); Up = UpVector; LensLength = Length; }
public wLightSpot(wPoint Light_Location, wPoint Light_Target, wColor Light_Color) { Location = Light_Location; Target = Light_Target; LightColor = Light_Color; SetWPFLight(); }
public wLightSpot(wPoint Light_Location, wPoint Light_Target, double Light_InnerAngle, double Light_OuterAngle, wColor Light_Color) { Location = Light_Location; Target = Light_Target; LightColor = Light_Color; SetWPFLight(); }
public hEllipse(wPoint Center, double UniformRadius, double RotationAngle ) { CenterX = Center.X; CenterY = Center.Y; RadiusX = UniformRadius; RadiusY = UniformRadius; Angle = RotationAngle; }
public wPointLight(double Light_Intensity, wPoint Light_Origin, wColor Light_Color) { Origin = Light_Origin; Intensity = Light_Intensity; LightColor = new AdjustColor(Light_Color).SetLuminance(Intensity / 100.00); SetWPFLight(); }
public wVertex(wPoint VertexPoint, int VertexIndex, int VertexTopologyIndex) { X = VertexPoint.X; Y = VertexPoint.Y; Z = VertexPoint.Z; Index = VertexIndex; TopologyIndex = VertexTopologyIndex; }
public wEllipse(wPoint CenterPoint, double XRadius, double YRadius) { IsClosed = true; Center = CenterPoint; Plane.SetOrigin(Center); RadiusX = XRadius; RadiusY = YRadius; }
public wEllipse(wPlane BasePlane, double XRadius, double YRadius) { IsClosed = true; Plane = BasePlane; Center = Plane.Origin; RadiusX = XRadius; RadiusY = YRadius; }
public wBezierSpline(wPoint A, wPoint B, wPoint C, wPoint D) { Spans.Add(new wBezierSpans(0, 1, 2, 3)); Points.AddRange(new List <wPoint>() { A, B, C, D }); Segments.Add(new wCubicBezier(A, B, C, D)); }
public wLightSpot(double Light_Intensity, wPoint Light_Location, wPoint Light_Target, double Light_InnerAngle, double Light_OuterAngle, wColor Light_Color) { Location = Light_Location; Target = Light_Target; Intensity = Light_Intensity; LightColor = new AdjustColor(Light_Color).SetLuminance(Intensity / 100.00); SetWPFLight(); }
public wLightSpot(wPoint Light_Location, wPoint Light_Target, double Light_InnerAngle, double Light_OuterAngle) { Location = Light_Location; Target = Light_Target; ConeAngleIn = Light_InnerAngle; ConeAngleOut = Light_OuterAngle; SetWPFLight(); }
public void AddPoint(wPoint WindPoint, wColor WindColor, double Radius) { PointsVisual3D VisPoint = new PointsVisual3D(); VisPoint.Size = Radius; VisPoint.Color = WindColor.ToMediaColor(); VisPoint.Points.Add(WindPoint.ToPoint3D()); ViewPort.Children.Add(VisPoint); }
public void AddSpan(wPoint A, wPoint B, wPoint C, wPoint D) { int i = Points.Count - 1; Points.AddRange(new List <wPoint>() { B, C, D }); Spans.Add(new wBezierSpans(i, i + 1, i + 2, i + 3)); Segments.Add(new wCubicBezier(A, B, C, D)); }
public wLine(wPoint StartPoint, wVector Direction, double Length) { Points.AddRange(new List <wPoint>() { Start, End }); Indices.AddRange(new List <int>() { 0, 1 }); }
public wArc(wPoint CenterPoint, double RadiusValue, double AngleStart, double AngleEnd) { Center = CenterPoint; Plane.SetOrigin(Center); Radius = RadiusValue; StartAngle = AngleStart; EndAngle = AngleEnd; Angle = EndAngle - StartAngle; StartPoint = new wPoint(Center.X + Radius * Math.Cos(Math.PI * StartAngle / 180.0), Center.Y + Radius * Math.Sin(Math.PI * StartAngle / 180.0), Center.Z); EndPoint = new wPoint(Center.X + Radius * Math.Cos(Math.PI * EndAngle / 180.0), Center.Y + Radius * Math.Sin(Math.PI * EndAngle / 180.0), Center.Z); }
public hText(wTextObject WindText, wFont WindFont) { Text = WindText.Text.Text; Font = WindFont; Origin = WindText.Plane.Origin; Angle = WindText.Angle; HorizontalAlignment = (hAlign)(int)Font.HorizontalAlignment; VerticalAlignment = (vAlign)(int)Font.VerticalAlignment; FontItalic = (fStyle)Convert.ToInt32(WindFont.IsItalic); FontBold = (fWeight)Convert.ToInt32(WindFont.IsBold); }
public bool IsPointInside(wPoint TestPoint, double Tolerance = 0.000001) { int count = Points.Count - 1; double sumAngle = new wVector(Points[count].X - TestPoint.X, Points[count].Y - TestPoint.Y, 0).GetAngle(new wVector(Points[0].X - TestPoint.X, Points[0].Y - TestPoint.Y, 0)); for (int i = 0; i < count; i++) { sumAngle += new wVector(Points[i].X - TestPoint.X, Points[i].Y - TestPoint.Y, 0).GetAngle(new wVector(Points[i + 1].X - TestPoint.X, Points[i + 1].Y - TestPoint.Y, 0)); } return(Math.Abs(sumAngle) > (0.000001)); }
public void SetOrientation(wPoint CenterPoint, double PivotAngle, double TiltAngle, double CameraDistance) { Target = CenterPoint; Pivot = PivotAngle; Tilt = TiltAngle; Distance = CameraDistance; SetLocation(); SetDirection(); SetUp(); }
public wArc(wPlane BasePlane, double RadiusValue, double AngleStart, double AngleEnd) { Plane = BasePlane; Center = Plane.Origin; Radius = RadiusValue; StartAngle = AngleStart; EndAngle = AngleEnd; Angle = EndAngle - StartAngle; StartPoint = new wPoint(Center.X + Radius * Math.Cos(Math.PI * StartAngle / 180), Center.Y + Radius * Math.Sin(Math.PI * StartAngle / 180), Center.Z); EndPoint = new wPoint(Center.X + Radius * Math.Cos(Math.PI * EndAngle / 180), Center.Y + Radius * Math.Sin(Math.PI * EndAngle / 180), Center.Z); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { IGH_Goo Z = null; Rectangle3d R = new Rectangle3d(Plane.WorldXY, 150, 150); if (!DA.GetData(0, ref Z)) { return; } if (!DA.GetData(0, ref R)) { return; } Bitmap A = null; if (Z != null) { Z.CastTo(out A); } // Check if is pline Curve C = R.ToNurbsCurve(); BoundingBox B = C.GetBoundingBox(true); wPoint O = new wPoint(B.Center.X, B.Center.Y, B.Center.Z); wShape Shape = new wShape(new wRectangle()); wShapeCollection Shapes = new wShapeCollection(Shape); wPlane Pln = new wPlane().XYPlane(); Pln.Origin = O; Shapes.Boundary = new wRectangle(Pln, B.Diagonal.X, B.Diagonal.Y); //Shapes.Type = Crv.GetCurveType; if (C.IsClosed) { Shapes.Graphics = new wGraphic().BlackFill(); } else { Shapes.Graphics = new wGraphic().BlackOutline(); } Shapes.Effects = new wEffects(); wObject WindObject = new wObject(Shapes, "Hoopoe", Shapes.Type); DA.SetData(0, WindObject); }
public wCamera(wPoint CenterPoint, double PivotAngle, double TiltAngle, double CameraDistance, double lensLength) { Target = CenterPoint; Pivot = PivotAngle; Tilt = TiltAngle; Distance = CameraDistance; LensLength = lensLength; SetLocation(); SetDirection(); SetUp(); }