public void setFinger(PoseableFinger finger) { metacarpalAnimator.FingerSection = finger.Metacarpal; proximalAnimator.FingerSection = finger.ProximalPhalanges; intermediateAnimator.FingerSection = finger.IntermediatePhalanges; distalAnimator.FingerSection = finger.DistalPhalanges; }
protected override void constructed() { base.constructed(); SceneNodeElement sceneNode = Owner.getElement(PropFactory.NodeName) as SceneNodeElement; if (sceneNode == null) { blacklist("Could not find SceneNode {0} in PoseableHand SimObject", PropFactory.NodeName); } entity = sceneNode.getNodeObject(PropFactory.EntityName) as Entity; if (entity == null) { blacklist("Could not find Entity {0} in PoseableHand SimObject", PropFactory.EntityName); } subEntity = entity.getSubEntity(0); if (subEntity == null) { blacklist("Could not find sub entity with index 0 in PoseableHand SimObject"); } Skeleton skeleton = entity.getSkeleton(); if (skeleton == null) { blacklist("Could not find skeleton for PoseableHand SimObject"); } wrist = skeleton.getBone("BWrist" + BoneSuffix); if (wrist == null) { blacklist("Could not find bwrist in PoseableHand"); } wrist.setManuallyControlled(true); palm = skeleton.getBone("BPalm" + BoneSuffix); if (palm == null) { blacklist("Could not find bpalm in PoseableHand"); } palm.setManuallyControlled(true); thumb = new PoseableThumb(skeleton, "BThumbBase" + BoneSuffix, "BThumb02" + BoneSuffix, "BThumb01" + BoneSuffix); index = new PoseableFinger(skeleton, "BIndexKnuckle" + BoneSuffix, "BIndex03" + BoneSuffix, "BIndex02" + BoneSuffix, "BIndex01" + BoneSuffix); middle = new PoseableFinger(skeleton, "BMiddleKnuckle" + BoneSuffix, "BMiddle03" + BoneSuffix, "BMiddle02" + BoneSuffix, "BMiddle01" + BoneSuffix); ring = new PoseableFinger(skeleton, "BRingKnuckle" + BoneSuffix, "BRing03" + BoneSuffix, "BRing02" + BoneSuffix, "BRing01" + BoneSuffix); pinky = new PoseableFinger(skeleton, "BPinkyKnuckle" + BoneSuffix, "BPinky03" + BoneSuffix, "BPinky02" + BoneSuffix, "BPinky01" + BoneSuffix); }