/* ============================================================================== OpenGLUtils.cpp Created: 17 Jan 2026 11:41:12am Author: esca ============================================================================== */ #include "OpenGLUtils.h" #include #include void svCol(Vertex &v, float newColour[4]){ v.colour[0] = newColour[0]; v.colour[1] = newColour[1]; v.colour[2] = newColour[2]; v.colour[3] = newColour[3]; } void setColour(std::vector &verticeList, float newColour[4]){ for(Vertex v : verticeList){ svCol(v, newColour); } } void vTransform(std::vector &verticeList, float x, float y){ for(Vertex &v : verticeList){ v.position[0] += x; v.position[1] += y; } } void vScale(std::vector &verticeList, float x, float y){ for(Vertex &v : verticeList){ v.position[0] = v.position[0]*x; v.position[1] = v.position[1]*y; } } std::vector generateSineWave(int numVertices, float angle, float startingColour[4]){ //generates one cycle of a sine wave with vertices numVertices and starting at angle angle std::vector ret(numVertices, Vertex{}); for (int i = 0; i