Added triangle class in C++ for native platforms.