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

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "06_01 Text"
  4.    ClientHeight    =   4335
  5.    ClientLeft      =   915
  6.    ClientTop       =   1230
  7.    ClientWidth     =   5295
  8.    Height          =   4710
  9.    Left            =   855
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4335
  12.    ScaleWidth      =   5295
  13.    Top             =   915
  14.    Width           =   5415
  15.    Begin TgsVisual3SpaceLibCtl.V3Space V3Space1 
  16.       Height          =   4332
  17.       Left            =   0
  18.       TabIndex        =   0
  19.       Top             =   0
  20.       Width           =   5292
  21.       _Version        =   131072
  22.       _ExtentX        =   9335
  23.       _ExtentY        =   7641
  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.     Dim root As SoGroup
  31.     Set root = New SoGroup
  32.     'Choose a font
  33.     Dim myFont As SoFont
  34.     Set myFont = New SoFont
  35.     Call myFont.Name.setValue("Times New Roman;Regular")
  36.     Call myFont.Size.setValue(24#)
  37.     Call root.addChild(myFont)
  38.     'Add the globe, a sphere with a texture map.
  39.     'Put it within a separator.
  40.     Dim sphereSep As SoSeparator
  41.     Set sphereSep = New SoSeparator
  42.     Dim myTexture2 As SoTexture2
  43.     Set myTexture2 = New SoTexture2
  44.     Dim sphereComplexity As SoComplexity
  45.     Set sphereComplexity = New SoComplexity
  46.     Call sphereComplexity.Value.setValue(0.55)
  47.     Call root.addChild(sphereSep)
  48.     Call sphereSep.addChild(myTexture2)
  49.     Call sphereSep.addChild(sphereComplexity)
  50.     Dim mySphere As SoSphere
  51.     Set mySphere = New SoSphere
  52.     Call sphereSep.addChild(mySphere)
  53.     Call myTexture2.filename.setValue(V3Space1.getRegistryDataPath() + "\examples\data\globe.rgb")
  54.     'Add Text2 for AFRICA, translated to proper location.
  55.     Dim africaSep As SoSeparator
  56.     Set africaSep = New SoSeparator
  57.     Dim africaTranslate As SoTranslation
  58.     Set africaTranslate = New SoTranslation
  59.     Dim africaText As SoText2
  60.     Set africaText = New SoText2
  61.     Call africaTranslate.translation.setValue(0.25, 0#, 1.25)
  62.     Call africaText.Str.setValue("AFRICA")
  63.     Call root.addChild(africaSep)
  64.     Call africaSep.addChild(africaTranslate)
  65.     Call africaSep.addChild(africaText)
  66.     'Add Text2 for ASIA, translated to proper location.
  67.     Dim asiaSep As SoSeparator
  68.     Set asiaSep = New SoSeparator
  69.     Dim asiaTranslate As SoTranslation
  70.     Set asiaTranslate = New SoTranslation
  71.     Dim asiaText As SoText2
  72.     Set asiaText = New SoText2
  73.     Call asiaTranslate.translation.setValue(0.8, 0.8, 0)
  74.     Call asiaText.Str.setValue("ASIA")
  75.     Call root.addChild(asiaSep)
  76.     Call asiaSep.addChild(asiaTranslate)
  77.     Call asiaSep.addChild(asiaText)
  78.     Call V3Space1.setSceneRoot(root)
  79.     Call V3Space1.viewAll
  80.     'Clean up
  81.     Set myFont = Nothing
  82.     Set sphereSep = Nothing
  83.     Set sphereComplexity = Nothing
  84.     Set mySphere = Nothing
  85.     Set myTexture2 = Nothing
  86.     Set africaSep = Nothing
  87.     Set africaText = Nothing
  88.     Set africaTranslate = Nothing
  89.     Set asiaTranslate = Nothing
  90.     Set asiaText = Nothing
  91.     Set asiaSep = Nothing
  92.     Set root = Nothing
  93.     Set sceneRoot = Nothing
  94. End Sub
  95.