Example #1
0
void Spline::draw()
{
	osg::Vec3f point;
	
	glBegin(GL_LINES);
  		point = getSplinePointAt(0);
  		glVertex3f(point.x(),point.y(),point.z());

		for(unsigned int i=1 ; i<getSplineSize() ; ++i)
		{
  			point = getSplinePointAt(i);
  			glVertex3f(point.x(),point.y(),point.z());
  			glVertex3f(point.x(),point.y(),point.z());
		}

		point = getSplinePointAt(0);
  		glVertex3f(point.x(),point.y(),point.z());
	glEnd();

	for(unsigned int i=0 ; i<getControlSize() ; ++i)
	{
  		point = getControlPointAt(i);
  		glPushMatrix();
  			glTranslatef(point.x(),point.y(),point.z());
  			glutSolidSphere(0.1f,8.0,8.0);
  		glPopMatrix();
	}
	
}
Example #2
0
 static USHORT resizeUserInfo(HWND hwnd, short cx, short cy)
 {
    int     f;
    int     ySize;
    int		iconSize;
    USHORT	top;
    int     pos;
    USHORT	y;

    iconSize =
    ySize    = (int) icqskin_querySizes(CHILD_WINDOW(hwnd,MSGID_ABOUTBUTTON),0,0);

    for(f=0;f < (sizeof(userBox)/sizeof(USHORT)); f++)
    {
       pos = getControlSize(CHILD_WINDOW(hwnd,userBox[f]));
       if(pos > ySize)
          ySize = pos;
    }

    top = y = (cy-(ySize+8));
    WinSetWindowPos(CHILD_WINDOW(hwnd,MSGID_NAMEBOX), 0, 0, y, cx, ySize+12, SWP_SIZE|SWP_MOVE|SWP_SHOW);

    y   += 3;

    WinSetWindowPos(CHILD_WINDOW(hwnd,MSGID_USERMODE), 0, 3, y, iconSize, iconSize, SWP_SIZE|SWP_MOVE|SWP_SHOW);

    pos  = setControlPos(CHILD_WINDOW(hwnd,MSGID_NICK),6+ySize, y, ySize);
    WinSetWindowPos(CHILD_WINDOW(hwnd,MSGID_NICKENTRY), 0, pos+4, y, (cx/2)-(pos+8), ySize, SWP_SIZE|SWP_MOVE|SWP_SHOW);

    pos  = setControlPos(CHILD_WINDOW(hwnd,MSGID_NAME),cx/2,y,ySize);

    f    = cx-((iconSize*2)+6);
    WinSetWindowPos(CHILD_WINDOW(hwnd,MSGID_NAMEENTRY), 0, pos+4, y, f-(pos+6), ySize, SWP_SIZE|SWP_MOVE|SWP_SHOW);

    f   += 1;
    WinSetWindowPos(CHILD_WINDOW(hwnd,MSGID_ABOUTBUTTON), 0, f, y, iconSize, iconSize, SWP_SIZE|SWP_MOVE|SWP_SHOW);

    f   += iconSize+1;
    WinSetWindowPos(CHILD_WINDOW(hwnd,MSGID_INFOBUTTON), 0, f, y, iconSize, iconSize, SWP_SIZE|SWP_MOVE|SWP_SHOW);

    return top;
 }