// 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: 0x0600005A RID: 90 RVA: 0x0000308C File Offset: 0x0000128C public double CalculateVolume() { double num = 0.0; foreach (TriangleMesh.Triangle triangle in this.Triangles) { ushort v = triangle.V0; ushort v2 = triangle.V1; ushort v3 = triangle.V2; TriangleMesh.Corner corner = this.Corners[(int)v]; TriangleMesh.Corner corner2 = this.Corners[(int)v2]; TriangleMesh.Corner corner3 = this.Corners[(int)v3]; TriangleMesh.Vertex vertex = this.Vertices[(int)corner.VertexIndex]; TriangleMesh.Vertex vertex2 = this.Vertices[(int)corner2.VertexIndex]; TriangleMesh.Vertex vertex3 = this.Vertices[(int)corner3.VertexIndex]; num += this.TetrahedronVolume(this.Origin, new Vector3((double)vertex2.X, (double)vertex2.Y, (double)vertex2.Z), new Vector3((double)vertex.X, (double)vertex.Y, (double)vertex.Z), new Vector3((double)vertex3.X, (double)vertex3.Y, (double)vertex3.Z)); } return(num); }
// Token: 0x06000059 RID: 89 RVA: 0x00002EAC File Offset: 0x000010AC public Vector3 CalculateCenteroid() { Vector3 vector = Vector3.Zero; double num = 0.0; foreach (TriangleMesh.Triangle triangle in this.Triangles) { ushort v = triangle.V0; ushort v2 = triangle.V1; ushort v3 = triangle.V2; TriangleMesh.Corner corner = this.Corners[(int)v]; TriangleMesh.Corner corner2 = this.Corners[(int)v2]; TriangleMesh.Corner corner3 = this.Corners[(int)v3]; TriangleMesh.Vertex vertex = this.Vertices[(int)corner.VertexIndex]; TriangleMesh.Vertex vertex2 = this.Vertices[(int)corner2.VertexIndex]; TriangleMesh.Vertex vertex3 = this.Vertices[(int)corner3.VertexIndex]; double num2 = this.TetrahedronVolume(this.Origin, new Vector3((double)vertex2.X, (double)vertex2.Y, (double)vertex2.Z), new Vector3((double)vertex.X, (double)vertex.Y, (double)vertex.Z), new Vector3((double)vertex3.X, (double)vertex3.Y, (double)vertex3.Z)); Vector3 vector2 = this.TetrahedronCenteroid(this.Origin, new Vector3((double)vertex2.X, (double)vertex2.Y, (double)vertex2.Z), new Vector3((double)vertex.X, (double)vertex.Y, (double)vertex.Z), new Vector3((double)vertex3.X, (double)vertex3.Y, (double)vertex3.Z)); vector += vector2 * num2; num += num2; } return(vector / num); }
// Token: 0x06000228 RID: 552 RVA: 0x00007511 File Offset: 0x00005711 public ReferenceLine(TriangleMesh.Vertex v0, TriangleMesh.Vertex v1) { this = default(TriangleMesh.ReferenceLine); this.V0 = v0; this.V1 = v1; }