use of com.jme3.scene.shape.Curve in project jmonkeyengine by jMonkeyEngine.
the class MotionPath method CreateCatmullRomPath.
private Geometry CreateCatmullRomPath() {
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.getAdditionalRenderState().setWireframe(true);
mat.setColor("Color", ColorRGBA.Blue);
Geometry lineGeometry = new Geometry("line", new Curve(spline, 10));
lineGeometry.setMaterial(mat);
return lineGeometry;
}
use of com.jme3.scene.shape.Curve in project jmonkeyengine by jMonkeyEngine.
the class MotionPath method setCurveTension.
/**
* sets the tension of the curve (only for catmull rom) 0.0 will give a linear curve, 1.0 a round curve
* @param curveTension
*/
public void setCurveTension(float curveTension) {
spline.setCurveTension(curveTension);
if (debugNode != null) {
Node parent = debugNode.getParent();
debugNode.removeFromParent();
debugNode.detachAllChildren();
debugNode = null;
attachDebugNode(parent);
}
}
use of com.jme3.scene.shape.Curve in project jmonkeyengine by jMonkeyEngine.
the class FbxNode method connectObjectProperty.
@Override
public void connectObjectProperty(FbxObject object, String property) {
// (FbxAnimCurveNode)
if (object instanceof FbxAnimCurveNode) {
FbxAnimCurveNode curveNode = (FbxAnimCurveNode) object;
if (property.equals("Lcl Translation") || property.equals("Lcl Rotation") || property.equals("Lcl Scaling")) {
List<FbxAnimCurveNode> curveNodes = propertyToAnimCurveMap.get(property);
if (curveNodes == null) {
curveNodes = new ArrayList<FbxAnimCurveNode>();
curveNodes.add(curveNode);
propertyToAnimCurveMap.put(property, curveNodes);
}
curveNodes.add(curveNode);
// Make sure the curve knows about it animating
// this node as well.
curveNode.addInfluencedNode(this, property);
} else {
logger.log(Level.WARNING, "Animating the property ''{0}'' is not " + "supported. Ignoring.", property);
}
} else {
unsupportedConnectObjectProperty(object, property);
}
}
Aggregations