public void buildArrow() { // Start with cylinders: final Cylinder base = new Cylinder("base", 4, 16, _width * .75, _length); base.getMeshData().rotatePoints(rotator); base.getMeshData().rotateNormals(rotator); attachChild(base); base.updateModelBound(); final Pyramid tip = new Pyramid("tip", 2 * _width, _length / 2f); tip.getMeshData().translatePoints(0, _length * .75, 0); attachChild(tip); tip.updateModelBound(); }
public void buildArrow() { // Start with cylinders: final Cylinder base = new Cylinder("base", 4, 16, _width * .75, _length); base.getMeshData().rotatePoints(rotator); base.getMeshData().rotateNormals(rotator); attachChild(base); base.updateModelBound(); final Pyramid tip = new Pyramid("tip", 2 * _width, _length / 2f); tip.getMeshData().translatePoints(0, _length * .75, 0); attachChild(tip); tip.updateModelBound(); }
@Override public void buildArrow() { detachAllChildren(); // Start with cylinder base: final Cylinder base = new Cylinder("base", 4, 16, _width * 0.75, _length - _lengthGap); base.getMeshData().translatePoints(0, 0, (_lengthGap + _length) * 0.5); attachChild(base); base.updateModelBound(); // Add the pyramid tip. final double tipLength = _length / 2.0; final Pyramid tip = new Pyramid("tip", 2 * _width, tipLength); tip.getMeshData().translatePoints(0, _tipGap + _length + 0.5 * tipLength, 0); tip.getMeshData().rotatePoints(InteractArrow.rotator); tip.getMeshData().rotateNormals(InteractArrow.rotator); attachChild(tip); tip.updateModelBound(); }