コード例 #1
0
 public void Clone()
 {
     RectangleShape rectangle = new RectangleShape(0.1234f, 2.345f);
       RectangleShape clone = rectangle.Clone() as RectangleShape;
       Assert.IsNotNull(clone);
       Assert.AreEqual(rectangle.WidthX, clone.WidthX);
       Assert.AreEqual(rectangle.WidthY, clone.WidthY);
       Assert.AreEqual(rectangle.GetAabb(Pose.Identity).Minimum, clone.GetAabb(Pose.Identity).Minimum);
       Assert.AreEqual(rectangle.GetAabb(Pose.Identity).Maximum, clone.GetAabb(Pose.Identity).Maximum);
 }
コード例 #2
0
        public void Clone()
        {
            RectangleShape rectangle = new RectangleShape(0.1234f, 2.345f);
            RectangleShape clone     = rectangle.Clone() as RectangleShape;

            Assert.IsNotNull(clone);
            Assert.AreEqual(rectangle.WidthX, clone.WidthX);
            Assert.AreEqual(rectangle.WidthY, clone.WidthY);
            Assert.AreEqual(rectangle.GetAabb(Pose.Identity).Minimum, clone.GetAabb(Pose.Identity).Minimum);
            Assert.AreEqual(rectangle.GetAabb(Pose.Identity).Maximum, clone.GetAabb(Pose.Identity).Maximum);
        }