当前位置: 首页>>代码示例>>C#>>正文


C# Vector3D.Clone方法代码示例

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


在下文中一共展示了Vector3D.Clone方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PhysicalObject

            /// <summary>
            /// Creates a new physical object
            /// </summary>
            /// <param name="Vertices">The vertices within the object</param>
            /// <param name="weight">The weight of the object</param>
            /// <param name="associatedWorld">The world to associated this object with. This DOES NOT add it to the world, but simply references it.</param>
            public PhysicalObject(Vector3D[] Vertices, float weight, CollisionType ctype, World associatedWorld)
            {
                Weight = weight;
                collisiontype = ctype;
                origverts = Vertices.Clone() as Vector3D[];
                internverts = Vertices.Clone() as Vector3D[];

                internworld = associatedWorld;
                List<Vector3D[]> Triangles = new List<Vector3D[]>();
                int tricount = internverts.Length / 3;
                int x = 0;
                for (int i = 0; i < tricount; i++)
                {

                    Vector3D[] triangle = new Vector3D[] { internverts[x], internverts[x + 1], internverts[x + 2] };
                    Triangles.Add(triangle);
                    x += 3;

                }
                interntriangles = Triangles.ToArray();

                boundingBox = CollisionTesting.createBoundingBox(new Mesh() { meshverts = internverts });
            }
开发者ID:IDWMaster,项目名称:3DAPI,代码行数:29,代码来源:Physics+(Laptop8).cs

示例2: DebugDraw6FaceConvex

        public static void DebugDraw6FaceConvex(Vector3D[] vertices, Color color, float alpha, bool depthRead, bool fill)
        {
            var message = MessagePool.Get<MyRenderMessageDebugDraw6FaceConvex>(MyRenderMessageEnum.DebugDraw6FaceConvex);

            message.Vertices = (Vector3D[]) vertices.Clone();
            message.Color = color;
            message.Alpha = alpha;
            message.DepthRead = depthRead;
            message.Fill = fill;

            EnqueueMessage(message);
        }
开发者ID:stanhebben,项目名称:SpaceEngineers,代码行数:12,代码来源:MyRenderProxy.cs

示例3: LineGLInfo

 public LineGLInfo(float[] alpha, Vector3D[] vertex, int front)
 {
     Alpha = (float[])alpha.Clone();
     Vertex = (Vector3D[])vertex.Clone();
     Front = front;
 }
开发者ID:meshdgp,项目名称:MeshDGP,代码行数:6,代码来源:LineGLInfo.cs


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