Esempio n. 1
0
        /// <summary>
        /// Sets the matrix of a bone.
        /// </summary>
        /// <param name="name">The name of the node to be set.</param>
        /// <param name="modelMatrix">A matrix relative to the model.</param>
        public void SetModelMatrix(string name, XFORM modelMatrix)
        {
            var n = LogicalNodes.FirstOrDefault(item => item.Name == name);

            if (n == null)
            {
                throw new ArgumentException($"{name} not found", nameof(name));
            }
            n.ModelMatrix = modelMatrix;
        }
Esempio n. 2
0
        public void SetLocalMatrix(string name, XNAMAT localMatrix)
        {
            var n = LogicalNodes.FirstOrDefault(item => item.Name == name);

            if (n == null)
            {
                return;
            }
            n.LocalMatrix = localMatrix;
        }
Esempio n. 3
0
        public void SetModelMatrix(string name, XFORM worldMatrix)
        {
            var n = LogicalNodes.FirstOrDefault(item => item.Name == name);

            if (n == null)
            {
                return;
            }
            n.ModelMatrix = worldMatrix;
        }