Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports TV3D65
- Public Class Form1
- Public _engine As TVEngine
- Public inp As TVInputEngine
- Public numofmeshes As Integer = -1
- Public _scenemeshes() As TVMesh
- Public _scene As TVScene
- Public bdoloop As Boolean
- Public mesharry As ArrayList
- Private Function DataFile() As String
- Dim file_name As String = Application.StartupPath
- file_name &= "\scene\sconf.txt"
- Return file_name
- End Function
- Public Sub Getrmesh()
- Try
- Dim file_name As String = DataFile()
- Dim stream_reader As New IO.StreamReader(file_name)
- Dim line As String
- line = stream_reader.ReadLine()
- Do Until line = "END"
- line = line.Trim$()
- Dim phase As String = line
- Dim words() As String
- If line.StartsWith("_sceneMesh") Then
- words = phase.Split("=")
- numofmeshes += 1
- mesharry.Add(words(1).ToString)
- End If
- line = stream_reader.ReadLine()
- Loop
- stream_reader.Close()
- Catch ex As Exception
- MsgBox(ex.ToString)
- End Try
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- _engine = New TVEngine
- mesharry = New ArrayList
- _scene = New TVScene
- inp = New TVInputEngine
- _engine.SetDebugMode(True, True)
- _engine.SetDebugFile(System.IO.Path.GetDirectoryName(Application.ExecutablePath) + "\debugfile.txt")
- _engine.Init3DWindowed(PictureBox1.Handle, True)
- _engine.SetAngleSystem(CONST_TV_ANGLE.TV_ANGLE_DEGREE)
- Getrmesh()
- For i = 0 To numofmeshes
- _scenemeshes(i) = _scene.CreateMeshBuilder
- With _scenemeshes(i)
- .LoadTVM(Application.StartupPath + "\scene\" + mesharry(i) + ".Smm")
- End With
- Next
- inp.Initialize(True, True)
- bdoloop = True
- Do While bdoloop
- _engine.Clear(False)
- _scene.RenderAll(True)
- _engine.RenderToScreen()
- Loop
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement