Generalized theory of semiflexible polymers.