, Visual C#


- 2


Designing(DirectCast(PictureBox1.Image, Bitmap))

End Sub

(, ) , Class Name (Overrides), Method Name ProcessCmdKey. Form1.vb ( ProcessCmdKey), . , VS, , ProcessCmdKey, ( ).

34.2. ProcessCmdKey.

Protected Overrides Function ProcessCmdKey( _

ByRef msg As System.Windows.Forms.Message, _

ByVal keyData As System.Windows.Forms.Keys) As Boolean

' :

Const delta_theta As Single = pi / 20

Select Case keyData

Case System.Windows.Forms.Keys.Left

theta_Eye = theta_Eye - delta_theta

Case System.Windows.Forms.Keys.Right

theta_Eye = theta_Eye + delta_theta

Case System.Windows.Forms.Keys.Up

phi_Eye = phi_Eye - delta_theta

Case System.Windows.Forms.Keys.Down

phi_Eye = phi_Eye + delta_theta

Case Else

Return MyBase.ProcessCmdKey(msg, keyData)

End Select

Projection(MatrixProjection, PerspectiveProjection, _

r_Eye, phi_Eye, theta_Eye, _

x_focus, y_focus, z_focus, 0, 1, 0)

' PictureBox1 :

Designing(DirectCast(PictureBox1.Image, Bitmap))

PictureBox1.Refresh()

Return True

End Function

.

34.3. .

' DrawSolid

' CheckBox :

Private Sub Designing(ByVal bmp As Bitmap)




- -  - -  - -