返回介绍

HumanBone 人类骨骼

发布于 2019-12-18 15:37:51 字数 5828 浏览 1155 评论 0 收藏 0

Description 描述

The mapping between a bone in the model and the conceptual bone in the Mecanim human anatomy.

在模型中的骨骼和Mecanim人类结构概念骨骼之间的映射。

The names of the Mecanim human bone and the bone in the model are stored along with the limiting muscle values that constrain the bone's rotation during animation.

Mecanim人类骨骼和模型的骨骼的名字随着限制肌肉约束骨骼的旋转动画过程中的值一起被储存。

JavaScript:

function Start() {
	var boneName = new System.Collections.Generic.Dictionary.<String, String>();
 
	boneName["Chest"] = "Bip001 Spine2";
	boneName["Head"] = "Bip001 Head";
	boneName["Hips"] = "Bip001 Pelvis";
	boneName["LeftFoot"] = "Bip001 L Foot";
	boneName["LeftHand"] = "Bip001 L Hand";
	boneName["LeftLowerArm"] = "Bip001 L Forearm";
	boneName["LeftLowerLeg"] = "Bip001 L Calf";
	boneName["LeftShoulder"] = "Bip001 L Clavicle";
	boneName["LeftUpperArm"] = "Bip001 L UpperArm";
	boneName["LeftUpperLeg"] = "Bip001 L Thigh";
	boneName["RightFoot"] = "Bip001 R Foot";
	boneName["RightHand"] = "Bip001 R Hand";
	boneName["RightLowerArm"] = "Bip001 R Forearm";
	boneName["RightLowerLeg"] = "Bip001 R Calf";
	boneName["RightShoulder"] = "Bip001 R Clavicle";
	boneName["RightUpperArm"] = "Bip001 R UpperArm";
	boneName["RightUpperLeg"] = "Bip001 R Thigh";
	boneName["Spine"] = "Bip001 Spine1";
 
	var humanName: String[] = HumanTrait.BoneName;
	var humanBones: HumanBone[] = new HumanBone[boneName.Count];
 
	var j = 0;
 
	for (var i = 0; i < humanName.Length; i++) {
		if (boneName.ContainsKey(humanName[i])) {
			var humanBone = new HumanBone();
			humanBone.humanName = humanName[i];
			humanBone.boneName = boneName[humanName[i]];
            humanBone.limit.useDefaultValues = true;
 
			humanBones[j++] = humanBone;
		}
	}
}

C#:

using UnityEngine;
using System.Collections;
 
public class ExampleClass : MonoBehaviour {
    void Start() {
        stringstring boneName = new System.Collections.Generic.Dictionary<string, string>();
        boneName["Chest"] = "Bip001 Spine2";
        boneName["Head"] = "Bip001 Head";
        boneName["Hips"] = "Bip001 Pelvis";
        boneName["LeftFoot"] = "Bip001 L Foot";
        boneName["LeftHand"] = "Bip001 L Hand";
        boneName["LeftLowerArm"] = "Bip001 L Forearm";
        boneName["LeftLowerLeg"] = "Bip001 L Calf";
        boneName["LeftShoulder"] = "Bip001 L Clavicle";
        boneName["LeftUpperArm"] = "Bip001 L UpperArm";
        boneName["LeftUpperLeg"] = "Bip001 L Thigh";
        boneName["RightFoot"] = "Bip001 R Foot";
        boneName["RightHand"] = "Bip001 R Hand";
        boneName["RightLowerArm"] = "Bip001 R Forearm";
        boneName["RightLowerLeg"] = "Bip001 R Calf";
        boneName["RightShoulder"] = "Bip001 R Clavicle";
        boneName["RightUpperArm"] = "Bip001 R UpperArm";
        boneName["RightUpperLeg"] = "Bip001 R Thigh";
        boneName["Spine"] = "Bip001 Spine1";
        string[] humanName = HumanTrait.BoneName;
        HumanBone[] humanBones = new HumanBone[boneName.Count];
        int j = 0;
        int i = 0;
        while (i < humanName.Length) {
            if (boneName.ContainsKey(humanName[i])) {
                HumanBone humanBone = new HumanBone();
                humanBone.humanName = humanName[i];
                humanBone.boneName = boneName[humanName[i]];
                humanBone.limit.useDefaultValues = true;
                humanBones[j++] = humanBone;
            }
            i++;
        }
    }
}

Variables 变量

boneNameThe name of the bone to which the Mecanim human bone is mapped.
Mecanim人类骨骼被映射的骨骼的名称。
humanNameThe name of the Mecanim human bone to which the bone from the model is mapped.
从模型映射的Mecanim人类骨骼的名称。
limitThe rotation limits that define the muscle for this bone.
定义用于该肌肉用于这个骨骼的旋转限制。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文