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

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "11_2ReadString"
  4.    ClientHeight    =   4935
  5.    ClientLeft      =   1140
  6.    ClientTop       =   1425
  7.    ClientWidth     =   5010
  8.    Height          =   5310
  9.    Left            =   1080
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   4935
  12.    ScaleWidth      =   5010
  13.    Top             =   1110
  14.    Width           =   5130
  15.    Begin VB.Label Label1 
  16.       Caption         =   "Example of creating a scene graph by reading from a string."
  17.       BeginProperty Font 
  18.          name            =   "MS Sans Serif"
  19.          charset         =   0
  20.          weight          =   700
  21.          size            =   12
  22.          underline       =   0   'False
  23.          italic          =   0   'False
  24.          strikethrough   =   0   'False
  25.       EndProperty
  26.       Height          =   735
  27.       Left            =   120
  28.       TabIndex        =   1
  29.       Top             =   120
  30.       Width           =   4695
  31.    End
  32.    Begin TgsVisual3SpaceLibCtl.V3Space V3Space1 
  33.       Height          =   3975
  34.       Left            =   120
  35.       TabIndex        =   0
  36.       Top             =   960
  37.       Width           =   4815
  38.       _Version        =   131072
  39.       _ExtentX        =   8493
  40.       _ExtentY        =   7011
  41.       _StockProps     =   0
  42.       decorationOn    =   0   'False
  43.    End
  44. Attribute VB_Name = "Form1"
  45. Attribute VB_Creatable = False
  46. Attribute VB_Exposed = False
  47. Private Sub Form_Initialize()
  48. 'static char *dodecahedron =
  49. Dim dodecahedron As String
  50. dodecahedron = "Separator {"
  51. dodecahedron = dodecahedron + "   Normal {"
  52. dodecahedron = dodecahedron + "      vector ["
  53. dodecahedron = dodecahedron + "         0.553341 0 0.832955, 0.832955 0.553341 0,"
  54. dodecahedron = dodecahedron + "         0.832955 -0.553341 0, 0 -0.832955 0.553341,"
  55. dodecahedron = dodecahedron + "         -0.553341 0 0.832955, 0 0.832955 0.553341,"
  56. dodecahedron = dodecahedron + "         0 0.832955 -0.553341, -0.832955 0.553341 0,"
  57. dodecahedron = dodecahedron + "         -0.832955 -0.553341 0, 0 -0.832955 -0.553341,"
  58. dodecahedron = dodecahedron + "         0.553341 0 -0.832955, -0.553341 0 -0.832955,"
  59. dodecahedron = dodecahedron + "      ]"
  60. dodecahedron = dodecahedron + "   }"
  61. dodecahedron = dodecahedron + "   NormalBinding { value PER_FACE }"
  62. dodecahedron = dodecahedron + "   Material {"
  63. dodecahedron = dodecahedron + "      diffuseColor ["
  64. dodecahedron = dodecahedron + "         1  0  0,   0 1  0,   0  0 1,   0  1  1,"
  65. dodecahedron = dodecahedron + "         1  0  1,  .5 1  0,  .5  0 1,  .5  1  1,"
  66. dodecahedron = dodecahedron + "         1 .3 .7,  .3 1 .7,  .3 .7 1,  .5 .5 .8"
  67. dodecahedron = dodecahedron + "      ]"
  68. dodecahedron = dodecahedron + "   }"
  69. dodecahedron = dodecahedron + "   MaterialBinding { value PER_FACE }"
  70. dodecahedron = dodecahedron + "   Coordinate3 {"
  71. dodecahedron = dodecahedron + "      point ["
  72. dodecahedron = dodecahedron + "         1.7265 0 0.618,    1 1 1,"
  73. dodecahedron = dodecahedron + "         0 0.618 1.7265,    0 -0.618 1.7265,"
  74. dodecahedron = dodecahedron + "         1 -1 1,    -1 -1 1,"
  75. dodecahedron = dodecahedron + "         -0.618 -1.7265 0,    0.618 -1.7265 0,"
  76. dodecahedron = dodecahedron + "         1 -1 -1,    1.7265 0 -0.618,"
  77. dodecahedron = dodecahedron + "         1 1 -1,    0.618 1.7265 0,"
  78. dodecahedron = dodecahedron + "         -0.618 1.7265 0,    -1 1 1,"
  79. dodecahedron = dodecahedron + "         -1.7265 0 0.618,    -1.7265 0 -0.618,"
  80. dodecahedron = dodecahedron + "         -1 -1 -1,    0 -0.618 -1.7265,"
  81. dodecahedron = dodecahedron + "         0 0.618 -1.7265,    -1 1 -1"
  82. dodecahedron = dodecahedron + "      ]"
  83. dodecahedron = dodecahedron + "   }"
  84. dodecahedron = dodecahedron + "   IndexedFaceSet {"
  85. dodecahedron = dodecahedron + "      coordIndex ["
  86. dodecahedron = dodecahedron + "         1, 2, 3, 4, 0, -1,  0, 9, 10, 11, 1, -1,"
  87. dodecahedron = dodecahedron + "         4, 7, 8, 9, 0, -1,  3, 5, 6, 7, 4, -1,"
  88. dodecahedron = dodecahedron + "         2, 13, 14, 5, 3, -1,  1, 11, 12, 13, 2, -1,"
  89. dodecahedron = dodecahedron + "         10, 18, 19, 12, 11, -1,  19, 15, 14, 13, 12, -1,"
  90. dodecahedron = dodecahedron + "         15, 16, 6, 5, 14, -1,  8, 7, 6, 16, 17, -1,"
  91. dodecahedron = dodecahedron + "         9, 8, 17, 18, 10, -1,  18, 17, 16, 15, 19, -1,"
  92. dodecahedron = dodecahedron + "      ]"
  93. dodecahedron = dodecahedron + "   }"
  94. dodecahedron = dodecahedron + "}"
  95. 'Read from the string.
  96. Dim myInput As SoInput
  97. Set myInput = New SoInput
  98. Call myInput.setBuffer(dodecahedron)
  99. Dim result As SoSeparator
  100. Set result = myInput.readAll()
  101. Call V3Space1.setSceneRoot(result)
  102. Call V3Space1.viewAll
  103. End Sub
  104.