Description This subroutine initializes the members of a T_ACCEPTANCE_FILTER data structure to default values. Each member is initialized to the values shown in the table below:
Syntax nReg = InitAcceptanceFilter( tFilter )
Parameters nReg (Long) Return value indicating the index at which the acceptance region was added.
tFilter As T_ACCEPTANCE_FILTER This argument is the data structure variable whose members are being initialized.
Example The example below shows how to initialize a new acceptance region data structure, add it to an existing source node and then report the index at which the region was added. Sub Main
Dim src As Long src = FindFullName( "Optical Sources.New Source" )
Dim tFilter As T_ACCEPTANCE_FILTER InitAcceptanceFilter( tFilter ) Print "Active?" & Chr(9) & tFilter.isActive Print "CoordSys:" & Chr(9) & tFilter.coordSysNode Print "Render?" & Chr(9) & tFilter.isRender Print "Shape:" & Chr(9) & tFilter.shape Print "Type:" & Chr(9) & tFilter.acceptType Print "X_Cen:" & Chr(9) & tFilter.centerX0 Print "Y_Cen:" & Chr(9) & tFilter.centerY0 Print "Z_Cen:" & Chr(9) & tFilter.centerZ0 Print "RotX:" & Chr(9) & tFilter.rotAngleX Print "RotY:" & Chr(9) & tFilter.rotAngleY Print "RotZ:" & Chr(9) & tFilter.rotAngleZ Print "SemiX:" & Chr(9) & tFilter.semiApeX Print "SemiY:" & Chr(9) & tFilter.semiApeY
Dim nReg As Long nReg = AddSrcAcceptanceRegion( src, tFilter ) Print "New acceptance region added at index " & nReg
End Sub
See Also Sources Acceptance Filter Script Commands
|