Update of /cvsroot/playerstage/code/stage/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18159/src
Modified Files:
Tag: opengl
gui_gl.c model.c stage.h
Log Message:
does not build - in the midst of rtv overhaul
Index: gui_gl.c
===================================================================
RCS file: /cvsroot/playerstage/code/stage/src/Attic/gui_gl.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -d -r1.1.2.4 -r1.1.2.5
*** gui_gl.c 22 Dec 2006 23:56:57 -0000 1.1.2.4
--- gui_gl.c 2 Jan 2007 08:37:49 -0000 1.1.2.5
***************
*** 1165,1229 ****
}
! void model_draw_bbox( stg_model_t* mod, gpointer callback_dummy )
! {
! int p;
! //for( p=0; p<mod->polygons_count; p++ )
! {
! double xmin = mod->epbbox.x.min.value;
! double xmax = mod->epbbox.x.max.value;
! double ymin = mod->epbbox.y.min.value;
! double ymax = mod->epbbox.y.max.value;
! double zmin = mod->epbbox.z.min.value;
! double zmax = mod->epbbox.z.max.value;
! // model's body color
! push_color_stgcolor( mod->color );
! // draw rectangles on the axes indicating the extent of bboxes.
! glBegin(GL_LINE_LOOP );
! glVertex3f( xmin, 0, zmin);
! glVertex3f( xmin, 0, zmax);
! glVertex3f( xmax, 0, zmax);
! glVertex3f( xmax, 0, zmin);
! glEnd();
! glBegin(GL_LINE_LOOP );
! glVertex3f( 0, ymin, zmin);
! glVertex3f( 0, ymin, zmax);
! glVertex3f( 0, ymax, zmax);
! glVertex3f( 0, ymax, zmin);
! glEnd();
! // bottom rectangle
! glBegin(GL_LINE_LOOP );
! glVertex3f( xmin, ymin, zmin );
! glVertex3f( xmin, ymax, zmin );
! glVertex3f( xmax, ymax, zmin );
! glVertex3f( xmax, ymin, zmin );
! glEnd();
! // top rectangle
! glBegin(GL_LINE_LOOP );
! glVertex3f( xmin, ymin, zmax );
! glVertex3f( xmin, ymax, zmax );
! glVertex3f( xmax, ymax, zmax );
! glVertex3f( xmax, ymin, zmax );
! glEnd();
! // verticals
! glBegin( GL_LINES );
! glVertex3f( xmin, ymin, zmin );
! glVertex3f( xmin, ymin, zmax );
! glVertex3f( xmax, ymin, zmin );
! glVertex3f( xmax, ymin, zmax );
! glVertex3f( xmin, ymax, zmin );
! glVertex3f( xmin, ymax, zmax );
! glVertex3f( xmax, ymax, zmin );
! glVertex3f( xmax, ymax, zmax );
! glEnd();
! pop_color();
! }
! }
--- 1165,1230 ----
}
! /* void model_draw_bbox( stg_model_t* mod, gpointer dummy ) */
! /* { */
! /* if( mod->polygons_count ) */
! /* { */
! /* stg_endpoint_t *epts = mod->polygons[0].epts; */
!
! /* double xmin = epts[0].value; */
! /* double xmax = epts[1].value; */
! /* double ymin = epts[2].value; */
! /* double ymax = epts[3].value; */
! /* double zmin = epts[4].value; */
! /* double zmax = epts[5].value; */
! /* // model's body color */
! /* push_color_stgcolor( mod->color ); */
! /* // draw rectangles on the axes indicating the extent of bboxes. */
! /* glBegin(GL_LINE_LOOP ); */
! /* glVertex3f( xmin, 0, zmin); */
! /* glVertex3f( xmin, 0, zmax); */
! /* glVertex3f( xmax, 0, zmax); */
! /* glVertex3f( xmax, 0, zmin); */
! /* glEnd(); */
! /* glBegin(GL_LINE_LOOP ); */
! /* glVertex3f( 0, ymin, zmin); */
! /* glVertex3f( 0, ymin, zmax); */
! /* glVertex3f( 0, ymax, zmax); */
! /* glVertex3f( 0, ymax, zmin); */
! /* glEnd(); */
! /* // bottom rectangle */
! /* glBegin(GL_LINE_LOOP ); */
! /* glVertex3f( xmin, ymin, zmin ); */
! /* glVertex3f( xmin, ymax, zmin ); */
! /* glVertex3f( xmax, ymax, zmin ); */
! /* glVertex3f( xmax, ymin, zmin ); */
! /* glEnd(); */
! /* // top rectangle */
! /* glBegin(GL_LINE_LOOP ); */
! /* glVertex3f( xmin, ymin, zmax ); */
! /* glVertex3f( xmin, ymax, zmax ); */
! /* glVertex3f( xmax, ymax, zmax ); */
! /* glVertex3f( xmax, ymin, zmax ); */
! /* glEnd(); */
! /* // verticals */
! /* glBegin( GL_LINES ); */
! /* glVertex3f( xmin, ymin, zmin ); */
! /* glVertex3f( xmin, ymin, zmax ); */
! /* glVertex3f( xmax, ymin, zmin ); */
! /* glVertex3f( xmax, ymin, zmax ); */
! /* glVertex3f( xmin, ymax, zmin ); */
! /* glVertex3f( xmin, ymax, zmax ); */
! /* glVertex3f( xmax, ymax, zmin ); */
! /* glVertex3f( xmax, ymax, zmax ); */
! /* glEnd(); */
! /* pop_color(); */
! /* } */
! /* } */
***************
*** 1240,1244 ****
//printf( "\t%.2f %d %s\n", ep->value, ep->type, ep->mod->token );
! push_color_stgcolor( ep->mod->color );
glBegin( GL_POLYGON );
--- 1241,1245 ----
//printf( "\t%.2f %d %s\n", ep->value, ep->type, ep->mod->token );
! push_color_stgcolor( ep->polygon->color );
glBegin( GL_POLYGON );
***************
*** 1267,1271 ****
for( ep = world->endpts.y; ep; ep=ep->next )
{
! push_color_stgcolor( ep->mod->color );
glBegin( GL_POLYGON );
--- 1268,1272 ----
for( ep = world->endpts.y; ep; ep=ep->next )
{
! push_color_stgcolor( ep->polygon->color );
glBegin( GL_POLYGON );
***************
*** 1296,1300 ****
//printf( "\t%s at %.2f\n", ep->mod->token, ep->value );
! push_color_stgcolor( ep->mod->color );
glBegin( GL_POLYGON );
--- 1297,1301 ----
//printf( "\t%s at %.2f\n", ep->mod->token, ep->value );
! push_color_stgcolor( ep->polygon->color );
glBegin( GL_POLYGON );
***************
*** 1435,1439 ****
// draw the model bounding boxes
! g_hash_table_foreach( world->models, (GHFunc)model_draw_bbox, NULL);
// draw the models
--- 1436,1440 ----
// draw the model bounding boxes
! //g_hash_table_foreach( world->models, (GHFunc)model_draw_bbox, NULL);
// draw the models
Index: model.c
===================================================================
RCS file: /cvsroot/playerstage/code/stage/src/model.c,v
retrieving revision 1.153.2.4
retrieving revision 1.153.2.5
diff -C2 -d -r1.153.2.4 -r1.153.2.5
*** model.c 23 Dec 2006 01:45:54 -0000 1.153.2.4
--- model.c 2 Jan 2007 08:37:49 -0000 1.153.2.5
***************
*** 306,310 ****
// create the 6 endpoints that represent the global bounding box of
// this polygon
! stg_endpoint_t* epts = calloc( sizeof(stg_endpoint_bbox_t), 6 );
int i;
--- 306,310 ----
// create the 6 endpoints that represent the global bounding box of
// this polygon
! stg_endpoint_t* epts = calloc( sizeof(stg_endpoint_t), 6 );
int i;
***************
*** 312,316 ****
{
epts[i].type = i % 2; // 0 == STG_BEGIN, 1 == STG_END
! epts[i].poly = poly;
epts[i].value = poly->bounds[i];
}
--- 312,316 ----
{
epts[i].type = i % 2; // 0 == STG_BEGIN, 1 == STG_END
! epts[i].polygon = poly;
epts[i].value = poly->bounds[i];
}
Index: stage.h
===================================================================
RCS file: /cvsroot/playerstage/code/stage/src/stage.h,v
retrieving revision 1.189.2.4
retrieving revision 1.189.2.5
diff -C2 -d -r1.189.2.4 -r1.189.2.5
*** stage.h 23 Dec 2006 01:45:54 -0000 1.189.2.4
--- stage.h 2 Jan 2007 08:37:49 -0000 1.189.2.5
***************
*** 339,343 ****
/// width and height of the polygon
! stg_size_t size;
/// pointer to the model that owns this polygon
--- 339,343 ----
/// width and height of the polygon
! //stg_size_t size;
/// pointer to the model that owns this polygon
***************
*** 345,349 ****
/// 3D axis-aligned global bounding volume
! double bounds[6];
void* _data; // temporary internal use only
--- 345,349 ----
/// 3D axis-aligned global bounding volume
! stg_endpoint_t epts[6];
void* _data; // temporary internal use only
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit