home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "06_03Complex3DText"
- ClientHeight = 4890
- ClientLeft = 915
- ClientTop = 1230
- ClientWidth = 5730
- Height = 5265
- Left = 855
- LinkTopic = "Form1"
- ScaleHeight = 4890
- ScaleWidth = 5730
- Top = 915
- Width = 5850
- Begin TgsVisual3SpaceLibCtl.V3Space V3Space1
- Height = 4932
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 5772
- _Version = 131072
- _ExtentX = 10181
- _ExtentY = 8700
- _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 SoGroup
- Set root = New SoGroup
- 'Let's make the front of the text white,
- 'and the sides and back shiny yellow
- Dim myMaterial As SoMaterial
- Set myMaterial = New SoMaterial
- Call myMaterial.diffuseColor.set1RGBValue(0, 1, 1, 1)
- Call myMaterial.diffuseColor.set1RGBValue(1, 1, 1, 0)
- Call myMaterial.diffuseColor.set1RGBValue(2, 1, 1, 0)
- 'specular
- Call myMaterial.specularColor.setValue(1, 1, 1)
- Call myMaterial.shininess.setValue(0.1)
- Call root.addChild(myMaterial)
- 'Choose a font likely to exist.
- Dim myFont As SoFont
- Set myFont = New SoFont
- Call myFont.Name.setValue("Times New Roman;Regular")
- Call root.addChild(myFont)
- 'Specify a beveled cross-section for the text
- Dim myProfileCoords As SoProfileCoordinate2
- Set myProfileCoords = New SoProfileCoordinate2
- Call myProfileCoords.Point.set1Value(0#, 0#, 0#)
- Call myProfileCoords.Point.set1Value(1, 0.25, 0.25)
- Call myProfileCoords.Point.set1Value(2, 1.25, 0.25)
- Call myProfileCoords.Point.set1Value(3, 1.5, 0#)
- Call root.addChild(myProfileCoords)
- Dim myLinearProfile As SoLinearProfile
- Set myLinearProfile = New SoLinearProfile
- Call myLinearProfile.Index.set1Value(0, 0)
- Call myLinearProfile.Index.set1Value(1, 1)
- Call myLinearProfile.Index.set1Value(2, 2)
- Call myLinearProfile.Index.set1Value(3, 3)
- Call root.addChild(myLinearProfile)
- 'Set the material binding to PER_PART
- Dim myMaterialBinding As SoMaterialBinding
- Set myMaterialBinding = New SoMaterialBinding
- Call myMaterialBinding.Value.setValue(3) 'SoMaterialBinding::PER_PART)
- Call root.addChild(myMaterialBinding)
- 'Add the text
- Dim myText3 As SoText3
- Set myText3 = New SoText3
- Call myText3.Str.setValue("Beveled Text")
- Call myText3.justification.setValue(&H2&) 'SoText3::CENTER)
- Call myText3.parts.setValue(&H7&) 'SoText3::ALL);
- Call root.addChild(myText3)
- Call V3Space1.setSceneRoot(root)
- Call V3Space1.viewAll
- Set root = Nothing
- Set myMaterial = Nothing
- Set myFont = Nothing
- Set myProfileCoords = Nothing
- Set myLinearProfile = Nothing
- Set myMaterialBinding = Nothing
- Set myText3 = Nothing
- End Sub
-