Viewing a Model – Step 2
The following code displays all the Polygon objects in a Union Of Primitive:
void drawUofP( const seObject &uofp ) {
seIterator polys( SE_DRM_CLS_POLYGON ), vertices( SE_DRM_CLS_VERTEX );
// not shown: getting the Colour and calling glColor3f()
while ( polys.next( &poly ) ) {
while ( vertices.next( &obj ) ) {
obj.getComponent( SE_DRM_CLS_LSR_LOCATION_3D, &obj );
glVertex3f( fp->u.LSR_Location_3D.coordinate.x,
fp->u.LSR_Location_3D.coordinate.y,
fp->u.LSR_Location_3D.coordinate.z );