if (!bone.hasUserControl()) { Logger.getLogger(KinematicRagdollControl.class.getSimpleName()).log(Level.FINE, "{0} doesn't have user control", boneName); continue;
if (!bone.hasUserControl()) { Logger.getLogger(KinematicRagdollControl.class.getSimpleName()).log(Level.FINE, "{0} doesn't have user control", boneName); continue;
/** * Remove the inverse-kinematics target for the specified bone. * * @param bone which bone has the target (not null, modified) */ public void removeIKTarget(Bone bone) { int depth = ikChainDepth.remove(bone.getName()); int i = 0; while (i < depth+2 && bone.getParent() != null) { if (bone.hasUserControl()) { // matchPhysicObjectToBone(boneLinks.get(bone.getName()), position, tmpRot1); bone.setUserControl(false); } bone = bone.getParent(); i++; } }
/** * Remove the inverse-kinematics target for the specified bone. * * @param bone which bone has the target (not null, modified) */ public void removeIKTarget(Bone bone) { int depth = ikChainDepth.remove(bone.getName()); int i = 0; while (i < depth+2 && bone.getParent() != null) { if (bone.hasUserControl()) { // matchPhysicObjectToBone(boneLinks.get(bone.getName()), position, tmpRot1); bone.setUserControl(false); } bone = bone.getParent(); i++; } }
/** * Add a target for inverse kinematics. * * @param bone which bone the IK applies to (not null) * @param worldPos the world coordinates of the goal (not null) * @param chainLength number of bones in the chain * @return a new instance (not null, already added to ikTargets) */ public Vector3f setIKTarget(Bone bone, Vector3f worldPos, int chainLength) { Vector3f target = worldPos.subtract(targetModel.getWorldTranslation()); ikTargets.put(bone.getName(), target); ikChainDepth.put(bone.getName(), chainLength); int i = 0; while (i < chainLength+2 && bone.getParent() != null) { if (!bone.hasUserControl()) { bone.setUserControl(true); } bone = bone.getParent(); i++; } // setIKMode(); return target; }
/** * Add a target for inverse kinematics. * * @param bone which bone the IK applies to (not null) * @param worldPos the world coordinates of the goal (not null) * @param chainLength number of bones in the chain * @return a new instance (not null, already added to ikTargets) */ public Vector3f setIKTarget(Bone bone, Vector3f worldPos, int chainLength) { Vector3f target = worldPos.subtract(targetModel.getWorldTranslation()); ikTargets.put(bone.getName(), target); ikChainDepth.put(bone.getName(), chainLength); int i = 0; while (i < chainLength+2 && bone.getParent() != null) { if (!bone.hasUserControl()) { bone.setUserControl(true); } bone = bone.getParent(); i++; } // setIKMode(); return target; }
public void removeIKTarget(Bone bone) { int depth = ikChainDepth.remove(bone.getName()); int i = 0; while (i < depth+2 && bone.getParent() != null) { if (bone.hasUserControl()) { // matchPhysicObjectToBone(boneLinks.get(bone.getName()), position, tmpRot1); bone.setUserControl(false); } bone = bone.getParent(); i++; } }
if (!bone.hasUserControl()) { Logger.getLogger(KinematicRagdollControl.class.getSimpleName()).log(Level.FINE, "{0} doesn't have user control", boneName); continue;
/** * Remove the inverse-kinematics target for the specified bone. * * @param bone which bone has the target (not null, modified) */ public void removeIKTarget(Bone bone) { int depth = ikChainDepth.remove(bone.getName()); int i = 0; while (i < depth+2 && bone.getParent() != null) { if (bone.hasUserControl()) { // matchPhysicObjectToBone(boneLinks.get(bone.getName()), position, tmpRot1); bone.setUserControl(false); } bone = bone.getParent(); i++; } }
if (!bone.hasUserControl()) { Logger.getLogger(KinematicRagdollControl.class.getSimpleName()).log(Level.FINE, "{0} doesn't have user control", boneName); continue;
public Vector3f setIKTarget(Bone bone, Vector3f worldPos, int chainLength) { Vector3f target = worldPos.subtract(targetModel.getWorldTranslation()); ikTargets.put(bone.getName(), target); ikChainDepth.put(bone.getName(), chainLength); int i = 0; while (i < chainLength+2 && bone.getParent() != null) { if (!bone.hasUserControl()) { bone.setUserControl(true); } bone = bone.getParent(); i++; } // setIKMode(); return target; }
/** * Add a target for inverse kinematics. * * @param bone which bone the IK applies to (not null) * @param worldPos the world coordinates of the goal (not null) * @param chainLength number of bones in the chain * @return a new instance (not null, already added to ikTargets) */ public Vector3f setIKTarget(Bone bone, Vector3f worldPos, int chainLength) { Vector3f target = worldPos.subtract(targetModel.getWorldTranslation()); ikTargets.put(bone.getName(), target); ikChainDepth.put(bone.getName(), chainLength); int i = 0; while (i < chainLength+2 && bone.getParent() != null) { if (!bone.hasUserControl()) { bone.setUserControl(true); } bone = bone.getParent(); i++; } // setIKMode(); return target; }