Mechanism of calcium phosphate deposition in a hydrothermal coating process