Histogram of 3d facet. Visual studio project C++