- GLuint DisplayWidget::makeCluster(ClusterList clusters)
- {
- glInitNames();
- glPushName(0);
- GLuint list = glGenLists(1); // allocates range number of contiguous display list indices
- glNewList(list, GL_COMPILE); // create new display list
- ClusterList::iterator begin = clusters.begin();
- for ( ; begin != clusters.end(); begin++) {
- Cluster* currentCluster = *begin;
- glLoadName(currentCluster->getId());
- PointList points = currentCluster->getPointList();
- glBegin(GL_POINTS);
- for(int i = 0; i < points.size(); i++) {
- Point *p = points.at(i);
- glVertex3f(p->x, -(p->z), p->y);
- } //for
- glEnd();
- } //if
- } //for
- glEndList(); // end of display list
- return list;
- } //makeCluster