Ok, first if done that way, I would use a vector instance from the pool instead of a new instance each frame. Otherwise you might see hick-ups from the garbage collector.
Vector3f movedir = Vector3f.fromPool(0f,0f,0f);
...
Vector3f.toPool(moveDir);
xith.getView().getPosition().add(movedir) does nothing. It just adds some values to a vector, that isn't used internally.
You can put some knowledge into this piece of code to save some computations.
private static final float MOVEMENT_SPEED = 1.0f; // one unit per second
private final Vector3f movement = new Vector3f( 0f, 0f, 0f );
private final Vector3f tmp = new Vector3f();
void handleCameraFromInput( float dt )
{
View view = XithRenderView.this.xithEnv.getView(); // We could also store this pointer in this instance.
view.getRightDirection( tmp );
// Here we can know, that the view's transform doesn't include scaling.
// Hence we can spare the normalization.
tmp.scale( dt * MOVEMENT_SPEED ); // I assume dt to be a fraction of a second.
movement.add( tmp );
view.getTransform().setTranslation( movement );
}
I agree, that the improvement is minimal. Though normalization is expensive. Anyway this isn't that much code.
If rotation is also done in the same code, the advantage becomes bigger, since you can do everything at once and can safe some additional computations.
Marvin