Beispiel #1
0
        public void Geometry_DisconnectSrcObject_RemovesDeformer()
        {
            // given:
            var g    = new Mesh("");
            var skin = new Skin("");

            g.AddDeformer(skin);

            // require:
            Assert.AreEqual(1, g.GetDeformerCount());
            Assert.AreEqual(1, g.GetSrcObjectCount());

            // when:
            g.DisconnectSrcObject(skin);

            // then:
            Assert.AreEqual(0, g.GetDeformerCount());
            Assert.AreEqual(0, g.GetSrcObjectCount());
        }
Beispiel #2
0
        public void Geometry_AddDeformer_AddsDeformer()
        {
            // given:
            var g    = new Mesh("");
            var skin = new Skin("");

            // require:
            Assert.AreEqual(0, g.GetDeformerCount());
            Assert.AreEqual(0, g.GetSrcObjectCount());

            // when:
            g.AddDeformer(skin);

            // then:
            Assert.AreEqual(1, g.GetDeformerCount());
            Assert.AreSame(skin, g.GetDeformer(0));
            Assert.AreEqual(1, g.GetSrcObjectCount());
            Assert.AreSame(skin, g.GetSrcObject(0));
        }