⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cgun.h

📁 基于遗传算法的飞船游戏
💻 H
字号:
#ifndef CGUN_H
#define CGUN_H
//-----------------------------------------------------------------------
//
//  Name: CGun.h
//
//  Author: Mat Buckland 2002
//
//	Desc: Class to show how to create and manipulate a simple shape using
//        matrix transformations
//
//-----------------------------------------------------------------------
#include <vector>
#include <windows.h>

#include "defines.h"
#include "utils.h"
#include "C2DMatrix.h"

using namespace std;



//------------------------------------------------------------------------
//
// 
//------------------------------------------------------------------------
class CGun
{
public:

    //its position in the world
    double         m_dPosX,
                   m_dPosY;

    //its rotation
    double         m_dRotation;

    //its scale
    double         m_dScale;

    //vertex buffer for the gun's local coordinates
    vector<SPoint> m_vecGunVB;

    //vertex buffer to hold the gun's transformed vertices
    vector<SPoint> m_vecGunVBTrans;

    CGun(double x,
           double y,
           double scale,
           double rot);

    void WorldTransform();
    void Render(HDC &surface);
    void Update();
};

#endif

⌨️ 快捷键说明

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