// We don't use a TransformGroup in scene tree to be able to share the same scene
// in the different views displayed by OrientationPreviewComponent class
Transform3D pitchRotation = new Transform3D();
pitchRotation.rotX(viewPitch);
Transform3D yawRotation = new Transform3D();
yawRotation.rotY(viewYaw);
Transform3D transform = new Transform3D();
transform.setTranslation(
new Vector3d(Math.sin(viewYaw) * nominalDistanceToCenter * Math.cos(viewPitch),
nominalDistanceToCenter * Math.sin(-viewPitch),
Math.cos(viewYaw) * nominalDistanceToCenter * Math.cos(viewPitch)));