|
以下是一个头文件,本来是编译通过的:
#pragma once
#ifndef _E11COMBOOBJ_H_
#define _E11COMBOOBJ_H_
#include "DXUTCamera.h"
#include "DX9Obj.h"
#include "E11_screw1.h"
#include "E11_screw2.h"
#include "E11_screw3.h"
#include "E11_bubble.h"
#include "E11_reflector.h"
#include "E11_telescope.h"
#include "E11_eye.h"
#include "E11_weight1.h"
#include "E11_weight2.h"
#include "E11_weight3.h"
#include "E11_arrow.h"
#include "E11_framework.h"
#include "E11_lens.h"
#include <list>
/*
Desc:[1]该对象仅被Panel系列class引用
[2]独立的坐标映射矩阵
*/
class CE11ComboObj:public CDX9Obj
{
public:
CE11ComboObj(void):m_fObjectRadius(2.5119696f),m_vObjectCenter(0.505137f, 0.297252f, 0.00237098f),
m_screw1(&m_matWorld,&m_matView,&m_matProj),
m_screw2(&m_matWorld,&m_matView,&m_matProj),
m_screw3(&m_matWorld,&m_matView,&m_matProj),
m_bubble(&m_matWorld,&m_matView,&m_matProj),
m_reflector(&m_matWorld,&m_matView,&m_matProj),
m_telescope(&m_matWorld,&m_matView,&m_matProj),
m_eye(&m_matWorld,&m_matView,&m_matProj),
m_weight1(&m_matWorld,&m_matView,&m_matProj),
m_weight2(&m_matWorld,&m_matView,&m_matProj),
m_weight3(&m_matWorld,&m_matView,&m_matProj),
m_arrow(&m_matWorld,&m_matView,&m_matProj),
m_framework(&m_matWorld,&m_matView,&m_matProj),
m_lens(&m_matWorld,&m_matView,&m_matProj,false)
{
m_list.push_back(&m_screw1);
m_list.push_back(&m_screw2);
m_list.push_back(&m_screw3);
m_list.push_back(&m_bubble);
m_list.push_back(&m_reflector);
m_list.push_back(&m_telescope);
m_list.push_back(&m_eye);
m_list.push_back(&m_weight1);
m_list.push_back(&m_weight2);
m_list.push_back(&m_weight3);
m_list.push_back(&m_arrow);
m_list.push_back(&m_framework);
m_list.push_back(&m_lens);
m_lens.m_pEye = &m_eye;
m_nStep = 0;
}
~CE11ComboObj(void)
{
m_nStep = 0;
}
//CALLBACK函数列表
HRESULT OnCreateDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc,
void* pUserContext );
void OnLostDevice( void* pUserContext );
HRESULT OnResetDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc,
void* pUserContext );
void OnDestroyDevice( void* pUserContext );
//允许用更新版本的OnFrameMove代替这个OnFrameMove
void OnFrameMove( double fTime, float fElapsedTime, void* pUserContext );
void OnFrameRender( IDirect3DDevice9* pd3dDevice, double fTime, float fElapsedTime, void* pUserContext );
//应用程序准备退出时调用,当用户退出程序,OnPrepareAppExit会被调用,其次再调用OnLostDevice,其次再调用OnDestroyDevice
void OnPrepareAppExit();
//应用级初始化
void InitApp();
void OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext );
bool MsgProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
void MouseProc( bool bLeftButtonDown, bool bRightButtonDown, bool bMiddleButtonDown,
bool bSideButton1Down, bool bSideButton2Down, int nMouseWheelDelta, int xPos, int yPos, void* pUserContext );
int m_nStep;
//下面的域,用来存放,MouseProc的回调结果
bool m_bMLB; //has MouseLeftButton been down
POINT m_ptM; //Mouse pointer location
//坐标映射
CD3DArcBall m_ArcBall; // Arcball for model control
D3DXMATRIXA16 m_matView; // View matrix
D3DXMATRIXA16 m_matProj; // Projection matrix
D3DXMATRIXA16 m_matWorld; // World matrix
float m_fObjectRadius;
D3DXVECTOR3 m_vObjectCenter;
CE11_screw1 m_screw1;
CE11_screw2 m_screw2;
CE11_screw3 m_screw3;
CE11_bubble m_bubble;
CE11_reflector m_reflector;
CE11_telescope m_telescope;
CE11_eye m_eye;
CE11_weight1 m_weight1;
CE11_weight2 m_weight2;
CE11_weight3 m_weight3;
CE11_arrow m_arrow;
CE11_framework m_framework;
CE11_lens m_lens;
private:
std::list< C3DAMachine* > m_list;
};
#endif
但是,我把其中关于CE11_lens这个类的部分都去掉后,就出现syntax error '{',请问达人,是什么问题啊? |
|