コード例 #1
0
ファイル: Face.cs プロジェクト: mh-soft/mh-master
        // 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);
        }
コード例 #2
0
ファイル: CircleCurve3.cs プロジェクト: mh-soft/mh-master
 // Token: 0x060000D7 RID: 215 RVA: 0x00004B1C File Offset: 0x00002D1C
 public bool Equals(CircleCurve3 other)
 {
     return(this.Origin.Equals(other.Origin) && this.UnitX.Equals(other.UnitX) && this.UnitY.Equals(other.UnitY) && this.Normal.Equals(other.Normal) && this.Radius.Equals(other.Radius));
 }