home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / Chip_1998-03_cd.bin / tema / TS3 / Caligari / pluSpack1 / primitiveitch / atf10.exe / PlugControl.ctl (.txt) next >
Encoding:
Visual Basic Form  |  1997-11-05  |  7.1 KB  |  223 lines

  1. VERSION 5.00
  2. Begin VB.UserControl FirstPlugControl 
  3.    ClientHeight    =   4635
  4.    ClientLeft      =   0
  5.    ClientTop       =   0
  6.    ClientWidth     =   3990
  7.    ScaleHeight     =   309
  8.    ScaleMode       =   3  'Pixel
  9.    ScaleWidth      =   266
  10.    Begin VB.CommandButton FetchButton 
  11.       Caption         =   "Fetch"
  12.       Height          =   375
  13.       Left            =   1200
  14.       TabIndex        =   0
  15.       Top             =   3960
  16.       Width           =   1575
  17.    End
  18.    Begin VB.Label Mat0Label 
  19.       AutoSize        =   -1  'True
  20.       Caption         =   "     "
  21.       Height          =   195
  22.       Left            =   1560
  23.       TabIndex        =   16
  24.       Top             =   2520
  25.       Width           =   225
  26.    End
  27.    Begin VB.Label Mat1Label 
  28.       AutoSize        =   -1  'True
  29.       Caption         =   "     "
  30.       Height          =   195
  31.       Left            =   1560
  32.       TabIndex        =   15
  33.       Top             =   2760
  34.       Width           =   225
  35.    End
  36.    Begin VB.Label Mat2Label 
  37.       AutoSize        =   -1  'True
  38.       Caption         =   "     "
  39.       Height          =   195
  40.       Left            =   1560
  41.       TabIndex        =   14
  42.       Top             =   3000
  43.       Width           =   225
  44.    End
  45.    Begin VB.Label Mat3Label 
  46.       AutoSize        =   -1  'True
  47.       Caption         =   "     "
  48.       Height          =   195
  49.       Left            =   1560
  50.       TabIndex        =   13
  51.       Top             =   3240
  52.       Width           =   225
  53.    End
  54.    Begin VB.Label MaxLabel 
  55.       AutoSize        =   -1  'True
  56.       Caption         =   "     "
  57.       Height          =   195
  58.       Left            =   1560
  59.       TabIndex        =   12
  60.       Top             =   2040
  61.       Width           =   225
  62.    End
  63.    Begin VB.Label MinLabel 
  64.       AutoSize        =   -1  'True
  65.       Caption         =   "     "
  66.       Height          =   195
  67.       Left            =   1560
  68.       TabIndex        =   11
  69.       Top             =   1800
  70.       Width           =   225
  71.    End
  72.    Begin VB.Label RotLabel 
  73.       AutoSize        =   -1  'True
  74.       Caption         =   "     "
  75.       Height          =   195
  76.       Left            =   1560
  77.       TabIndex        =   10
  78.       Top             =   1080
  79.       Width           =   225
  80.    End
  81.    Begin VB.Label SizeLabel 
  82.       AutoSize        =   -1  'True
  83.       Caption         =   "     "
  84.       Height          =   195
  85.       Left            =   1560
  86.       TabIndex        =   9
  87.       Top             =   840
  88.       Width           =   225
  89.    End
  90.    Begin VB.Label LocLabel 
  91.       AutoSize        =   -1  'True
  92.       Caption         =   "     "
  93.       Height          =   195
  94.       Left            =   1560
  95.       TabIndex        =   8
  96.       Top             =   600
  97.       Width           =   225
  98.    End
  99.    Begin VB.Label NameLabel 
  100.       AutoSize        =   -1  'True
  101.       Caption         =   "No Object"
  102.       Height          =   195
  103.       Left            =   1560
  104.       TabIndex        =   7
  105.       Top             =   240
  106.       Width           =   720
  107.    End
  108.    Begin VB.Label Label6 
  109.       Alignment       =   1  'Right Justify
  110.       Caption         =   "Matrix:"
  111.       Height          =   195
  112.       Left            =   720
  113.       TabIndex        =   6
  114.       Top             =   2280
  115.       Width           =   465
  116.    End
  117.    Begin VB.Label Label5 
  118.       Alignment       =   1  'Right Justify
  119.       Caption         =   "Bounding Box:"
  120.       Height          =   195
  121.       Left            =   120
  122.       TabIndex        =   5
  123.       Top             =   1560
  124.       Width           =   1080
  125.    End
  126.    Begin VB.Label Label4 
  127.       Alignment       =   1  'Right Justify
  128.       Caption         =   "Rotation"
  129.       Height          =   195
  130.       Left            =   240
  131.       TabIndex        =   4
  132.       Top             =   1080
  133.       Width           =   960
  134.    End
  135.    Begin VB.Label Label3 
  136.       Alignment       =   1  'Right Justify
  137.       Caption         =   "Size"
  138.       Height          =   195
  139.       Left            =   240
  140.       TabIndex        =   3
  141.       Top             =   840
  142.       Width           =   960
  143.    End
  144.    Begin VB.Image BitmapImage 
  145.       Height          =   480
  146.       Left            =   2760
  147.       Picture         =   "PlugControl.ctx":0000
  148.       Top             =   120
  149.       Visible         =   0   'False
  150.       Width           =   480
  151.    End
  152.    Begin VB.Label Label2 
  153.       Alignment       =   1  'Right Justify
  154.       Caption         =   "Location:"
  155.       Height          =   195
  156.       Left            =   240
  157.       TabIndex        =   2
  158.       Top             =   600
  159.       Width           =   960
  160.    End
  161.    Begin VB.Label Label 
  162.       Alignment       =   1  'Right Justify
  163.       Caption         =   "Object Name:"
  164.       Height          =   195
  165.       Left            =   240
  166.       TabIndex        =   1
  167.       Top             =   240
  168.       Width           =   960
  169.    End
  170. Attribute VB_Name = "FirstPlugControl"
  171. Attribute VB_GlobalNameSpace = False
  172. Attribute VB_Creatable = True
  173. Attribute VB_PredeclaredId = False
  174. Attribute VB_Exposed = True
  175. Implements TsControlPlug
  176. Private Property Get TsControlPlug_PlugBitmap() As Long
  177.     TsControlPlug_PlugBitmap = BitmapImage.Picture.Handle
  178. End Property
  179. Private Property Get TsControlPlug_PlugLeft() As Long
  180.     TsControlPlug_PlugLeft = -1
  181. End Property
  182. Private Property Get TsControlPlug_PlugTop() As Long
  183.     TsControlPlug_PlugTop = -1
  184. End Property
  185. Private Property Get TsControlPlug_PlugWidth() As Long
  186.     TsControlPlug_PlugWidth = ScaleWidth
  187. End Property
  188. Private Property Get TsControlPlug_PlugHeight() As Long
  189.     TsControlPlug_PlugHeight = ScaleHeight
  190. End Property
  191. Private Property Get TsControlPlug_PlugName() As String
  192.     TsControlPlug_PlugName = "First Plug Control"
  193. End Property
  194. Sub TsControlPlug_TsxLeftClick()
  195. End Sub
  196. Sub TsControlPlug_TsxRightClick()
  197. End Sub
  198. Private Sub FetchButton_Click()
  199.     obj = tsxGetCurrentSelection
  200.     If obj = 0 Then Exit Sub
  201.     If tsxIsGNode(obj) = False Then Exit Sub
  202.     Dim oName As String * 64
  203.     Call tsxGNodeGetName(obj, oName, 64)
  204.     NameLabel.Caption = oName
  205.     Dim v As CtsxVector3f
  206.     Call tsxGNodeGetLocation(obj, v)
  207.     LocLabel.Caption = v.x & ", " & v.y & ", " & v.z
  208.     Call tsxGNodeGetSize(obj, v)
  209.     SizeLabel.Caption = v.x & ", " & v.y & ", " & v.z
  210.     Call tsxGNodeGetRotation(obj, v)
  211.     RotLabel.Caption = v.x & ", " & v.y & ", " & v.z
  212.     Dim B As CtsxBBox3f
  213.     Call tsxGNodeGetBBox(obj, B)
  214.     MinLabel.Caption = B.minbounds.x & ", " & B.minbounds.y & ", " & B.minbounds.z
  215.     MaxLabel.Caption = B.maxbounds.x & ", " & B.maxbounds.y & ", " & B.maxbounds.z
  216.     Dim t As CtsxTxmx3f
  217.     Call tsxGNodeGetTransform(obj, t)
  218.     Mat0Label.Caption = t.matrix(0, 0) & ", " & t.matrix(0, 1) & ", " & t.matrix(0, 2)
  219.     Mat1Label.Caption = t.matrix(1, 0) & ", " & t.matrix(1, 1) & ", " & t.matrix(1, 2)
  220.     Mat2Label.Caption = t.matrix(2, 0) & ", " & t.matrix(2, 1) & ", " & t.matrix(2, 2)
  221.     Mat3Label.Caption = t.matrix(3, 0) & ", " & t.matrix(3, 1) & ", " & t.matrix(3, 2)
  222. End Sub
  223.