Merge pull request #1 from jMonkeyEngine/master

Merge branch "jmonkeyengine/master" into "scenecomposer/master"
experimental
Dokthar 10 years ago
commit 6278ecbcf1
  1. 2
      README.md
  2. 37
      jme3-blender/src/main/java/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionIK.java
  3. 20
      sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/ComposerCameraController.java

@ -1,7 +1,7 @@
jMonkeyEngine
=============
jMonkeyEngine is a 3D game engine for adventurous Java developers. It’s 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. It’s 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:

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

@ -79,26 +79,24 @@ public class ComposerCameraController extends AbstractCameraController {
@Override
public void checkClick(int button, boolean pressed) {
if (button == 0) {
if (isEditButtonEnabled() && !forceCameraControls) {
if (!forceCameraControls || !pressed) { // dont call toolController while forceCam but on button release (for UndoRedo)
if (button == 0) {
toolController.doEditToolActivatedPrimary(new Vector2f(mouseX, mouseY), pressed, cam);
}
}
if (button == 1) {
if (isEditButtonEnabled() && !forceCameraControls) {
if (button == 1) {
toolController.doEditToolActivatedSecondary(new Vector2f(mouseX, mouseY), pressed, cam);
}
}
}
@Override
protected void checkDragged(int button, boolean pressed) {
if (button == 0) {
toolController.doEditToolDraggedPrimary(new Vector2f(mouseX, mouseY), pressed, cam);
} else if (button == 1) {
toolController.doEditToolDraggedSecondary(new Vector2f(mouseX, mouseY), pressed, cam);
if (!forceCameraControls || !pressed) {
if (button == 0) {
toolController.doEditToolDraggedPrimary(new Vector2f(mouseX, mouseY), pressed, cam);
} else if (button == 1) {
toolController.doEditToolDraggedSecondary(new Vector2f(mouseX, mouseY), pressed, cam);
}
}
}

Loading…
Cancel
Save