Change geometry type to an enum, factory method on TFGeometry to instantiate subclasses.