3DTOOLS.H
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:1k
源码类别:
游戏
开发平台:
Visual C++
- // (C) Copyright 1996 by Anthony J. Carin. All Rights Reserved.
- #ifndef THREEDTOOLS_H
- #define THREEDTOOLS_H
- #include <gl/gl.h>
- #include <gl/glu.h>
- #include <3dshapes.h>
- class tc3dtools
- {
- public:
- tc3dtools();
- ~tc3dtools() {}
- void reset();
- void finish();
- void lookat(coordinate& camera, coordinate& aim);
- void begintriangle() { glBegin(GL_TRIANGLES); }
- void beginquad() { glBegin(GL_QUADS); }
- void end() { glEnd(); }
- void normals(float x, float y, float z) { glNormal3f(x, y, z); }
- void vertex(float x, float y, float z) { glVertex3f(x, y, z); }
- void beginbmp();
- void endbmp();
- void bmpvertex1(float x, float y, float z);
- void bmpvertex2(float x, float y, float z);
- void bmpvertex3(float x, float y, float z);
- void bmpvertex4(float x, float y, float z);
- void lightposition(coordinate &c);
- void material(tccolor& c);
- private:
- float m_lightposition[4];
- float m_material[4];
- };
- #endif