I have used setups kind of like this for a few of my projects. What I usually do is create a "camera assembly" out of two or more dummy objects, then match the camera's position and orientation to one of them any time they move. Something like this should work in your case:
Create the "camera assembly", and set up parent/child relationships:
Object3D ship = loadShip(); // get your ship somehow
Object3D pivot = Object3D.createDummyObj();
Object3D satellite = Object3D.createDummyObj();
ship.addChild( pivot );
pivot.addChild( satellite );
Move satellite to the camera "starting position":
satellite.translate(
new SimpleVector( 0, -50, -50 ) );
// Look "down" toward the ship:
satellite.rotateAxis(
satellite.getXAxis(),
(float) Math.PI / 4.0f );
resetCameraPosition();
The "resetCameraPosition" method:
private void resetCameraPosition()
{
SimpleVector look = new SimpleVector( satellite.getZAxis() ).normalize();
SimpleVector up = new SimpleVector( satellite.getYAxis() ).normalize();
camera.setOrientation( look, up );
camera.setPosition( satellite.getTransformedCenter() );
}
Then, to zoom around the ship:
pivot.rotateAxis(
pivot.getYAxis(),
someAngle );
resetCameraPosition();
You'd also need to call "resetCameraPosition" any time you moved the ship, as well.
I haven't actually tested this exact setup (I just altered the code from one of my projects), but it should give you the general idea.
--EDIT--
One more note: if you wanted the ship to be able to move and rotate independantly from the camera assembly, just create a "master pivot" which both the ship and camera assembly are a child of:
Object3D ship = loadShip(); // get your ship somehow
Object3D pivot = Object3D.createDummyObj();
Object3D satellite = Object3D.createDummyObj();
Object3D masterPivot = Object3D.createDummyObj();
masterPivot.addChild( ship );
masterPivot.addChild( pivot );
pivot.addChild( satellite );
The rest of the above code would stay the same. With this setup, any time you wanted to translate/rotate both the ship and camera, you'd manipulate the master pivot. If you wanted to translate/rotate just the ship and not the camera, you'd manipulate the ship object. If you wanted to translate/rotate just the camera and not the ship, you'd manipulate the pivot or satellite.