![]() |
Python_2
1.0
|
Draw function for Lesson 48. More...
Functions | |
def | Initialize (Width, Height) |
def | Upon_Drag (cursor_x, cursor_y) |
def | Upon_Click (button, button_state, cursor_x, cursor_y) |
def | Torus (MinorRadius, MajorRadius) |
def | Draw () |
Variables | |
float | PI2 = 2.0 * 3.1415926535 |
g_Transform = Matrix4fT() | |
g_LastRot = Matrix3fT() | |
g_ThisRot = Matrix3fT() | |
g_ArcBall = ArcBallT(640, 480) | |
bool | g_isDragging = False |
g_quadratic = None | |
Draw function for Lesson 48.
http://pydoc.net/Python/PyOpenGL-Demo/3.0.1b1/PyOpenGL-Demo.NeHe.lesson48.Lesson48/
def Lesson48.Draw | ( | ) |
References Torus().
def Lesson48.Initialize | ( | Width, | |
Height | |||
) |
Referenced by NeHeGL.main().
def Lesson48.Torus | ( | MinorRadius, | |
MajorRadius | |||
) |
Referenced by Draw().
def Lesson48.Upon_Click | ( | button, | |
button_state, | |||
cursor_x, | |||
cursor_y | |||
) |
Mouse button clicked. Glut calls this function when a mouse button is clicked or released.
References ArcBall.Matrix3fSetIdentity(), ArcBall.Matrix4fSetRotationFromMatrix3f(), and ArcBall.Point2fT().
def Lesson48.Upon_Drag | ( | cursor_x, | |
cursor_y | |||
) |
Mouse cursor is moving Glut calls this function (when mouse button is down) and pases the mouse cursor postion in window coords as the mouse moves.
References ArcBall.Matrix3fMulMatrix3f(), ArcBall.Matrix3fSetRotationFromQuat4f(), ArcBall.Matrix4fSetRotationFromMatrix3f(), and ArcBall.Point2fT().
Lesson48.g_ArcBall = ArcBallT(640, 480) |
bool Lesson48.g_isDragging = False |
Lesson48.g_LastRot = Matrix3fT() |
Lesson48.g_quadratic = None |
Lesson48.g_ThisRot = Matrix3fT() |
Lesson48.g_Transform = Matrix4fT() |
float Lesson48.PI2 = 2.0 * 3.1415926535 |