• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GeometryAPI.Vector3D类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中GeometryAPI.Vector3D的典型用法代码示例。如果您正苦于以下问题:C# Vector3D类的具体用法?C# Vector3D怎么用?C# Vector3D使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Vector3D类属于GeometryAPI命名空间,在下文中一共展示了Vector3D类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Circle

 // Constructor
 public Circle(Vector3D center, double radius)
     : base(center)
 {
     this.Radius = radius;
     A = new Vector3D(center.X + this.Radius, center.Y, center.Z);
     B = new Vector3D(center.X, center.Y + this.Radius, center.Z);
 }
开发者ID:Termininja,项目名称:BGCoder,代码行数:8,代码来源:Circle.cs


示例2: Translate

 public void Translate(Vector3D translationVector)
 {
     for (int i = 0; i < this.vertices.Count; i++)
     {
         this.vertices[i] += translationVector;
     }
 }
开发者ID:Termininja,项目名称:BGCoder,代码行数:7,代码来源:Figure.cs


示例3: CrossProduct

        public static Vector3D CrossProduct(Vector3D a, Vector3D b)
        {
            double crossX = a.Y * b.Z - a.Z * b.Y;
            double crossY = a.Z * b.X - a.X * b.Z;
            double crossZ = a.X * b.Y - a.Y * b.X;

            return new Vector3D(crossX, crossY, crossZ);
        }
开发者ID:psotirov,项目名称:TelerikAcademyProjects,代码行数:8,代码来源:Vector3D.cs


示例4: GetNormal

 public Vector3D GetNormal()
 {
     Vector3D center = this.GetCenter();
     Vector3D A = new Vector3D(center.X + this.Radius, center.Y, center.Z);
     Vector3D B = new Vector3D(center.X, center.Y + this.Radius, center.Z);
     Vector3D normal = Vector3D.CrossProduct(center - A, center - B);
     normal.Normalize();
     return normal;
 }
开发者ID:reminchev,项目名称:SoftUni-Projects,代码行数:9,代码来源:Circle.cs


示例5: Scale

 public void Scale(Vector3D scaleCenter, double scaleFactor)
 {
     for (int i = 0; i < this.vertices.Count; i++)
     {
         Vector3D centeredCurrent = this.vertices[i] - scaleCenter;
         Vector3D scaledCenteredCurrent = centeredCurrent * scaleFactor;
         this.vertices[i] = scaledCenteredCurrent + scaleCenter;
     }
 }
开发者ID:reminchev,项目名称:SoftUni-Projects,代码行数:9,代码来源:Figure.cs


示例6: DotProduct

        public static double DotProduct(Vector3D a, Vector3D b)
        {
            double result = 0;
            for (int d = 0; d < 3; d++)
            {
                result += a[d] * b[d];
            }

            return result;
        }
开发者ID:reminchev,项目名称:SoftUni-Projects,代码行数:10,代码来源:Vector3D.cs


示例7: GetCenter

        // Methods
        public virtual Vector3D GetCenter()
        {
            Vector3D verticesSum = new Vector3D(0, 0, 0);

            for (int i = 0; i < this.vertices.Count; i++)
            {
                verticesSum += this.vertices[i];
            }

            return verticesSum / this.vertices.Count;
        }
开发者ID:Termininja,项目名称:BGCoder,代码行数:12,代码来源:Figure.cs


示例8: RotateInXY

        public void RotateInXY(Vector3D rotCenter, double angleDegrees)
        {
            for (int i = 0; i < this.vertices.Count; i++)
            {
                Vector3D centeredCurrent = this.vertices[i] - rotCenter;
                double angleRads = angleDegrees * Math.PI / 180.0;

                Vector3D rotatedCenteredCurrent = new Vector3D(
                    centeredCurrent.X * Math.Cos(angleRads) - centeredCurrent.Y * Math.Sin(angleRads),
                    centeredCurrent.X * Math.Sin(angleRads) + centeredCurrent.Y * Math.Cos(angleRads),
                    centeredCurrent.Z);

                this.vertices[i] = rotatedCenteredCurrent + rotCenter;
            }
        }
