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

📄 guitscontrol.h

📁 五行MMORPG引擎系统V1.0
💻 H
字号:
//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------

#ifndef _GUITSCONTROL_H_
#define _GUITSCONTROL_H_

#ifndef _GUICONTROL_H_
#include "gui/core/guiControl.h"
#endif
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
#ifndef _DGL_H_
#include "dgl/dgl.h"
#endif

struct CameraQuery
{
   CameraQuery()
   {
      ortho = false;
   }

   SimObject*  object;
   F32         nearPlane;
   F32         farPlane;
   F32         fov;
   MatrixF     cameraMatrix;

   F32         leftRight;
   F32         topBottom;
   bool        ortho;
   //Point3F position;
   //Point3F viewVector;
   //Point3F upVector;
};

class GuiTSCtrl : public GuiControl
{
   typedef GuiControl Parent;

protected:
   GLdouble       mSaveModelview[16];
   GLdouble       mSaveProjection[16];
   GLint          mSaveViewport[4];

   static U32     smFrameCount;
   F32            mCameraZRot;
   F32            mForceFOV;

   bool           mApplyFilterToChildren;

public:
   CameraQuery    mLastCameraQuery;

public:
   GuiTSCtrl();

   void onPreRender();
   void onRender(Point2I offset, const RectI &updateRect);
   virtual bool processCameraQuery(CameraQuery *query);
   virtual void renderWorld(const RectI &updateRect);

   static void initPersistFields();
   static void consoleInit();

   bool project(const Point3F &pt, Point3F *dest); // returns screen space X,Y and Z for world space point
   bool unproject(const Point3F &pt, Point3F *dest); // returns world space point for X, Y and Z



   DECLARE_CONOBJECT(GuiTSCtrl);
};

#endif

⌨️ 快捷键说明

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