www.pudn.com > 3DEDITOR.rar > 3DEDITORVIEW.H
// 3DEditorView.h : interface of the CMy3DEditorView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_3DEDITORVIEW_H__5E71A0A3_F375_4E8B_B3BE_069A14303391__INCLUDED_)
#define AFX_3DEDITORVIEW_H__5E71A0A3_F375_4E8B_B3BE_069A14303391__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "ImageCapture.h"
#include "DlgCaptureMovie.h"
#include "AVICapture.h"
#include "GLMemoryDC.h"
class CMy3DEditorView : public CView
{
protected: // create from serialization only
CMy3DEditorView();
DECLARE_DYNCREATE(CMy3DEditorView)
// Attributes
public:
CMy3DEditorDoc* GetDocument();
CImageCapture m_imagecapture;
DlgCaptureMovie m_DlgCaptureMovie;
AVICapture *movieCapture;
CGLMemoryDC m_MemImageDC;
// Operations
public:
HGLRC m_hRC; //OpenGL»æÖÆÃèÊö±í
HPALETTE m_hPalette; //OpenGLµ÷É«°å
camera cam;
int cur_cam;
float nearplane,farplane,aspect,viewmaxdist;
int lbut,mousex,mousey,dtimer;
DWORD timer;
int polymode,shademode,cammode,last_mat;
vector dlp,dvp;
vector lastviewUp;
bool recording;
int MovieSize_X,MovieSize_Y;
float MovieFramerate;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy3DEditorView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMy3DEditorView();
void DrawScene(CDC* cDC);
void DrawObject(object *obj);
void DrawElement(ftlist *node);
void LookAt(vector& vp,vector& lp);
void Select(CPoint point,int mode);
void SetLogicalPalette(void);
int CreateOpenGL();
void DestroyOpenGL();
bool BeginMovieCapture(CString filename,
int width, int height,
float framerate);
void initMovieCapture(AVICapture* mc);
void recordBegin();
void recordPause();
void recordEnd();
bool isRecording();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
public:
//{{AFX_MSG(CMy3DEditorView)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnViewViewall();
afx_msg void OnViewCameraNext();
afx_msg void OnUpdateViewCameraNext(CCmdUI* pCmdUI);
afx_msg void OnViewCameraPrevious();
afx_msg void OnUpdateViewCameraPrevious(CCmdUI* pCmdUI);
afx_msg void OnUpdateViewViewall(CCmdUI* pCmdUI);
afx_msg void OnEditCameraReset();
afx_msg void OnUpdateEditCameraReset(CCmdUI* pCmdUI);
afx_msg void OnFlat();
afx_msg void OnUpdateFlat(CCmdUI* pCmdUI);
afx_msg void OnGouraund();
afx_msg void OnUpdateGouraund(CCmdUI* pCmdUI);
afx_msg void OnPoints();
afx_msg void OnUpdatePoints(CCmdUI* pCmdUI);
afx_msg void OnShaded();
afx_msg void OnUpdateShaded(CCmdUI* pCmdUI);
afx_msg void OnTextured();
afx_msg void OnUpdateTextured(CCmdUI* pCmdUI);
afx_msg void OnWireframe();
afx_msg void OnUpdateWireframe(CCmdUI* pCmdUI);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLookat();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnPan();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSelect();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnUpdateDolly(CCmdUI* pCmdUI);
afx_msg void OnUpdateLookat(CCmdUI* pCmdUI);
afx_msg void OnUpdatePan(CCmdUI* pCmdUI);
afx_msg void OnUpdateSelect(CCmdUI* pCmdUI);
afx_msg void OnElememtmode();
afx_msg void OnUpdateElememtmode(CCmdUI* pCmdUI);
afx_msg void OnMaterialmode();
afx_msg void OnUpdateMaterialmode(CCmdUI* pCmdUI);
afx_msg void OnDolly();
afx_msg void OnTilt();
afx_msg void OnUpdateTilt(CCmdUI* pCmdUI);
afx_msg void OnRaytrace();
afx_msg void OnUpdateRaytrace(CCmdUI* pCmdUI);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnCaptureImage();
afx_msg void OnCaptureMovie();
afx_msg void OnUpdateCaptureMovie(CCmdUI* pCmdUI);
afx_msg void OnCaptureRecord();
afx_msg void OnUpdateCaptureRecord(CCmdUI* pCmdUI);
afx_msg void OnCapturePause();
afx_msg void OnUpdateCapturePause(CCmdUI* pCmdUI);
afx_msg void OnCaptureStop();
afx_msg void OnUpdateCaptureStop(CCmdUI* pCmdUI);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in 3DEditorView.cpp
inline CMy3DEditorDoc* CMy3DEditorView::GetDocument()
{ return (CMy3DEditorDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_3DEDITORVIEW_H__5E71A0A3_F375_4E8B_B3BE_069A14303391__INCLUDED_)