It's not a stupid question, I actually just did it.
Create a C++ class with .h & .cc extension, and make sure your class is a subclass of ns3::MobilityModel so that it can be used with ns3. You also want to make sure that in your class you create proper GetTypeId and NS_OBJECT_ENSURE_REGISTERED. You can refer to the ns3::ConstantAccelerationMobilityModel for an example.
To use your code, you can place it in the same directory as your project, say under scratch directory you have HubertProject directory, so your files should look like
./scratch
./HubertProject
hubert-main.cc
custom-mobility-model.h
custom-mobility-model.cc
And you can run it as follows
./waf --run HubertProject
Now you should be able to use it. I have created a class named LongitudinalVehicularMobilityModel
MobilityHelper mob;
mob.SetMobilityModel("ns3::LongitudinalVehicularMobilityModel");
mob.Install(nodes);
Note the ns3:: part means your class was enclosed between
namespace ns3 { ... }
Cheers!