home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "13_2 Elapsed Time"
- ClientHeight = 4485
- ClientLeft = 1140
- ClientTop = 1425
- ClientWidth = 8070
- Height = 4860
- Left = 1080
- LinkTopic = "Form1"
- ScaleHeight = 4485
- ScaleWidth = 8070
- Top = 1110
- Width = 8190
- Begin VB.Label Label1
- Caption = $"13_2ElapsedTime.frx":0000
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 12
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 120
- TabIndex = 1
- Top = 120
- Width = 7935
- End
- Begin TgsVisual3SpaceLibCtl.V3Space V3Space1
- Height = 3495
- Left = 0
- TabIndex = 0
- Top = 960
- Width = 8055
- _Version = 131072
- _ExtentX = 14208
- _ExtentY = 6165
- _StockProps = 0
- decorationOn = 0 'False
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub Form_Initialize()
- Dim root As SoSeparator
- Set root = New SoSeparator
- 'Set up transformations
- Dim slideTranslation As SoTranslation
- Set slideTranslation = New SoTranslation
- Call root.addChild(slideTranslation)
- Dim initialTransform As SoTransform
- Set initialTransform = New SoTransform
- Call initialTransform.translation.setValue(-17#, 0#, 0#)
- Call initialTransform.scaleFactor.setValue(10#, 10#, 10#)
- Dim vec3f As SbVec3f
- Set vec3f = New SbVec3f
- Call vec3f.setValue(1#, 0#, 0#)
- Dim rot As SbRotation
- Set rot = New SbRotation
- Call rot.setValue(vec3f, (3.1415 / 2#))
- Call initialTransform.rotation.setValue(rot)
- Call root.addChild(initialTransform)
- Dim myInput As SoInput
- Set myInput = New SoInput
- Dim idisp As Object
- Set idisp = V3Space1.GetIDispatch
- Dim figureObject As Object
- Set figureObject = myInput.readAllUrl(V3Space1.getRegistryDataPath() + "\examples\data\jumpyMan.iv", idisp)
- If figureObject Is Nothing Then
- GoTo cleanup
- End If
- Call root.addChild(figureObject)
- Dim myCamera As Object
- Set myCamera = V3Space1.getCurrentCamera()
- Call myCamera.position.setValue(-2#, -2#, 20#)
- Call V3Space1.setSceneRoot(root)
- 'Make the X translation value change over time.
- Dim myCounter As SoElapsedTime
- Set myCounter = New SoElapsedTime
- Dim slideDistance As SoComposeVec3f
- Set slideDistance = New SoComposeVec3f
-
- Call slideDistance.X.connectFromEngine(myCounter.timeout)
- Call slideTranslation.translation.connectFromEngine(slideDistance.vector)
- cleanup:
- Set root = Nothing
- Set myCamera = Nothing
- Set slideTranslation = Nothing
- Set initialTransform = Nothing
- Set vec3f = Nothing
- Set rot = Nothing
- Set myInput = Nothing
- Set figureObject = Nothing
- Set myCounter = Nothing
- Set slideDistance = Nothing
- End Sub
-