开发者ID:reminchev,项目名称:SoftUni-Projects,代码行数:15,代码来源:Figure.cs


示例9: Cylinder

 public Cylinder(Vector3D botCirc, Vector3D topCirc, double radius)
     : base(botCirc, topCirc)
 {
     this.Radius = radius;
 }
开发者ID:klimentt,项目名称:Telerik-Academy,代码行数:5,代码来源:Program.cs


示例10: Cylinder

 public Cylinder(Vector3D centerBottom, Vector3D centerTop, double radius)
     : base(centerBottom, centerTop)
 {
     this.Radius = radius;
 }
开发者ID:nkolarov,项目名称:telerik-academy,代码行数:5,代码来源:Program.cs


示例11: Circle

 public Circle(Vector3D center, double radius)
     : base(center)
 {
     this.Radisu = radius;
 }
开发者ID:naturalna,项目名称:OOPPrinciples,代码行数:5,代码来源:Program.cs


示例12: Vertex

 public Vertex(Vector3D location)
     : base(location)
 {
 }
开发者ID:BlueForeverI,项目名称:OOPHomework,代码行数:4,代码来源:GeometryApiTest.cs


示例13: Triangle

 public Triangle(Vector3D a, Vector3D b, Vector3D c)
     : base(a, b, c)
 {
 }
开发者ID:BlueForeverI,项目名称:OOPHomework,代码行数:4,代码来源:GeometryApiTest.cs


示例14: Cylinder

        public Cylinder(Vector3D bottomCenter, Vector3D topCenter, double radius)
            : base(topCenter, bottomCenter)
        {
            this.BottomCenter = bottomCenter;
            this.TopCenter = topCenter;
            this.Radius = radius;

            this.Height = (topCenter - bottomCenter).Magnitude;
        }
开发者ID:BlueForeverI,项目名称:OOPHomework,代码行数:9,代码来源:GeometryApiTest.cs


示例15: Circle

 public Circle(Vector3D centre, double radius)
     : base(centre)
 {
     this.Radius = radius;
 }
开发者ID:Jarolim,项目名称:HomeWork,代码行数:5,代码来源:Program.cs


示例16: GetNormal

 public Vector3D GetNormal()
 {
     Vector3D normal = new Vector3D(0, 0, 1);
     return normal;
 }
开发者ID:RamiAmaire,项目名称:TelerikAcademy,代码行数:5,代码来源:Program.cs


示例17: Circle

 public Circle(Vector3D vector, double radius)
     : base(vector)
 {
     this.Radius = radius;
 }
开发者ID:KirilToshev,项目名称:Projects,代码行数:5,代码来源:AcademyGeometry.cs


示例18: Cylinder

 public Cylinder(Vector3D bottomCenter, Vector3D topCenter, double radius)
     : base(bottomCenter, topCenter)
 {
     this.Radius = radius;
 }
开发者ID:Bunny303,项目名称:TelerikAcademy,代码行数:5,代码来源:Program.cs


示例19: Cylinder

 public Cylinder(Vector3D a, Vector3D b, double r)
     : base(a, b)
 {
     this.Radius = r;
 }
开发者ID:ilkodzhambazov,项目名称:Telerik-Academy,代码行数:5,代码来源:Program.cs


示例20: Circle

 public Circle(Vector3D a, double r)
     : base(a)
 {
     this.Radius = r;
 }
开发者ID:ilkodzhambazov,项目名称:Telerik-Academy,代码行数:5,代码来源:Program.cs



注:本文中的GeometryAPI.Vector3D类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Ifc.BaseClassIfc类代码示例发布时间:2022-05-26
下一篇:
C# GeoLib.C2DPoint类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap