Theory of crystal ordering: Hexagonal symmetry