if (m_velocities == null || m_bodyCapacity > m_velocities.length) {
final Velocity[] old = m_velocities == null ? new Velocity[0] : m_velocities;
m_velocities = new Velocity[m_bodyCapacity];
System.arraycopy(old, 0, m_velocities, 0, old.length);
for (int i = old.length; i < m_velocities.length; i++) {
m_velocities[i] = new Velocity();
}
}
// dynamic array
if (m_positions == null || m_bodyCapacity > m_positions.length) {