function updateCamera( camera, parent ) {

	if ( parent === null ) {

		camera.matrixWorld.copy( camera.matrix );

	} else {

		camera.matrixWorld.multiplyMatrices( parent.matrixWorld, camera.matrix );

	}

	camera.matrixWorldInverse.copy( camera.matrixWorld ).invert();

}
Updates the world matrices for the given camera based on the parent 3D object.

@inner
@param {Camera} camera - The camera to update.
@param {Object3D} parent - The parent 3D object.