private final void transform(final double[] x, final double[] y, final double[] z, final Transform3D t, final Point3d p) { for (int i=0; i<this.length; i++) { p.x = x[i]; p.y = y[i]; p.z = z[i]; t.transform(p); x[i] = p.x; y[i] = p.y; z[i] = p.z; } }
static private void transform(final Transform3D t, final double[] x, final double[] y, final double[] z, final int length, final Point3d p) { for (int i=0; i<length; i++) { p.x = x[i]; p.y = y[i]; p.z = z[i]; t.transform(p); x[i] = p.x; y[i] = p.y; z[i] = p.z; } }
@Override void mergeTransform(TransformGroupRetained xform) { super.mergeTransform(xform); xform.transform.transform(position, position); } }
@Override PickShape transform(Transform3D t3d) { PickPoint newPPt = new PickPoint(); newPPt.location.x = location.x; newPPt.location.y = location.y; newPPt.location.z = location.z; t3d.transform(newPPt.location); return newPPt; }
/** * Initializes the spot light's direction from the vector provided. * @param direction the new direction of the light */ void initDirection(Vector3f direction) { this.direction.set(direction); if (staticTransform != null) { staticTransform.transform.transform(this.direction, this.direction); } }
/** * Add another point which should be visible in the canvas; the point is * expected to be in local coordinates, with the given local-to-vworld * transformation. */ public void add(final Transform3D localToVworld, final Point3d local) { localToVworld.transform(local); add(local); }
@Override void mergeTransform(TransformGroupRetained xform) { super.mergeTransform(xform); xform.transform.transform(direction, direction); } }
@Override void mergeTransform(TransformGroupRetained xform) { super.mergeTransform(xform); xform.transform.transform(position, position); } }
/** * Initializes this light's position from the vector provided. * @param position the new position */ void initPosition(Point3f position) { this.position.set(position); if (staticTransform != null) { staticTransform.transform.transform(this.position, this.position); } }
@Override void mergeTransform(TransformGroupRetained xform) { super.mergeTransform(xform); xform.transform.transform(direction); } }
@Override void mergeTransform(TransformGroupRetained xform) { super.mergeTransform(xform); xform.transform.transform(direction, direction); } }
private void cacheEyePosCoexistenceRelative(Point3d leftManualEyeInCoexistence, Point3d rightManualEyeInCoexistence) { tPnt1.set(leftManualEyeInCoexistence); viewCache.coexistenceToTrackerBase.transform(tPnt1); screenViewCache.trackerBaseToImagePlate.transform(tPnt1); tPnt1.add(coexistenceCenter); tPnt2.set(rightManualEyeInCoexistence); viewCache.coexistenceToTrackerBase.transform(tPnt2); screenViewCache.trackerBaseToImagePlate.transform(tPnt2); tPnt2.add(coexistenceCenter); cacheEyePosScreenRelative(tPnt1, tPnt2); }
private final void volumePointInCanvas(final Canvas3D canvas, final Transform3D volToIP, final Point3d p, final Point2d ret) { ptmp.set(p); volToIP.transform(ptmp); canvas.getPixelLocationFromImagePlate(ptmp, ret); }
/** * Retrieves this light's direction and places it in the * vector provided. * @param direction the variable to receive the direction vector */ void getDirection(Vector3f direction) { direction.set(this.direction); if (staticTransform != null) { Transform3D invTransform = staticTransform.getInvTransform(); invTransform.transform(direction, direction); } }
@Override void updateTransformChange() { super.updateTransformChange(); getLastLocalToVworld().transform(position, xformPosition); // set flag looked at by Scheduler to denote Transform change // this flag will force resneding transformed position to AudioDevice if (debugFlag) debugPrint("PointSoundRetained xformPosition is (" + xformPosition.x + ", " + xformPosition.y + ", "+ xformPosition.z + ")"); }
@Override void updateTransformChange() { super.updateTransformChange(); getLastLocalToVworld().transform(direction, xformDirection); xformDirection.normalize(); }
void updateTransformRegion() { Transform3D tr = getCurrentLocalToVworld(null); schedSphere.setCenter(zeroPoint); schedSphere.transform(tr); tr.transform(zeroPoint, center); }
/** * Calculates the distance between the viewer's eye and an arbitrary point in * the vworld space. * * @return */ public double distanceEyeTo(final Point3d p) { canvas.getCenterEyeInImagePlate(eyePos); canvas.getImagePlateToVworld(ipToVWorld); ipToVWorld.transform(eyePos); return eyePos.distance(p); }
@Override void updateTransformChange() { Transform3D lastLocalToVworld = getLastLocalToVworld(); super.updateTransformChange(); lastLocalToVworld.transform(direction, xformDirection); xformDirection.normalize(); // set flag looked at by Scheduler to denote Transform change // this flag will force resneding transformed direction to AudioDevice if (debugFlag) debugPrint("ConeSound xformDirection is (" + xformDirection.x + ", " + xformDirection.y + ", "+ xformDirection.z + ")"); }