• 大小: 701KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-04
  • 语言: C/C++
  • 标签: opengl  裁剪  

资源简介

opengl 图形学 直线和多边形裁剪 C++

资源截图

代码片段和文件信息

#include “ggltools.h“

void gltRasterText(double x double y const char *text void *font)
{
    if(text == NULL) return ;
    
    glRasterPos2d(x y);
    for(int i=0; text[i] != ‘\0‘; i++)
    {
        glutBitmapCharacter(font text[i]);
    } 
}

void gltLine2d(double x0 double y0 double x1 double y1)
{
    glBegin(GL_LINES);
        glVertex2d(x0 y0);
        glVertex2d(x1 y1);
    glEnd();
}

void gltRect2d(double x0 double y0 double x1 double y1)
{
    glBegin(GL_LINE_STRIP);
        glVertex2d(x0 y0);
        glVertex2d(x1 y0);
        
        glVertex2d(x1 y1);
        
        glVertex2d(x0 y1);
        
        glVertex2d(x0 y0);
    glEnd();
}

char gltClipCode(const GPoint2d &pt const GPoint2d &top const GPoint2d &bottom)
{

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-04-10 18:44  lineandpolyClip\
     目录           0  2014-04-10 18:44  lineandpolyClip\clip\
     文件        4328  2014-04-08 20:59  lineandpolyClip\clip\Clip.dsp
     文件         533  2010-08-29 22:29  lineandpolyClip\clip\Clip.dsw
     文件      173056  2014-04-09 21:35  lineandpolyClip\clip\Clip.ncb
     文件      100352  2014-04-09 21:35  lineandpolyClip\clip\Clip.opt
     文件        1242  2014-04-09 21:35  lineandpolyClip\clip\Clip.plg
     目录           0  2014-04-10 18:44  lineandpolyClip\clip\Debug\
     文件      227532  2010-08-29 22:31  lineandpolyClip\clip\Debug\Clip.ilk
     文件      343776  2010-08-29 22:30  lineandpolyClip\clip\Debug\Clip.pch
     文件      467968  2010-08-29 22:31  lineandpolyClip\clip\Debug\Clip.pdb
     文件        9812  2010-08-29 22:30  lineandpolyClip\clip\Debug\ggltools.obj
     文件        3863  2010-08-29 22:30  lineandpolyClip\clip\Debug\gpoint2d.obj
     文件       76972  2010-08-29 22:29  lineandpolyClip\clip\Debug\gpoint2darray.obj
     文件       17782  2010-08-29 22:31  lineandpolyClip\clip\Debug\main.obj
     文件       41984  2010-08-29 22:31  lineandpolyClip\clip\Debug\vc60.idb
     文件       53248  2010-08-29 22:31  lineandpolyClip\clip\Debug\vc60.pdb
     文件        6344  2014-04-09 21:35  lineandpolyClip\clip\ggltools.cpp
     文件        1229  2014-04-09 20:55  lineandpolyClip\clip\ggltools.h
     文件         239  2014-04-01 21:03  lineandpolyClip\clip\gline.cpp
     文件         656  2014-04-02 19:22  lineandpolyClip\clip\gline.h
     文件         335  2005-12-19 21:13  lineandpolyClip\clip\gpoint2d.cpp
     文件         514  2006-04-18 20:18  lineandpolyClip\clip\gpoint2d.h
     文件        1003  2014-04-08 20:20  lineandpolyClip\clip\gpoint2darrary.h
     文件        2125  2014-04-08 20:21  lineandpolyClip\clip\gpoint2darray.cpp
     文件        1003  2014-04-08 20:22  lineandpolyClip\clip\gpoint2darray.h
     文件        1597  2014-04-08 20:24  lineandpolyClip\clip\gpoly.cpp
     文件         839  2014-04-09 20:36  lineandpolyClip\clip\gpoly.h
     文件        5527  2014-04-09 21:18  lineandpolyClip\clip\main.cpp
     目录           0  2014-04-10 18:44  lineandpolyClip\clip\Release\
     文件       61440  2014-04-09 21:35  lineandpolyClip\clip\Release\Clip.exe
............此处省略8个文件信息

评论

共有 条评论