3dtools.h

来自「一个三维打斗游戏」· C头文件 代码 · 共 41 行

H
41
字号
// (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

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?