opengl_qt_draw3D

Directory: OpenGL program
Plat: C/C++
Size: 302KB
Downloads: 213
Upload time: 2012-08-24 15:48:03
Uploader: wuwei
Description:   A closed perspective view of four-sided pyramid is constituted by 5 surface, wherein the side of vertex 4 is triangular, the bottom surface is a quadrangle. If we want to draw a 3D pyramid only need to draw the five faces can, the drawn and former article OpenGL_Qt study notes _03 (planar graph coloring and rotation). But here vertex coordinates of a three-dimensional, so the image depth that dimension is not necessarily 0. So we can be calculated in advance the good four-sided pyramid coordinates of each vertex should learn solid geometry, is a small case. Then you can draw each face. Opengl in draw each surface, all surface given vertex order must be in accordance with the counterclockwise or clockwise (I used counterclockwise), so as to ensure the drawn image. Now we start drawing in paintGL four pyramid NeHe tutorial, it just draws a pyramid and the bottom surface of only four sides, here, I adopt its methods, the code is as follows:

File list:
opengl_qt_nehe_04
.................\glwidget.cpp,5080,2012-08-24
.................\glwidget.h,530,2012-08-24
.................\glwidget.ui,447,2012-08-24
.................\main.cpp,183,2012-08-23
.................\opengl_qt_nehe_04.pro,135,2012-08-24
.................\opengl_qt_nehe_04.pro.user,17666,2012-08-24
OpenGL_Qt学习笔记之_04(3D图形的绘制和旋转).pdf,331815,2012-08-24

Download users:

Relate files:

Comment: Add Comment

Favorite users: