public AxisRods(final String name, final boolean rightHanded, final double length, final double width) { super(name); this.length = length; this.width = width; this.rightHanded = rightHanded; getSceneHints().setLightCombineMode(LightCombineMode.Off); getSceneHints().setTextureCombineMode(TextureCombineMode.Off); buildAxis(); }
blendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); blendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); rods.setRenderState(blendState); rods.updateGeometricState(0, false); axisInited = true; rods.setTranslation(spat.getWorldBound().getCenter()); rods.setScale(rSize); } else { rods.setTranslation(spat.getWorldTranslation()); rods.setScale(spat.getWorldScale()); rods.setRotation(spat.getWorldRotation()); rods.updateGeometricState(0, false); rods.draw(r);
@Override public void read(final InputCapsule capsule) throws IOException { super.read(capsule); length = capsule.readDouble("length", 1); width = capsule.readDouble("width", 0.125); rightHanded = capsule.readBoolean("rightHanded", true); buildAxis(); }
protected void buildAxis() { xAxis = new Arrow("_xAxis", length, width); xAxis.setDefaultColor(xAxisColor); xAxis.setRotation(new Matrix3().fromAngles(0, 0, -90 * MathUtils.DEG_TO_RAD)); xAxis.setTranslation(length * .5, 0, 0); attachChild(xAxis); yAxis = new Arrow("yAxis", length, width); yAxis.setDefaultColor(yAxisColor); yAxis.setTranslation(0, length * .5, 0); attachChild(yAxis); zAxis = new Arrow("zAxis", length, width); zAxis.setDefaultColor(zAxisColor); if (rightHanded) { zAxis.setRotation(new Matrix3().fromAngles(90 * MathUtils.DEG_TO_RAD, 0, 0)); zAxis.setTranslation(0, 0, length * .5); } else { zAxis.setRotation(new Matrix3().fromAngles(-90 * MathUtils.DEG_TO_RAD, 0, 0)); zAxis.setTranslation(0, 0, -length * .5); } attachChild(zAxis); }
blendState.setSourceFunction(BlendState.SourceFunction.SourceAlpha); blendState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha); rods.setRenderState(blendState); rods.updateGeometricState(0, false); axisInited = true; rods.setTranslation(spat.getWorldBound().getCenter()); rods.setScale(rSize); } else { rods.setTranslation(spat.getWorldTranslation()); rods.setScale(spat.getWorldScale()); rods.setRotation(spat.getWorldRotation()); rods.updateGeometricState(0, false); rods.draw(r);
@Override public void read(final InputCapsule capsule) throws IOException { super.read(capsule); length = capsule.readDouble("length", 1); width = capsule.readDouble("width", 0.125); rightHanded = capsule.readBoolean("rightHanded", true); buildAxis(); }
protected void buildAxis() { xAxis = new Arrow("_xAxis", length, width); xAxis.setDefaultColor(xAxisColor); xAxis.setRotation(new Matrix3().fromAngles(0, 0, -90 * MathUtils.DEG_TO_RAD)); xAxis.setTranslation(length * .5, 0, 0); attachChild(xAxis); yAxis = new Arrow("yAxis", length, width); yAxis.setDefaultColor(yAxisColor); yAxis.setTranslation(0, length * .5, 0); attachChild(yAxis); zAxis = new Arrow("zAxis", length, width); zAxis.setDefaultColor(zAxisColor); if (rightHanded) { zAxis.setRotation(new Matrix3().fromAngles(90 * MathUtils.DEG_TO_RAD, 0, 0)); zAxis.setTranslation(0, 0, length * .5); } else { zAxis.setRotation(new Matrix3().fromAngles(-90 * MathUtils.DEG_TO_RAD, 0, 0)); zAxis.setTranslation(0, 0, -length * .5); } attachChild(zAxis); }
public AxisRods(final String name, final boolean rightHanded, final double length, final double width) { super(name); this.length = length; this.width = width; this.rightHanded = rightHanded; getSceneHints().setLightCombineMode(LightCombineMode.Off); getSceneHints().setTextureCombineMode(TextureCombineMode.Off); buildAxis(); }