Python_2  1.0
Functions | Variables
Lesson48 Namespace Reference

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
 

Detailed Description

Draw function for Lesson 48.

http://pydoc.net/Python/PyOpenGL-Demo/3.0.1b1/PyOpenGL-Demo.NeHe.lesson48.Lesson48/

Function Documentation

◆ Draw()

def Lesson48.Draw ( )

References Torus().

◆ Initialize()

def Lesson48.Initialize (   Width,
  Height 
)

Referenced by NeHeGL.main().

◆ Torus()

def Lesson48.Torus (   MinorRadius,
  MajorRadius 
)

Referenced by Draw().

◆ Upon_Click()

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().

◆ Upon_Drag()

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().

Variable Documentation

◆ g_ArcBall

Lesson48.g_ArcBall = ArcBallT(640, 480)

◆ g_isDragging

bool Lesson48.g_isDragging = False

◆ g_LastRot

Lesson48.g_LastRot = Matrix3fT()

◆ g_quadratic

Lesson48.g_quadratic = None

◆ g_ThisRot

Lesson48.g_ThisRot = Matrix3fT()

◆ g_Transform

Lesson48.g_Transform = Matrix4fT()

◆ PI2

float Lesson48.PI2 = 2.0 * 3.1415926535