[Igarden-commit] Garden/source/Plugins DefaultRenderPlugin.cpp, 1.13.2.1, 1.13.2.2
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-11-01 03:10:12
|
Update of /cvsroot/igarden/Garden/source/Plugins In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv30791 Modified Files: Tag: Release_branch_v1 DefaultRenderPlugin.cpp Log Message: Add zAxis to elements Add polygon smoothing to material drawing Index: DefaultRenderPlugin.cpp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Plugins/DefaultRenderPlugin.cpp,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** DefaultRenderPlugin.cpp 29 Oct 2006 03:31:48 -0000 1.13.2.1 --- DefaultRenderPlugin.cpp 1 Nov 2006 03:10:10 -0000 1.13.2.2 *************** *** 440,449 **** { pt = list[n]; ! glVertex3f (pt.xOffset, pt.yOffset, kGraphicsZ); } if(closure == kFigureClosed) { pt = list[0]; ! glVertex3f (pt.xOffset, pt.yOffset, kGraphicsZ); } glEnd(); --- 440,449 ---- { pt = list[n]; ! glVertex3f (pt.xOffset, pt.yOffset, pt.zOffset); } if(closure == kFigureClosed) { pt = list[0]; ! glVertex3f (pt.xOffset, pt.yOffset, pt.zOffset); } glEnd(); *************** *** 480,487 **** markLen = 5 * scale; glBegin(GL_LINES); ! glVertex3f (point.xOffset-markLen, point.yOffset, kGraphicsZ); ! glVertex3f (point.xOffset+markLen, point.yOffset, kGraphicsZ); ! glVertex3f (point.xOffset, point.yOffset-markLen, kGraphicsZ); ! glVertex3f (point.xOffset, point.yOffset+markLen, kGraphicsZ); glEnd(); result = kCanvasOK; --- 480,487 ---- markLen = 5 * scale; glBegin(GL_LINES); ! glVertex3f (point.xOffset-markLen, point.yOffset, point.zOffset); ! glVertex3f (point.xOffset+markLen, point.yOffset, point.zOffset); ! glVertex3f (point.xOffset, point.yOffset-markLen, point.zOffset); ! glVertex3f (point.xOffset, point.yOffset+markLen, point.zOffset); glEnd(); result = kCanvasOK; *************** *** 497,511 **** glColor4f (0.0, 0.0, 0.0, 1.0); glBegin(GL_POLYGON); ! glVertex3f (left, top, kGraphicsZ); ! glVertex3f (right, top, kGraphicsZ); ! glVertex3f (right, bottom, kGraphicsZ); ! glVertex3f (left, bottom, kGraphicsZ); glEnd(); glColor4f (1.0, 1.0, 1.0, 1.0); glBegin(GL_LINE_LOOP); ! glVertex3f (left-scale, top+scale, kGraphicsZ); ! glVertex3f (right+scale, top+scale, kGraphicsZ); ! glVertex3f (right+scale, bottom-scale, kGraphicsZ); ! glVertex3f (left-scale, bottom-scale, kGraphicsZ); glEnd(); glPopAttrib(); --- 497,511 ---- glColor4f (0.0, 0.0, 0.0, 1.0); glBegin(GL_POLYGON); ! glVertex3f (left, top, point.zOffset); ! glVertex3f (right, top, point.zOffset); ! glVertex3f (right, bottom, point.zOffset); ! glVertex3f (left, bottom, point.zOffset); glEnd(); glColor4f (1.0, 1.0, 1.0, 1.0); glBegin(GL_LINE_LOOP); ! glVertex3f (left-scale, top+scale, point.zOffset); ! glVertex3f (right+scale, top+scale, point.zOffset); ! glVertex3f (right+scale, bottom-scale, point.zOffset); ! glVertex3f (left-scale, bottom-scale, point.zOffset); glEnd(); glPopAttrib(); *************** *** 621,626 **** --- 621,628 ---- upperLeft.xOffset = center.xOffset - (_xSize/2); upperLeft.yOffset = center.yOffset - (_ySize/2); + upperLeft.zOffset = center.zOffset; lowerRight.xOffset = center.xOffset + (_xSize/2); lowerRight.yOffset = center.yOffset + (_ySize/2); + lowerRight.zOffset = center.zOffset; /**/ *************** *** 637,641 **** glPushMatrix(); { ! glTranslatef(center.xOffset, center.yOffset, kGraphicsZ); err = glGetError(); --- 639,643 ---- glPushMatrix(); { ! glTranslatef(center.xOffset, center.yOffset, center.zOffset+kGraphicsZ); err = glGetError(); *************** *** 705,708 **** --- 707,711 ---- pt.xOffset = center.xOffset + (cos(angle) * _fullSpread/2); pt.yOffset = center.yOffset + (sin(angle) * _fullSpread/2); + pt.zOffset = center.zOffset; glVertex3f (pt.xOffset, pt.yOffset, _zSize); *************** *** 710,714 **** pt.xOffset = center.xOffset + (cos(endAngle) * _fullSpread/2); pt.yOffset = center.yOffset + (sin(endAngle) * _fullSpread/2); ! glVertex3f (pt.xOffset, pt.yOffset, _zSize); glEnd(); } --- 713,718 ---- pt.xOffset = center.xOffset + (cos(endAngle) * _fullSpread/2); pt.yOffset = center.yOffset + (sin(endAngle) * _fullSpread/2); ! pt.zOffset = center.zOffset; ! glVertex3f (pt.xOffset, pt.yOffset, pt.zOffset+_zSize); glEnd(); } *************** *** 731,735 **** glEnd(); _picture->CopyImage(_view, left, top, ! _zSize+kPlantImageZ, _pictureWidth, _pictureHeight, 1.0, _scale); } } --- 735,739 ---- glEnd(); _picture->CopyImage(_view, left, top, ! center.zOffset+_zSize+kPlantImageZ, _pictureWidth, _pictureHeight, 1.0, _scale); } } |