Everyone,
I am writing a class in C++ which calculates points in space. I am designing this class to be independent from the application, so basically what I want -
Initialize object with input parameters -> calculate the values -> retrieve the calculated array
I prefer using C-like array (not the std::array). I'm writing the getter function -
// The definition of the ctrlpoints array
GLfloat ctrlpoints[4][4][3];
void GlCircle::getControlPoints(GLfloat* controlPoints) {
std::copy(std::begin(ctrlpoints), std::end(ctrlpoints), std::begin(controlPoints));
}
Basically it should copy all values from ctrlpoints array to controlPoints target array. Of course compiler does not allow me to do just that (it doesn't like the type for std::begin(controlPoints)). Maybe someone can suggest an idea how should I return a copy of the array? Maybe the idea can realized in some other way, please let me know.
Thanks in advance.
std::array)." Can you give any sensible reasoning for this?openglfor drawing the points and it accepts only that kind of array (as far as I know). So it would a more elegant solution, otherwise it requires type convertions..std::arrayjust fine.