added logic for handling triangle as well as curve primitives in shading point class