mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-14 14:59:43 -05:00
明示的なインターフェイスの実装
This commit is contained in:
@@ -69,13 +69,13 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
|
||||
public void SetRawHipsPosition(Vector3 position)
|
||||
void INormalizedPoseApplicable.SetRawHipsPosition(Vector3 position)
|
||||
{
|
||||
var world = _controlRigRoot.TransformPoint(position);
|
||||
_hipBone.ControlBone.position = world;
|
||||
}
|
||||
|
||||
public void SetNormalizedLocalRotation(HumanBodyBones bone, Quaternion normalizedLocalRotation)
|
||||
void INormalizedPoseApplicable.SetNormalizedLocalRotation(HumanBodyBones bone, Quaternion normalizedLocalRotation)
|
||||
{
|
||||
if (_bones.TryGetValue(bone, out var t))
|
||||
{
|
||||
@@ -83,7 +83,7 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
|
||||
public EuclideanTransform? GetWorldTransform(HumanBodyBones bone)
|
||||
EuclideanTransform? ITPoseProvider.GetWorldTransform(HumanBodyBones bone)
|
||||
{
|
||||
if (_bones.TryGetValue(bone, out var t))
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
|
||||
public Quaternion GetNormalizedLocalRotation(HumanBodyBones bone, HumanBodyBones parentBone)
|
||||
Quaternion INormalizedPoseProvider.GetNormalizedLocalRotation(HumanBodyBones bone, HumanBodyBones parentBone)
|
||||
{
|
||||
if (m_animator.GetBoneTransform(bone) is Transform t)
|
||||
{
|
||||
@@ -54,13 +54,13 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 GetRawHipsPosition()
|
||||
Vector3 INormalizedPoseProvider.GetRawHipsPosition()
|
||||
{
|
||||
// TODO: from model root ?
|
||||
return m_animator.GetBoneTransform(HumanBodyBones.Hips).localPosition;
|
||||
}
|
||||
|
||||
public EuclideanTransform? GetWorldTransform(HumanBodyBones bone)
|
||||
EuclideanTransform? ITPoseProvider.GetWorldTransform(HumanBodyBones bone)
|
||||
{
|
||||
if (m_posMap.TryGetValue(bone, out var t))
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
|
||||
public Quaternion GetNormalizedLocalRotation(HumanBodyBones bone, HumanBodyBones parentBone)
|
||||
Quaternion INormalizedPoseProvider.GetNormalizedLocalRotation(HumanBodyBones bone, HumanBodyBones parentBone)
|
||||
{
|
||||
if (m_bones.TryGetValue(bone, out var c))
|
||||
{
|
||||
@@ -45,7 +45,7 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
|
||||
public Vector3 GetRawHipsPosition()
|
||||
Vector3 INormalizedPoseProvider.GetRawHipsPosition()
|
||||
{
|
||||
if (m_hips.parent == m_root)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ namespace UniVRM10
|
||||
}
|
||||
}
|
||||
|
||||
public EuclideanTransform? GetWorldTransform(HumanBodyBones bone)
|
||||
EuclideanTransform? ITPoseProvider.GetWorldTransform(HumanBodyBones bone)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user