diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionAction.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionAction.java deleted file mode 100644 index 63d04e073..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionAction.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Action' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionAction extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionAction.class.getName()); - - public ConstraintDefinitionAction(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Action' constraint - LOGGER.log(Level.WARNING, "'Action' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionCameraSolver.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionCameraSolver.java deleted file mode 100644 index 5f51d02ad..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionCameraSolver.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Camera solver' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionCameraSolver extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionAction.class.getName()); - - public ConstraintDefinitionCameraSolver(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Camera solver' constraint - LOGGER.log(Level.WARNING, "'Camera solver' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionChildOf.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionChildOf.java deleted file mode 100644 index 0e27c7cfa..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionChildOf.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'ChildOf' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionChildOf extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionChildOf.class.getName()); - - public ConstraintDefinitionChildOf(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement ChildOf constraint - LOGGER.log(Level.WARNING, "ChildOf constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionClampTo.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionClampTo.java deleted file mode 100644 index aa0161b93..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionClampTo.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Clamp to' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionClampTo extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionClampTo.class.getName()); - - public ConstraintDefinitionClampTo(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement when curves are implemented - LOGGER.log(Level.WARNING, "'Clamp to' not yet implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionDampTrack.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionDampTrack.java deleted file mode 100644 index 9ebdf1ee4..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionDampTrack.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * The damp track constraint. Available for blender 2.50+. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionDampTrack extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionDampTrack.class.getName()); - - public ConstraintDefinitionDampTrack(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO Auto-generated method stub - LOGGER.log(Level.WARNING, "'Damp Track' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java index be82d2ed7..839b80e6d 100644 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java +++ b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFactory.java @@ -42,38 +42,42 @@ import com.jme3.scene.plugins.blender.file.Structure; public class ConstraintDefinitionFactory { private static final Map> CONSTRAINT_CLASSES = new HashMap>(); static { - CONSTRAINT_CLASSES.put("bActionConstraint", ConstraintDefinitionAction.class); - CONSTRAINT_CLASSES.put("bChildOfConstraint", ConstraintDefinitionChildOf.class); - CONSTRAINT_CLASSES.put("bClampToConstraint", ConstraintDefinitionClampTo.class); CONSTRAINT_CLASSES.put("bDistLimitConstraint", ConstraintDefinitionDistLimit.class); - CONSTRAINT_CLASSES.put("bFollowPathConstraint", ConstraintDefinitionFollowPath.class); - CONSTRAINT_CLASSES.put("bKinematicConstraint", ConstraintDefinitionInverseKinematics.class); - CONSTRAINT_CLASSES.put("bLockTrackConstraint", ConstraintDefinitionLockTrack.class); CONSTRAINT_CLASSES.put("bLocateLikeConstraint", ConstraintDefinitionLocLike.class); CONSTRAINT_CLASSES.put("bLocLimitConstraint", ConstraintDefinitionLocLimit.class); - CONSTRAINT_CLASSES.put("bMinMaxConstraint", ConstraintDefinitionMinMax.class); CONSTRAINT_CLASSES.put("bNullConstraint", ConstraintDefinitionNull.class); - CONSTRAINT_CLASSES.put("bPythonConstraint", ConstraintDefinitionPython.class); - CONSTRAINT_CLASSES.put("bRigidBodyJointConstraint", ConstraintDefinitionRigidBodyJoint.class); CONSTRAINT_CLASSES.put("bRotateLikeConstraint", ConstraintDefinitionRotLike.class); - CONSTRAINT_CLASSES.put("bShrinkWrapConstraint", ConstraintDefinitionShrinkWrap.class); + CONSTRAINT_CLASSES.put("bRotLimitConstraint", ConstraintDefinitionRotLimit.class); CONSTRAINT_CLASSES.put("bSizeLikeConstraint", ConstraintDefinitionSizeLike.class); CONSTRAINT_CLASSES.put("bSizeLimitConstraint", ConstraintDefinitionSizeLimit.class); - CONSTRAINT_CLASSES.put("bStretchToConstraint", ConstraintDefinitionStretchTo.class); - CONSTRAINT_CLASSES.put("bTransformConstraint", ConstraintDefinitionTransform.class); - CONSTRAINT_CLASSES.put("bRotLimitConstraint", ConstraintDefinitionRotLimit.class); + } + + private static final Map UNSUPPORTED_CONSTRAINTS = new HashMap(); + static { + UNSUPPORTED_CONSTRAINTS.put("bActionConstraint", "Action"); + UNSUPPORTED_CONSTRAINTS.put("bChildOfConstraint", "Child of"); + UNSUPPORTED_CONSTRAINTS.put("bClampToConstraint", "Clamp to"); + UNSUPPORTED_CONSTRAINTS.put("bFollowPathConstraint", "Follow path"); + UNSUPPORTED_CONSTRAINTS.put("bKinematicConstraint", "Inverse kinematic"); + UNSUPPORTED_CONSTRAINTS.put("bLockTrackConstraint", "Lock track"); + UNSUPPORTED_CONSTRAINTS.put("bMinMaxConstraint", "Min max"); + UNSUPPORTED_CONSTRAINTS.put("bPythonConstraint", "Python/Script"); + UNSUPPORTED_CONSTRAINTS.put("bRigidBodyJointConstraint", "Rigid body joint"); + UNSUPPORTED_CONSTRAINTS.put("bShrinkWrapConstraint", "Shrinkwrap"); + UNSUPPORTED_CONSTRAINTS.put("bStretchToConstraint", "Stretch to"); + UNSUPPORTED_CONSTRAINTS.put("bTransformConstraint", "Transform"); // Blender 2.50+ - CONSTRAINT_CLASSES.put("bSplineIKConstraint", ConstraintDefinitionSplineInverseKinematic.class); - CONSTRAINT_CLASSES.put("bDampTrackConstraint", ConstraintDefinitionDampTrack.class); - CONSTRAINT_CLASSES.put("bPivotConstraint", ConstraintDefinitionDampTrack.class); + UNSUPPORTED_CONSTRAINTS.put("bSplineIKConstraint", "Spline inverse kinematics"); + UNSUPPORTED_CONSTRAINTS.put("bDampTrackConstraint", "Damp track"); + UNSUPPORTED_CONSTRAINTS.put("bPivotConstraint", "Pivot"); // Blender 2.56+ - CONSTRAINT_CLASSES.put("bTrackToConstraint", ConstraintDefinitionTrackTo.class); - CONSTRAINT_CLASSES.put("bSameVolumeConstraint", ConstraintDefinitionSameVolume.class); - CONSTRAINT_CLASSES.put("bTransLikeConstraint", ConstraintDefinitionTransLike.class); + UNSUPPORTED_CONSTRAINTS.put("bTrackToConstraint", "Track to"); + UNSUPPORTED_CONSTRAINTS.put("bSameVolumeConstraint", "Same volume"); + UNSUPPORTED_CONSTRAINTS.put("bTransLikeConstraint", "Trans like"); // Blender 2.62+ - CONSTRAINT_CLASSES.put("bCameraSolverConstraint", ConstraintDefinitionCameraSolver.class); - CONSTRAINT_CLASSES.put("bObjectSolverConstraint", ConstraintDefinitionObjectSolver.class); - CONSTRAINT_CLASSES.put("bFollowTrackConstraint", ConstraintDefinitionFollowTrack.class); + UNSUPPORTED_CONSTRAINTS.put("bCameraSolverConstraint", "Camera solver"); + UNSUPPORTED_CONSTRAINTS.put("bObjectSolverConstraint", "Object solver"); + UNSUPPORTED_CONSTRAINTS.put("bFollowTrackConstraint", "Follow track"); } /** @@ -108,7 +112,12 @@ public class ConstraintDefinitionFactory { throw new BlenderFileException(e.getLocalizedMessage(), e); } } else { - throw new BlenderFileException("Unknown constraint type: " + constraintClassName); + String constraintName = UNSUPPORTED_CONSTRAINTS.get(constraintClassName); + if(constraintName != null) { + return new UnsupportedConstraintDefinition(constraintName); + } else { + throw new BlenderFileException("Unknown constraint type: " + constraintClassName); + } } } } diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowPath.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowPath.java deleted file mode 100644 index 7103fe9b8..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowPath.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Follow path' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionFollowPath extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionFollowPath.class.getName()); - - public ConstraintDefinitionFollowPath(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement when curves are implemented - LOGGER.log(Level.WARNING, "'Follow path' not implemented! Curves not yet implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowTrack.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowTrack.java deleted file mode 100644 index 483d26c47..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionFollowTrack.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Follow track' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionFollowTrack extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionAction.class.getName()); - - public ConstraintDefinitionFollowTrack(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Follow track' constraint - LOGGER.log(Level.WARNING, "'Follow track' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionInverseKinematics.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionInverseKinematics.java deleted file mode 100644 index 24134b220..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionInverseKinematics.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import com.jme3.animation.Animation; -import com.jme3.animation.Skeleton; -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.animations.CalculationBone; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Inverse kinematics' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionInverseKinematics extends ConstraintDefinition { - // private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionInverseKinematics.class.getName()); - // private static final float IK_SOLVER_ERROR = 0.5f; - - public ConstraintDefinitionInverseKinematics(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // try { - // IK solver is only attached to bones - // Bone ownerBone = (Bone) blenderContext.getLoadedFeature(ownerOMA, LoadedFeatureDataType.LOADED_FEATURE); - // AnimData animData = blenderContext.getAnimData(ownerOMA); - // if(animData == null) { - // TODO: to nie moxe byx null, utworzyx dane bez ruchu, w zalexnoxci czy target six rusza - // } - - // prepare a list of all parents of this bone - // CalculationBone[] bones = this.getBonesToCalculate(skeleton, boneAnimation); - - // get the target point - // Object targetObject = this.getTarget(LoadedFeatureDataType.LOADED_FEATURE); - // Vector3f pt = null;// Point Target - // if (targetObject instanceof Bone) { - // pt = ((Bone) targetObject).getModelSpacePosition(); - // } else if (targetObject instanceof Spatial) { - // pt = ((Spatial) targetObject).getWorldTranslation(); - // } else if (targetObject instanceof Skeleton) { - // Structure armatureNodeStructure = (Structure) this.getTarget(LoadedFeatureDataType.LOADED_STRUCTURE); - // ObjectHelper objectHelper = blenderContext.getHelper(ObjectHelper.class); - // Transform transform = objectHelper.getTransformation(armatureNodeStructure, blenderContext); - // pt = transform.getTranslation(); - // } else { - // throw new IllegalStateException( - // "Unknown target object type! Should be Node, Bone or Skeleton and there is: " - // + targetObject.getClass().getName()); - // } - - // fetching the owner's bone track - // BoneTrack ownerBoneTrack = null; - // int boneIndex = skeleton.getBoneIndex(ownerBone); - // for (int i = 0; i < boneAnimation.getTracks().length; ++i) { - // if (boneAnimation.getTracks()[i].getTargetBoneIndex() == boneIndex) { - // ownerBoneTrack = boneAnimation.getTracks()[i]; - // break; - // } - // } - // int ownerBoneFramesCount = ownerBoneTrack==null ? 0 : ownerBoneTrack.getTimes().length; - // - // // preparing data - // int maxIterations = ((Number) data.getFieldValue("iterations")).intValue(); - // CalculationBone[] bones = this.getBonesToCalculate(ownerBone, skeleton, boneAnimation); - // for (int i = 0; i < bones.length; ++i) { - // System.out.println(Arrays.toString(bones[i].track.getTranslations())); - // System.out.println(Arrays.toString(bones[i].track.getRotations())); - // System.out.println("==============================="); - // } - // Quaternion rotation = new Quaternion(); - // //all tracks should have the same amount of frames - // int framesCount = bones[0].getBoneFramesCount(); - // assert framesCount >=1; - // for (int frame = 0; frame < framesCount; ++frame) { - // float error = IK_SOLVER_ERROR; - // int iteration = 0; - // while (error >= IK_SOLVER_ERROR && iteration <= maxIterations) { - // // rotating the bones - // for (int i = 0; i < bones.length - 1; ++i) { - // Vector3f pe = bones[i].getEndPoint(); - // Vector3f pc = bones[i + 1].getWorldTranslation().clone(); - // - // Vector3f peSUBpc = pe.subtract(pc).normalizeLocal(); - // Vector3f ptSUBpc = pt.subtract(pc).normalizeLocal(); - // - // float theta = FastMath.acos(peSUBpc.dot(ptSUBpc)); - // Vector3f direction = peSUBpc.cross(ptSUBpc).normalizeLocal(); - // bones[i].rotate(rotation.fromAngleAxis(theta, direction), frame); - // } - // error = pt.subtract(bones[0].getEndPoint()).length(); - // ++iteration; - // } - // } - // - // for (CalculationBone bone : bones) { - // bone.applyCalculatedTracks(); - // } - // - // System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"); - // for (int i = 0; i < bones.length; ++i) { - // System.out.println(Arrays.toString(bones[i].track.getTranslations())); - // System.out.println(Arrays.toString(bones[i].track.getRotations())); - // System.out.println("==============================="); - // } - // } catch(BlenderFileException e) { - // LOGGER.severe(e.getLocalizedMessage()); - // } - } - - /** - * This method returns bones used for rotation calculations. - * @param bone - * the bone to which the constraint is applied - * @param skeleton - * the skeleton owning the bone and its ancestors - * @param boneAnimation - * the bone animation data that stores the traces for the skeleton's bones - * @return a list of bones to imitate the bone's movement during IK solving - */ - private CalculationBone[] getBonesToCalculate(Skeleton skeleton, Animation boneAnimation) { - // Bone ownerBone = (Bone) blenderContext.getLoadedFeature(ownerOMA, LoadedFeatureDataType.LOADED_FEATURE); - // List bonesList = new ArrayList(); - // do { - // bonesList.add(new CalculationBone(ownerBone, 1)); - // int boneIndex = skeleton.getBoneIndex(ownerBone); - // for (int i = 0; i < boneAnimation.getTracks().length; ++i) { - // if (((BoneTrack[])boneAnimation.getTracks())[i].getTargetBoneIndex() == boneIndex) { - // bonesList.add(new CalculationBone(ownerBone, (BoneTrack)boneAnimation.getTracks()[i])); - // break; - // } - // } - // ownerBone = ownerBone.getParent(); - // } while (ownerBone != null); - // //attaching children - // CalculationBone[] result = bonesList.toArray(new CalculationBone[bonesList.size()]); - // for (int i = result.length - 1; i > 0; --i) { - // result[i].attachChild(result[i - 1]); - // } - // return result; - return null; - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionLockTrack.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionLockTrack.java deleted file mode 100644 index a1a211981..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionLockTrack.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Action' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionLockTrack extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionLockTrack.class.getName()); - - public ConstraintDefinitionLockTrack(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Lock track' constraint - LOGGER.log(Level.WARNING, "'Lock track' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionMinMax.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionMinMax.java deleted file mode 100644 index a0a84ac5c..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionMinMax.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Min max' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionMinMax extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionMinMax.class.getName()); - - public ConstraintDefinitionMinMax(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Min max' constraint - LOGGER.log(Level.WARNING, "'Min max' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionObjectSolver.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionObjectSolver.java deleted file mode 100644 index 0727b9606..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionObjectSolver.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Object solver' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionObjectSolver extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionAction.class.getName()); - - public ConstraintDefinitionObjectSolver(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Object solver' constraint - LOGGER.log(Level.WARNING, "'Object solver' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionPivot.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionPivot.java deleted file mode 100644 index a2584c579..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionPivot.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * The pivot constraint. Available for blender 2.50+. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionPivot extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionPivot.class.getName()); - - public ConstraintDefinitionPivot(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Pivot' constraint - LOGGER.log(Level.WARNING, "'Pivot' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionPython.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionPython.java deleted file mode 100644 index 82b19eb4e..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionPython.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Python' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionPython extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionPython.class.getName()); - - public ConstraintDefinitionPython(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Python' constraint - LOGGER.log(Level.WARNING, "'Python' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionRigidBodyJoint.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionRigidBodyJoint.java deleted file mode 100644 index 5cf98d767..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionRigidBodyJoint.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Rigid body joint' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionRigidBodyJoint extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionRigidBodyJoint.class.getName()); - - public ConstraintDefinitionRigidBodyJoint(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Rigid body joint' constraint - LOGGER.log(Level.WARNING, "'Rigid body joint' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionSameVolume.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionSameVolume.java deleted file mode 100644 index 224aebb7e..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionSameVolume.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Same volume' constraint type in blender. - * - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionSameVolume extends ConstraintDefinition { - private static final Logger LOGGER = Logger.getLogger(ConstraintDefinitionSameVolume.class.getName()); - - public ConstraintDefinitionSameVolume(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // TODO: implement 'Same volume' constraint - LOGGER.log(Level.WARNING, "'Same volume' constraint NOT implemented!"); - } -} diff --git a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionShrinkWrap.java b/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionShrinkWrap.java deleted file mode 100644 index 0c9afec8e..000000000 --- a/engine/src/blender/com/jme3/scene/plugins/blender/constraints/definitions/ConstraintDefinitionShrinkWrap.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.jme3.scene.plugins.blender.constraints.definitions; - -import com.jme3.math.Transform; -import com.jme3.scene.plugins.blender.BlenderContext; -import com.jme3.scene.plugins.blender.file.Structure; - -/** - * This class represents 'Shrink wrap' constraint type in blender. - * @author Marcin Roguski (Kaelthas) - */ -/* package */class ConstraintDefinitionShrinkWrap extends ConstraintDefinition { - - public ConstraintDefinitionShrinkWrap(Structure constraintData, BlenderContext blenderContext) { - super(constraintData, blenderContext); - } - - @Override - public void bake(Transform ownerTransform, Transform targetTransform, float influence) { - // loading mesh points (blender ensures that the target is a mesh-object) - /* - * List pts = new ArrayList(); - * Node target = (Node) this.target.getObject(); - * for(Spatial spatial : target.getChildren()) { - * if(spatial instanceof Geometry) { - * Mesh mesh = ((Geometry) spatial).getMesh(); - * FloatBuffer floatBuffer = mesh.getFloatBuffer(Type.Position); - * for(int i=0;i