コード例 #1
0
        public void NormalizeChannels_OutputsNormalizedWeights()
        {
            var e = new EditableBoneWeight();

            e.AddChannel(0, 1f, true);
            e.AddChannel(1, 1f, true);
            e.AddChannel(2, 1f, true);
            e.AddChannel(3, 1f, true);

            e.Normalize();

            Assert.AreEqual(0.25f, e[0].weight, "Weight should be normalized");
            Assert.AreEqual(0.25f, e[2].weight, "Weight should be normalized");
            Assert.AreEqual(0.25f, e[1].weight, "Weight should be normalized");
            Assert.AreEqual(0.25f, e[3].weight, "Weight should be normalized");
        }