X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.proconf.g3d%2Fsrc%2Forg%2Fsimantics%2Fproconf%2Fg3d%2Fscenegraph%2FShapeNode.java;h=3369b5ead95e7afacde03555ca0ac9b7e646e181;hb=54be6a9a0f71bc6c6b4c2584327264fb6053ade9;hp=b82265e4fce3653c36e5c4f2ae664c1a8c37560f;hpb=a776787607c664445ae302ca003dea864e67bb7a;p=simantics%2F3d.git diff --git a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ShapeNode.java b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ShapeNode.java index b82265e4..3369b5ea 100644 --- a/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ShapeNode.java +++ b/org.simantics.proconf.g3d/src/org/simantics/proconf/g3d/scenegraph/ShapeNode.java @@ -17,7 +17,7 @@ import java.util.List; import javax.vecmath.AxisAngle4d; import javax.vecmath.Quat4d; -import org.simantics.g2d.stubs.anim.Interpolator; +import org.simantics.animation.stubs.Interpolator; import org.simantics.animation.curve.SlerpCurve; import org.simantics.animation.curve.TCBCurve; import org.simantics.proconf.g3d.Resources; @@ -461,14 +461,14 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom body.attachChild(mesh); return false; } - org.simantics.g2d.stubs.anim.Animation animation = new org.simantics.g2d.stubs.anim.Animation(graph,res); + org.simantics.animation.stubs.Animation animation = new org.simantics.animation.stubs.Animation(graph,res); G3DNode shape = getG3DNode(graph); G3DNode modelResource = G3DTools.getModelFromResource(graph,shape.getResource()); assert (modelResource != null); G3DModel model = new G3DModel(graph,modelResource.getResource()); - Collection animations = model.getAnimation(); + Collection animations = model.getAnimation(); boolean found = false; - for (org.simantics.g2d.stubs.anim.Animation a : animations) { + for (org.simantics.animation.stubs.Animation a : animations) { if (a.getResource().equals(animation.getResource())) { found = true; break; @@ -478,10 +478,10 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom ErrorLogger.getDefault().logWarning("Shape " + shape.getResource() + " cannot handle animation " + animation.getResource() + " because it isn't model's animation", null); return false; } - Collection interpolators = animation.getInterpolator(); - List handled = new ArrayList(); - List precalculated = new ArrayList(); - for (org.simantics.g2d.stubs.anim.Interpolator i : interpolators) { + Collection interpolators = animation.getInterpolator(); + List handled = new ArrayList(); + List precalculated = new ArrayList(); + for (org.simantics.animation.stubs.Interpolator i : interpolators) { IEntity target = i.getTarget(); if (G3DTools.hasProperty(graph,shape.getResource(),target.getResource())) handled.add(i); @@ -497,16 +497,16 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom this.animation = new Animation(); - org.simantics.g2d.stubs.anim.Interpolator[] pos = new org.simantics.g2d.stubs.anim.Interpolator[3]; - org.simantics.g2d.stubs.anim.Interpolator[] ambient = new org.simantics.g2d.stubs.anim.Interpolator[3]; - org.simantics.g2d.stubs.anim.Interpolator[] diffuse = new org.simantics.g2d.stubs.anim.Interpolator[3]; - org.simantics.g2d.stubs.anim.Interpolator[] specular = new org.simantics.g2d.stubs.anim.Interpolator[3]; - org.simantics.g2d.stubs.anim.Interpolator[] emissive = new org.simantics.g2d.stubs.anim.Interpolator[3]; + org.simantics.animation.stubs.Interpolator[] pos = new org.simantics.animation.stubs.Interpolator[3]; + org.simantics.animation.stubs.Interpolator[] ambient = new org.simantics.animation.stubs.Interpolator[3]; + org.simantics.animation.stubs.Interpolator[] diffuse = new org.simantics.animation.stubs.Interpolator[3]; + org.simantics.animation.stubs.Interpolator[] specular = new org.simantics.animation.stubs.Interpolator[3]; + org.simantics.animation.stubs.Interpolator[] emissive = new org.simantics.animation.stubs.Interpolator[3]; Builtins builtins = graph.getBuiltins(); - for (org.simantics.g2d.stubs.anim.Interpolator i : handled) { + for (org.simantics.animation.stubs.Interpolator i : handled) { IEntity target = i.getTarget(); //if (target.isInstanceOf(Resources.g3dResource.LocalOrientation)) { if (target.isInstanceOf(Resources.g3dResource.Orientation) && target.getRelatedObjects(Resources.g3dResource.LocalOrientationOf).size() == 1) { @@ -530,7 +530,7 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom ErrorLogger.getDefault().logWarning("Cannot map animation interpolator " + i.getResource() + " to target (Position ?)" + target.getResource(), null); } } else if (parent.isInstanceOf(Resources.g3dResource.Color)) { - org.simantics.g2d.stubs.anim.Interpolator[] color = null; + org.simantics.animation.stubs.Interpolator[] color = null; if (parent.isInstanceOf(Resources.g3dResource.Color) && parent.getRelatedObjects(Resources.g3dResource.AmbientColorOf).size() > 0) { color = ambient; } else if (parent.isInstanceOf(Resources.g3dResource.Color)&& parent.getRelatedObjects(Resources.g3dResource.DiffuseColorOf).size() > 0) { @@ -644,7 +644,7 @@ public class ShapeNode extends AbstractGraphicsNode implements Animatable, IGeom return true; } - private void addColorInterpolator(G3DNode shape, org.simantics.g2d.stubs.anim.Interpolator[] color, int type) { + private void addColorInterpolator(G3DNode shape, org.simantics.animation.stubs.Interpolator[] color, int type) { if (color[0] != null || color[1] != null || color[2] != null) { ScalarInterpolator xIp; ScalarInterpolator yIp;