opengl笔记——OpenGL好资料备忘
Plane Equation
注:面可理解为:连接面上的点与原点,投影相同(为:a*x1+b*x2+c*x3)
OpenGL Matrix Class (C++)
Overview
OpenGL fixed pipeline provides 4 different types of matrices (GL_MODELVIEW, GL_PROJECTION, GL_TEXTURE and GL_COLOR) and transformation routines for these matrices;glLoadIdentity(),glTranslatef(),glRotatef(),glScalef(),glMultMatrixf(),glFrustum() andglOrtho().
These built-in matrices and routines are useful to develop simple OpenGL applications and to understand the matrix transformation. But once your application is getting complecated, it is better to manage your own matrix implementations by yourself for all movable objects. Furthermore, you cannot use these built-in matrix functions anymore in OpenGL programmable pipeline (GLSL) such as OpenGL v3.0+, OpenGL ES v2.0+ and WebGL v1.0+. You must have your own marix implementations then pass the matrix data to OpenGL shaders.
This article provides a stand-alone, general purpose 4x4 matrix class, Matrix4 written in C++, and describes how to integrate this matrix class to the OpenGL applications. This matrix class is only dependent on the sister classes;Vector3 andVector4 definedVectors.h. These vector classes are also included inmatrix.zip.
注意:给出glRotate, glFrustum, glPerspective 等,等价的矩阵变换模式
OpenGL Transformation
OpenGL Normal Vector Transformation
OpenGL:Tutorials:Using Quaternions to represent rotation
在飞行动力学中,roll, pitch 和 yaw 角通常分别采用符号,, 和;但是为了避免混淆于欧拉角这里使用符号, 和。
任何 3 维旋转矩阵 都可以用这三个角,, 和 来刻画,并且可以表示为 roll, pitch 和 yaw 矩阵的乘积。
Tutorial 17 : Rotations
OpenGL:Tutorials:Picking