⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmstereoparameters.frm

📁 三维低龄浏览的-0
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frmStereoParameters 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "3D Stereo Parameters"
   ClientHeight    =   1050
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   2670
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1050
   ScaleWidth      =   2670
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame frameEyeSep 
      Height          =   975
      Left            =   80
      TabIndex        =   0
      Top             =   5
      Width           =   2535
      Begin MSComCtl2.UpDown UpDown_Parallax 
         Height          =   285
         Left            =   2161
         TabIndex        =   6
         Top             =   600
         Width           =   255
         _ExtentX        =   450
         _ExtentY        =   503
         _Version        =   393216
         Value           =   1
         BuddyControl    =   "txtParallax"
         BuddyDispid     =   196611
         OrigLeft        =   2400
         OrigTop         =   600
         OrigRight       =   2655
         OrigBottom      =   855
         Enabled         =   -1  'True
      End
      Begin MSComCtl2.UpDown UpDown_EyeSeparation 
         Height          =   285
         Left            =   2161
         TabIndex        =   5
         Top             =   240
         Width           =   255
         _ExtentX        =   450
         _ExtentY        =   503
         _Version        =   393216
         BuddyControl    =   "txtEyeSeparation"
         BuddyDispid     =   196612
         OrigLeft        =   2400
         OrigTop         =   240
         OrigRight       =   2655
         OrigBottom      =   520
         Enabled         =   -1  'True
      End
      Begin VB.TextBox txtParallax 
         Height          =   285
         Left            =   1320
         TabIndex        =   3
         Text            =   "0"
         Top             =   600
         Width           =   840
      End
      Begin VB.TextBox txtEyeSeparation 
         Height          =   285
         Left            =   1320
         TabIndex        =   1
         Text            =   "2"
         Top             =   240
         Width           =   840
      End
      Begin VB.Label Label2 
         Caption         =   "Parallax:"
         Height          =   255
         Left            =   610
         TabIndex        =   4
         Top             =   620
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "Eye Separation:"
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   270
         Width           =   1215
      End
   End
End
Attribute VB_Name = "frmStereoParameters"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

' Copyright 1995-2004 ESRI

' All rights reserved under the copyright laws of the United States.

' You may freely redistribute and use this sample code, with or without modification.

' Disclaimer: THE SAMPLE CODE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 
' WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
' FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESRI OR 
' CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 
' OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
' SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
' INTERRUPTION) SUSTAINED BY YOU OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY 
' THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY 
' WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF 
' SUCH DAMAGE.

' For additional information contact: Environmental Systems Research Institute, Inc.

' Attn: Contracts Dept.

' 380 New York Street

' Redlands, California, U.S.A. 92373 

' Email: contracts@esri.com

Option Explicit

Public pEyeSep As Double
Public pParralax As Double

Private Sub Form_Load()
  If pEyeSep = 0 Then
    txtEyeSeparation.Text = 2
  Else
    txtEyeSeparation.Text = pEyeSep
  End If
  
  If pParralax = 0 Then
    txtParallax.Text = 0
  Else
    txtParallax.Text = pParralax
  End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
  pEyeSep = txtEyeSeparation.Text
  pParralax = txtParallax.Text
End Sub

Private Sub txtEyeSeparation_Change()
On Error GoTo ErrorHandler:
  If txtEyeSeparation.Text = "" Or txtEyeSeparation.Text = " " Then
    MsgBox "Enter a non-zero value"
  End If
  
  pStereoCamera.EyeSeparation = frmStereoParameters.txtEyeSeparation.Text
  pSG.RefreshViewers
  Exit Sub
ErrorHandler:
  txtEyeSeparation.Text = "2"
End Sub

Private Sub txtParallax_Change()
On Error GoTo ErrorHandler:
  If txtParallax.Text = "" Or txtParallax.Text = " " Then
    MsgBox "Enter a non-zero value"
  End If
  
  pStereoCamera.Parallax = frmStereoParameters.txtParallax.Text
  pSG.RefreshViewers
  Exit Sub
ErrorHandler:
  txtParallax.Text = "0"
End Sub

Private Sub UpDown_EyeSeparation_DownClick()
  frmStereoParameters.txtEyeSeparation.Text = frmStereoParameters.txtEyeSeparation.Text - ((frmStereoParameters.txtEyeSeparation.Text * frmStereoParameters.txtEyeSeparation.Text) / 100)
End Sub

Private Sub UpDown_EyeSeparation_UpClick()
  frmStereoParameters.txtEyeSeparation.Text = frmStereoParameters.txtEyeSeparation.Text + ((frmStereoParameters.txtEyeSeparation.Text * frmStereoParameters.txtEyeSeparation.Text) / 100)
End Sub

Private Sub UpDown_Parallax_DownClick()
  frmStereoParameters.txtParallax.Text = frmStereoParameters.txtParallax.Text - ((frmStereoParameters.txtEyeSeparation.Text * frmStereoParameters.txtEyeSeparation.Text) / 100)
End Sub

Private Sub UpDown_Parallax_UpClick()
  frmStereoParameters.txtParallax.Text = frmStereoParameters.txtParallax.Text + ((frmStereoParameters.txtEyeSeparation.Text * frmStereoParameters.txtEyeSeparation.Text) / 100)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -