本文整理汇总了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 });
}
示例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);
}
示例3: LineGLInfo
public LineGLInfo(float[] alpha, Vector3D[] vertex, int front)
{
Alpha = (float[])alpha.Clone();
Vertex = (Vector3D[])vertex.Clone();
Front = front;
}