Merge branch 'scenecomposer/master' of https://github.com/Dokthar/jmonkeyengine into scenecomposer/master

This commit is contained in:
Maselbas 2015-04-26 22:29:29 +02:00
commit 3396f5662d
2 changed files with 22 additions and 17 deletions

View File

@ -1,7 +1,7 @@
jMonkeyEngine jMonkeyEngine
============= =============
jMonkeyEngine is a 3D game engine for adventurous Java developers. Its open source, cross platform and cutting edge. And it is all beautifully documented. The 3.0 branch is the latest stable version of the jMonkeyEngine 3 SDK, a complete game development suite. We'll be frequently submitting stable 3.0.x updates until the major 3.1 version arrives in Q4 2014. jMonkeyEngine is a 3D game engine for adventurous Java developers. Its open source, cross platform and cutting edge. And it is all beautifully documented. The 3.0 branch is the latest stable version of the jMonkeyEngine 3 SDK, a complete game development suite. We'll be frequently submitting stable 3.0.x updates until the major 3.1 version arrives.
The engine is used by several commercial game studios and computer-science courses. Here's a taste: The engine is used by several commercial game studios and computer-science courses. Here's a taste:

View File

@ -88,14 +88,17 @@ public class ConstraintDefinitionIK extends ConstraintDefinition {
if (angle != 0) { if (angle != 0) {
Vector3d cross = currentDir.crossLocal(target).normalizeLocal(); Vector3d cross = currentDir.crossLocal(target).normalizeLocal();
q.fromAngleAxis(angle, cross); q.fromAngleAxis(angle, cross);
if (boneContext.isLockX()) {
q.set(0, q.getY(), q.getZ(), q.getW()); if(bone.equals(this.getOwner())) {
} if (boneContext.isLockX()) {
if (boneContext.isLockY()) { q.set(0, q.getY(), q.getZ(), q.getW());
q.set(q.getX(), 0, q.getZ(), q.getW()); }
} if (boneContext.isLockY()) {
if (boneContext.isLockZ()) { q.set(q.getX(), 0, q.getZ(), q.getW());
q.set(q.getX(), q.getY(), 0, q.getW()); }
if (boneContext.isLockZ()) {
q.set(q.getX(), q.getY(), 0, q.getW());
}
} }
boneTransform.getRotation().set(q.multLocal(boneTransform.getRotation())); boneTransform.getRotation().set(q.multLocal(boneTransform.getRotation()));
@ -124,14 +127,16 @@ public class ConstraintDefinitionIK extends ConstraintDefinition {
Vector3d cross = currentDir.crossLocal(target).normalizeLocal(); Vector3d cross = currentDir.crossLocal(target).normalizeLocal();
q.fromAngleAxis(angle, cross); q.fromAngleAxis(angle, cross);
if (boneContext.isLockX()) { if(bone.equals(this.getOwner())) {
q.set(0, q.getY(), q.getZ(), q.getW()); if (boneContext.isLockX()) {
} q.set(0, q.getY(), q.getZ(), q.getW());
if (boneContext.isLockY()) { }
q.set(q.getX(), 0, q.getZ(), q.getW()); if (boneContext.isLockY()) {
} q.set(q.getX(), 0, q.getZ(), q.getW());
if (boneContext.isLockZ()) { }
q.set(q.getX(), q.getY(), 0, q.getW()); if (boneContext.isLockZ()) {
q.set(q.getX(), q.getY(), 0, q.getW());
}
} }
boneWorldTransform.getRotation().set(q.multLocal(boneWorldTransform.getRotation())); boneWorldTransform.getRotation().set(q.multLocal(boneWorldTransform.getRotation()));