IV. CÁCH TỔ CHỨC CÁC HÀM TRONG OPENGL 3D
Trong phần kiểm tra trong 3D, cĩ các phương thúc xử lý các thao tác như sau:
1- Những hàm được sử dụng trong lớp CkiemTra3Dview
Construction/destruction lớp CView CKiemTra3DView::CKiemTra3DView() CKiemTra3DView::~CKiemTra3DView() Các hàm tạo cửa sổ, vẽ của lớp CView
BOOLCKiemTra3DView::PreCreateWindow(CREATESTRUCT& cs) void CKiemTra3DView::OnDraw(CDC* pDC)
void CKiemTra3DView::AssertValid() const
void CKiemTra3DView::Dump(CDumpContext& dc) const Hàm tạo ngữ cảnh để phù hợp với việc vẽ các vật thể 3D
int CKiemTra3DView::OnCreate(LPCREATESTRUCT pCreateStruct)
Luận văn tốt nghiệp
Các hàm điều chỉnh kích thước, tạo màu nền void CKiemTra3DView::OnDestroy()
void CKiemTra3DView::OnSize(UINT nType, int cx, int cy) BOOL CKiemTra3DView::OnEraseBkgnd(CDC* pDC) void CKiemTra3DView::GLResize(GLsizei w, GLsizei h) void CKiemTra3DView::GLSetupRC()
void CKiemTra3DView::Khoitaopalette()
BOOL CKiemTra3DView::OnQueryNewPalette()
void CKiemTra3DView::OnPaletteChanged(CWnd* pFocusWnd) Hàm nhấn các phím mũi tên để quan sát vật thể
void CkiemTra3Dview::OnKeyDown(UINT nChar, UINT nRepCnt, INT Flags)
Các hàm thực hiện các thao tác nhập tọa độ cho mặt phẳng, điểm, đường thẳng
void CKiemTra3DView:: OnNhapMPhang1() void CKiemTra3DView:: OnNhapMPhang2() void CKiemTra3DView:: OnNhapTDDiem() void CKiemTra3DView:: OnNhapTDDuong1() void CKiemTra3DView:: OnNhapTDDuong2()
Các hàm thực hiện các thao tác kiểm tra, tính tốn giữa các đối tượng điểm, đường thẳng, mặt phẳng.
void CKiemTra3DView:: OnKtraDiemMP() void CKiemTra3DView:: OnVeGiao2MP() void CKiemTra3DView:: OnKtraDiem_Duong() void CKiemTra3DView:: OnKtra2DThang() void CKiemTra3DView:: OnKtraDuong_MP() void CKiemTra3DView:: OnTinhGoc2MP()
void CKiemTra3DView:: OnTinhGocDuong_MP() void CKiemTra3DView:: OnTinhGoc2DT()
void CKiemTra3DView:: OnTinhKCDiem_Duong() void CKiemTra3DView:: OnTinhKC2Duong() void CKiemTra3DView:: OnTinhKC2MP() void CKiemTra3DView:: OnDiemDongPhang() void CKiemTra3DView:: Ve_Hai_MP()
Luận văn tốt nghiệp
void CKiemTra3DView:: On2MPhang() void CKiemTra3DView:: GT_hai_mp1() void CKiemTra3DView:: GT_hai_mp3()
void CKiemTra3DView:: OnVe_KC_Diem_MP() void CKiemTra3DView:: OnTinh_KC_Diem_MP() void CKiemTra3DView:: Ve_Diem_MP()
Các hàm thực hiện việc vẽ, demo các vật thể void CKiemTra3DView:: GLRenderScene() void CKiemTra3DView:: Cube()
void CKiemTra3DView:: HinhChop() void CKiemTra3DView:: Wireframchop() void CKiemTra3DView:: OnCube() void CKiemTra3DView:: Onscence() void CKiemTra3DView:: OnHinhchop()
void CkiemTra3Dview:: OnWireframWireframchop() Hàm thực hiện thao tác xố màn hình
void CKiemTra3DView:: OnClearScreen()
2- Những hàm được sử dụng trong lớp CkiemTra3Ddoc
CkiemTra3DDoc:: CkiemTra3DDoc() CkiemTra3DDoc:: ~ CkiemTra3DDoc() BOOL CkiemTra3DDoc:: OnNewDocument() void CkiemTra3DDoc:: Serialize(CArchive& ar)
PHẦN IV: HƯỚNG DẪN SỬ DỤNG CHƯƠNGPHẦN IV: HƯỚNG DẪN SỬ DỤNG CHƯƠNG PHẦN IV: HƯỚNG DẪN SỬ DỤNG CHƯƠNG (adsbygoogle = window.adsbygoogle || []).push({});
TRÌNHTRÌNH TRÌNH
Trong phần này, tơi sẽ đề cập cách sử dụng các thao tác của việc kiểm tra các quan hệ hình học trong phần 2D và 3D.