Text this: Hamiltonian Neural Network 6-DoF Rigid-Body Dynamic Modeling Based on Energy Variation Estimation