For a given d-dimensional polyhedral complex Delta and a given degree k, we consider the vector space of piecewise polynomial functions on Delta of degree at most k with a different smoothness condition on each pair of adjacent d-faces of Delta. This is a finite dimensional vector space. The fundamental problem in Approximation Theory is to compute the dimension of this vector space. It is known that the dimension is given by a polynomial for sufficiently large k via commutative algebra. By using the technique of McDonald and Schenck  and extending their result to a plane polyhedral complex Delta with varying smoothness conditions, we determine this polynomial. This gives a complete answer for the dimension. At the end we discuss some examples through this technique.