Procedural Mesh Generation

I tried to find out about FDynamicMeshBuilder by studying the source. What I saw is that FDynamicMeshBuilder draws to a PrimitiveDrawInterface. Where would I get the PDI from? Is this really the way to go if you want to create a mesh component that can be added to an actor?
Or should UCustomMeshComponent be used? I tried including it, but the header cannot be found (private?).

Could you explain in more detail how to achieve this?