home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "06_01 Text"
- ClientHeight = 4335
- ClientLeft = 915
- ClientTop = 1230
- ClientWidth = 5295
- Height = 4710
- Left = 855
- LinkTopic = "Form1"
- ScaleHeight = 4335
- ScaleWidth = 5295
- Top = 915
- Width = 5415
- Begin TgsVisual3SpaceLibCtl.V3Space V3Space1
- Height = 4332
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 5292
- _Version = 131072
- _ExtentX = 9335
- _ExtentY = 7641
- _StockProps = 0
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub Form_Initialize()
- Dim root As SoGroup
- Set root = New SoGroup
- 'Choose a font
- Dim myFont As SoFont
- Set myFont = New SoFont
- Call myFont.Name.setValue("Times New Roman;Regular")
- Call myFont.Size.setValue(24#)
- Call root.addChild(myFont)
- 'Add the globe, a sphere with a texture map.
- 'Put it within a separator.
- Dim sphereSep As SoSeparator
- Set sphereSep = New SoSeparator
- Dim myTexture2 As SoTexture2
- Set myTexture2 = New SoTexture2
- Dim sphereComplexity As SoComplexity
- Set sphereComplexity = New SoComplexity
- Call sphereComplexity.Value.setValue(0.55)
- Call root.addChild(sphereSep)
- Call sphereSep.addChild(myTexture2)
- Call sphereSep.addChild(sphereComplexity)
- Dim mySphere As SoSphere
- Set mySphere = New SoSphere
- Call sphereSep.addChild(mySphere)
- Call myTexture2.filename.setValue(V3Space1.getRegistryDataPath() + "\examples\data\globe.rgb")
- 'Add Text2 for AFRICA, translated to proper location.
- Dim africaSep As SoSeparator
- Set africaSep = New SoSeparator
- Dim africaTranslate As SoTranslation
- Set africaTranslate = New SoTranslation
- Dim africaText As SoText2
- Set africaText = New SoText2
- Call africaTranslate.translation.setValue(0.25, 0#, 1.25)
- Call africaText.Str.setValue("AFRICA")
- Call root.addChild(africaSep)
- Call africaSep.addChild(africaTranslate)
- Call africaSep.addChild(africaText)
- 'Add Text2 for ASIA, translated to proper location.
- Dim asiaSep As SoSeparator
- Set asiaSep = New SoSeparator
- Dim asiaTranslate As SoTranslation
- Set asiaTranslate = New SoTranslation
- Dim asiaText As SoText2
- Set asiaText = New SoText2
- Call asiaTranslate.translation.setValue(0.8, 0.8, 0)
- Call asiaText.Str.setValue("ASIA")
- Call root.addChild(asiaSep)
- Call asiaSep.addChild(asiaTranslate)
- Call asiaSep.addChild(asiaText)
- Call V3Space1.setSceneRoot(root)
- Call V3Space1.viewAll
- 'Clean up
- Set myFont = Nothing
- Set sphereSep = Nothing
- Set sphereComplexity = Nothing
- Set mySphere = Nothing
- Set myTexture2 = Nothing
- Set africaSep = Nothing
- Set africaText = Nothing
- Set africaTranslate = Nothing
- Set asiaTranslate = Nothing
- Set asiaText = Nothing
- Set asiaSep = Nothing
- Set root = Nothing
- Set sceneRoot = Nothing
- End Sub
-