/** * Sets the world scale. * * @param scale * the new world scale vector */ public void setWorldScale(final ReadOnlyVector3 scale) { _worldTransform.setScale(scale); }
/** * Sets the world scale. * * @param scale * the new world scale */ public void setWorldScale(final double scale) { _worldTransform.setScale(scale); }
/** * Sets the world scale. * * @param scale * the new world scale */ public void setWorldScale(final double scale) { _worldTransform.setScale(scale); }
/** * <code>setScale</code> sets the scale of this spatial. This marks the spatial as DirtyType.Transform. * * @param scale * the new scale of this spatial */ public void setScale(final double scale) { _localTransform.setScale(scale); markDirty(DirtyType.Transform); }
@Override public ValidatingTransform setScale(final double x, final double y, final double z) { super.setScale(x, y, z); validate(); return this; }
@Override public ValidatingTransform setScale(final ReadOnlyVector3 scale) { super.setScale(scale); validate(); return this; }
/** * <code>setScale</code> sets the scale of this spatial. This marks the spatial as DirtyType.Transform. * * @param scale * the new scale of this spatial */ public void setScale(final ReadOnlyVector3 scale) { _localTransform.setScale(scale); markDirty(DirtyType.Transform); }
/** * <code>setScale</code> sets the scale of this spatial. This marks the spatial as DirtyType.Transform. * * @param scale * the new scale of this spatial */ public void setScale(final double scale) { _localTransform.setScale(scale); markDirty(DirtyType.Transform); }
/** * <code>setScale</code> sets the scale of this spatial. This marks the spatial as DirtyType.Transform. * * @param scale * the new scale of this spatial */ public void setScale(final ReadOnlyVector3 scale) { _localTransform.setScale(scale); markDirty(DirtyType.Transform); }
@Override public ValidatingTransform setScale(final ReadOnlyVector3 scale) { super.setScale(scale); validate(); return this; }
@Override public ValidatingTransform setScale(final double uniformScale) { super.setScale(uniformScale); validate(); return this; }
@Test(expected = IllegalArgumentException.class) public void testFailScale2B() { final Transform trans = new Transform(); trans.setScale(0, 0, 0); }
@Test(expected = IllegalArgumentException.class) public void testFailScale1B() { final Transform trans = new Transform(); trans.setScale(Vector3.ZERO); }
public void applyTo(final Transform transform) { transform.setIdentity(); transform.setRotation(getRotation()); transform.setScale(getScale()); transform.setTranslation(getTranslation()); }
public void applyTo(final Transform transform) { transform.setIdentity(); transform.setRotation(getRotation()); transform.setScale(getScale()); transform.setTranslation(getTranslation()); }
public ReadOnlyTransform getValue() { final Transform t = new Transform(); t.setTranslation(_translationX.getDoubleValue(), _translationY.getDoubleValue(), 0); final double val = _rotation.getDoubleValue() * MathUtils.DEG_TO_RAD; final Matrix3 mat = Matrix3.fetchTempInstance().fromAngles(0, 0, val); t.setRotation(mat); Matrix3.releaseTempInstance(mat); t.setScale(_scale.getDoubleValue()); return t; }
@Override public void applyFilter(final InteractManager manager) { final ReadOnlyVector3 oldScale = manager.getSpatialTarget().getScale(); final SpatialState state = manager.getSpatialState(); final ReadOnlyVector3 scale = state.getTransform().getScale(); state.getTransform().setScale( // _xAxis ? scale.getX() : oldScale.getX(), // _yAxis ? scale.getY() : oldScale.getY(), // _zAxis ? scale.getZ() : oldScale.getZ()); }
public ReadOnlyTransform getValue() { final Transform t = new Transform(); t.setTranslation(_translation.getValue()); final Vector3 val = _rotation.getValue().multiplyLocal(MathUtils.DEG_TO_RAD); final Matrix3 mat = Matrix3.fetchTempInstance().fromAngles(val.getX(), val.getY(), val.getZ()); t.setRotation(mat); Matrix3.releaseTempInstance(mat); t.setScale(_scale.getValue()); return t; }
@Override public void applyFilter(final InteractManager manager) { final SpatialState state = manager.getSpatialState(); final ReadOnlyVector3 scale = state.getTransform().getScale(); final double x = MathUtils.clamp(scale.getX(), _minScale.getX(), _maxScale.getX()); final double y = MathUtils.clamp(scale.getY(), _minScale.getY(), _maxScale.getY()); final double z = MathUtils.clamp(scale.getZ(), _minScale.getZ(), _maxScale.getZ()); state.getTransform().setScale(x, y, z); }
@Test(expected = TransformException.class) public void testFailScale3A() { final Transform trans = new Transform(new Matrix3(), new Vector3(), new Vector3(), false, false, false); trans.setScale(1); }