// Token: 0x06000151 RID: 337 RVA: 0x00005EE8 File Offset: 0x000040E8 public Torus3?TryGetTorus(out AffineTransform3 location) { TorusSurface torusSurface = this.Surface as TorusSurface; if (torusSurface != null) { AffineTransform3 affineTransform = Transform3Factory.CreateOrthonormalBasis(torusSurface.UnitZ); location = new AffineTransform3(affineTransform.AxisX, affineTransform.AxisY, affineTransform.AxisZ, torusSurface.Origin); return(new Torus3?(new Torus3(torusSurface.MajorRadius, torusSurface.MinorRadius))); } SurfaceOfRevolution surfaceOfRevolution = this.Surface as SurfaceOfRevolution; if (surfaceOfRevolution != null) { CircleCurve3 circleCurve = surfaceOfRevolution.Meridian as CircleCurve3; if (circleCurve != null) { UnitVector3 normalized = (circleCurve.Origin - surfaceOfRevolution.Origin).GetNormalized(); UnitVector3 axisY = surfaceOfRevolution.Direction.UnitCross(normalized); location = new AffineTransform3(normalized, axisY, surfaceOfRevolution.Direction, surfaceOfRevolution.Origin); return(new Torus3?(new Torus3((surfaceOfRevolution.Origin - circleCurve.Origin).Length, circleCurve.Radius))); } } location = AffineTransform3.Identity; return(null); }
// Token: 0x060001DF RID: 479 RVA: 0x00006F8C File Offset: 0x0000518C public bool Equals(TorusSurface other) { return(this.Origin.Equals(other.Origin) && this.UnitX.Equals(other.UnitX) && this.UnitY.Equals(other.UnitY) && this.MajorRadius.Equals(other.MajorRadius) && this.MinorRadius.Equals(other.MinorRadius) && this.Direct.Equals(other.Direct)); }