home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / ACTIVEX / VIS3SPAC / DATA.9 / examples / vb / 02_02EngineSpin / 02_02EngineSpin.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-11-13  |  1.8 KB  |  57 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "02_02 Engine Spin"
  4.    ClientHeight    =   4620
  5.    ClientLeft      =   915
  6.    ClientTop       =   1230
  7.    ClientWidth     =   5820
  8.    Height          =   4995
  9.    Left            =   855
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4620
  12.    ScaleWidth      =   5820
  13.    Top             =   915
  14.    Width           =   5940
  15.    Begin TgsVisual3SpaceLibCtl.V3Space V3Space1 
  16.       Height          =   4575
  17.       Left            =   0
  18.       TabIndex        =   0
  19.       Top             =   0
  20.       Width           =   5775
  21.       _Version        =   131072
  22.       _ExtentX        =   10186
  23.       _ExtentY        =   8070
  24.       _StockProps     =   0
  25.    End
  26. Attribute VB_Name = "Form1"
  27. Attribute VB_Creatable = False
  28. Attribute VB_Exposed = False
  29. Private Sub Form_Initialize()
  30.     Call V3Space1.deleteSceneGraph
  31.     Dim root As SoSeparator
  32.     Dim myRotXYZ As SoRotationXYZ
  33.     Set root = New SoSeparator
  34.     Set myRotXYZ = New SoRotationXYZ
  35.     'VB doesn't support OLE Types ???
  36.     Call myRotXYZ.axis.setValue(0)
  37.     Call root.addChild(myRotXYZ)
  38.     Dim myMaterial As SoMaterial
  39.     Dim color As SbVec3f
  40.     Set myMaterial = New SoMaterial
  41.     Set color = New SbVec3f
  42.     Call color.setValue(1#, 0#, 0#)
  43.     Call myMaterial.diffuseColor.setValueColor(color)
  44.     Call root.addChild(myMaterial)
  45.     Dim myCone As SoCone
  46.     Set myCone = New SoCone
  47.     Call root.addChild(myCone)
  48.     Dim myCounter As SoElapsedTime
  49.     Dim engineOut As SoEngineOutput
  50.     Set myCounter = New SoElapsedTime
  51.     Set engineOut = myCounter.timeout
  52.     Call myRotXYZ.angle.connectFromEngine(engineOut)
  53.     Call V3Space1.setSceneRoot(root)
  54.     Call V3Space1.setDecorations(False)
  55.     Call V3Space1.viewAll
  56. End Sub
  57.