// Token: 0x06000013 RID: 19 RVA: 0x00002AF8 File Offset: 0x00000CF8 private static void CreateTransformedSweep(List <Vector3> vertices, IList <Vector3> sweepContour, AffineTransform3 transform) { foreach (Vector3 input in sweepContour) { vertices.Add(transform.Transform(input)); } }
// Token: 0x06000061 RID: 97 RVA: 0x00003684 File Offset: 0x00001884 private static TriangleMesh.Vertex Transform(AffineTransform3 placement, TriangleMesh.Vertex vertex) { Vector3 input = new Vector3((double)vertex.X, (double)vertex.Y, (double)vertex.Z); Vector3 vector = placement.Transform(input); return(new TriangleMesh.Vertex((float)vector.X, (float)vector.Y, (float)vector.Z)); }
// Token: 0x06000060 RID: 96 RVA: 0x00003630 File Offset: 0x00001830 private static TriangleMesh.Normal Rotate(AffineTransform3 rotation, TriangleMesh.Normal normal) { Vector3 input = new Vector3((double)normal.X, (double)normal.Y, (double)normal.Z); Vector3 vector = rotation.Transform(input); return(new TriangleMesh.Normal((float)vector.X, (float)vector.Y, (float)vector.Z)); }
// Token: 0x06000017 RID: 23 RVA: 0x00002E6C File Offset: 0x0000106C private static void AddStartFace(List <Vector3> vertices, List <int[]> wires, IList <Vector3> sweepContour, AffineTransform3 transform) { int[] array = new int[sweepContour.Count]; int count = vertices.Count; int num = 0; foreach (Vector3 input in sweepContour) { vertices.Add(transform.Transform(input)); array[num++] = count++; } wires.Add(array); }
// Token: 0x06000012 RID: 18 RVA: 0x000029D0 File Offset: 0x00000BD0 private static void CreateTesselatedEdgeArc(List <Vector3> vertices, List <int[]> wires, IList <Vector3> sweepContour, Angle curveTesselation, ref AffineTransform3 transform, EdgeArc3 edgeArc) { if (edgeArc.Arc.DeltaAngle.Radians < 0.001) { return; } if (edgeArc.Arc.StartAngle.Radians != 0.0) { throw new NotSupportedException("The start angle of the arc should be zero."); } int num = Math.Max(1, (int)(Math.Abs(edgeArc.Arc.DeltaAngle.Radians) / curveTesselation.Radians + 0.9)); for (int i = 0; i < num; i++) { AffineTransform3 transform2 = SweptDiskSolidExtensions.CreateSegmentTransform(transform, edgeArc, i, num); SweptDiskSolidExtensions.CreateTransformedSweep(vertices, sweepContour, transform2); SweptDiskSolidExtensions.BuildWires(vertices, wires, sweepContour.Count); } AffineTransform3 transformer = Transform3Factory.CreateFromAxisAngle(edgeArc.Arc.Circle.Normal, edgeArc.Arc.DeltaAngle, edgeArc.Arc.Circle.Center); transform = transformer.Transform(transform); }
// Token: 0x06000011 RID: 17 RVA: 0x000028D0 File Offset: 0x00000AD0 private static void CreateTesselatedEdgeLine(List <Vector3> vertices, List <int[]> wires, IList <Vector3> sweepContour, ref AffineTransform3 transform, EdgeLineSegment3 edgeLineSegment) { int num = vertices.Count - sweepContour.Count; int count = vertices.Count; transform = new AffineTransform3(transform.AxisX, transform.AxisY, transform.AxisZ, transform.Origin + edgeLineSegment.Segment.Direction * (edgeLineSegment.Segment.Extent * 2.0)); int num2 = 0; foreach (Vector3 input in sweepContour) { int num3 = (num2 + 1) % sweepContour.Count; vertices.Add(transform.Transform(input)); int[] item = new int[] { num + num2, num + num3, count + num3, count + num2 }; wires.Add(item); num2++; } }
// Token: 0x06000057 RID: 87 RVA: 0x00002C2C File Offset: 0x00000E2C public TriangleMesh Transform(AffineTransform3 placement) { Vector3 origin = placement.Transform(this.Origin); AffineTransform3 rotation = new AffineTransform3(placement.AxisX, placement.AxisY, placement.AxisZ); List <TriangleMesh.Normal> list = new List <TriangleMesh.Normal>(); foreach (TriangleMesh.Normal normal in this.Normals) { list.Add(TriangleMesh.Rotate(rotation, normal)); } List <TriangleMesh.Vertex> list2 = new List <TriangleMesh.Vertex>(); foreach (TriangleMesh.Vertex vertex in this.Vertices) { list2.Add(TriangleMesh.Transform(placement, vertex)); } List <TriangleMesh.ReferenceLine> list3 = new List <TriangleMesh.ReferenceLine>(); foreach (TriangleMesh.ReferenceLine referenceLine in this.ReferenceLines) { list3.Add(TriangleMesh.Transform(placement, referenceLine)); } return(new TriangleMesh(origin, list, list2, this.EdgeLines, this.SurfaceLines, this.Lines, this.Corners, this.Triangles, this.ReferenceLines, this.ReferenceLineRadius * placement.Scale)); }