Im trying to make a bezier surface. I read points from a file and then use and evaluator to print the surface. I have read some samples (red book or blue book and some links - all use the same sample) that works fine if the points definition is into the main program. But if i want to programm a class with this phylosopy, dont work:

Qt Code:
  1. class GLWidget : public QGLWidget
  2. {
  3. ...
  4.  
  5. private:
  6. GLuint makeSurf(const GLfloat *reflectance, GLfloat ***points);
  7. GLfloat ***ctrlpoints;
  8. ...
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. GLWidget::GLWidget(QWidget *parent)
  2. : QGLWidget(parent)
  3. {
  4. ...
  5. //ctrlpoints = new (GLfloat **);
  6. GLfloat ctrlpoints[4][4][3]= <- this crash
  7. {
  8. {
  9. {-1.5, -1.5, 4.0},
  10. {-0.5, -1.5, 2.0},
  11. {0.5, -1.5, -1.0},
  12. {1.5, -1.5, 2.0}},
  13. {
  14. {-1.5, -0.5, 1.0},
  15. {-0.5, -0.5, 3.0},
  16. {0.5, -0.5, 0.0},
  17. {1.5, -0.5, -1.0}},
  18. {
  19. {-1.5, 0.5, 4.0},
  20. {-0.5, 0.5, 0.0},
  21. {0.5, 0.5, 3.0},
  22. {1.5, 0.5, 4.0}},
  23. {
  24. {-1.5, 1.5, -2.0},
  25. {-0.5, 1.5, -2.0},
  26. {0.5, 1.5, 0.0},
  27. {1.5, 1.5, -1.0}}
  28. };
  29. ...
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. void GLWidget::initializeGL()
  2. {
  3. ....
  4. surf1=makeSurf(reflectance3,&ctrlpoints[0][0][0]); <- this crash too
  5. ....
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. GLuint GLWidget::makeSurf(const GLfloat *reflectance, GLfloat ***points)
  2. {
  3. ...
  4. glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4, &points[0][0][0]);
  5. ...
To copy to clipboard, switch view to plain text mode 

The problem is how to define a pointer dinamically with 3 indexes (¿[][][]->***?) in a class...
I hope you understand me.
Some help please