/** * Calculates the position on the spiral for the specified polar angle. This takes an additional * parameter of a {@link Vector3} which will be set to the calculated position. * * @param result {@link Vector3} to set with the updated position. * @param theta {@code double} the polar angle to calculate for, in degrees. */ public void calculatePointDegrees(Vector3 result, double theta) { calculatePoint(result, Math.toRadians((mSpiralIn ? mThetaOffset - theta : theta + mThetaOffset))); }
@Override protected void applyTransformation() { synchronized (mCoalesceObjects) { synchronized (mThetaRanges) { int i; final int j = mCoalesceObjects.size(); for (i = 0; i < j; ++i) { // Retrieve the configuration CoalesceConfig config = mCoalesceObjects.get(i); double theta = mThetaRanges.get(i) * mInterpolatedTime; // Calculate the next point config.spiral.calculatePoint(config.object.getPosition(), theta); // Add the coalesce point to translate our spiral config.object.getPosition().add(config.coalesceAroundPoint); } } } }
/** * Calculates the position on the spiral for the specified polar angle. This takes an additional * parameter of a {@link Vector3} which will be set to the calculated position. * * @param result {@link Vector3} to set with the updated position. * @param theta {@code double} the polar angle to calculate for, in degrees. */ public void calculatePointDegrees(Vector3 result, double theta) { calculatePoint(result, Math.toRadians((mSpiralIn ? mThetaOffset - theta : theta + mThetaOffset))); }
@Override protected void applyTransformation() { synchronized (mCoalesceObjects) { synchronized (mThetaRanges) { int i; final int j = mCoalesceObjects.size(); for (i = 0; i < j; ++i) { // Retrieve the configuration CoalesceConfig config = mCoalesceObjects.get(i); double theta = mThetaRanges.get(i) * mInterpolatedTime; // Calculate the next point config.spiral.calculatePoint(config.object.getPosition(), theta); // Add the coalesce point to translate our spiral config.object.getPosition().add(config.coalesceAroundPoint); } } } }