Description This command retrieves all ray selection criteria (ray filters) from an analysis surface and stores them in an array of T_RAYFILTEROP data structures.
Syntax filterCount = GetRayFilter( anaNode, tRayFilterOp() )
Parameters filterCount (Long) Returned number of ray selection criteria retrieved from the designated analysis surface node.
anaNode As Long Node number of the analysis surface whose ray filters are being retrieved.
tRayFilterOp() As T_RAYFILTEROP Array of T_RAYFILTEROP data structures retrieved from anaNode. The maximum index into the tRayFilterOp array is filterCount-1.
Example The following example retrieves the ray filter set from an analysis surface, prints out the number of filters retrieved and their specifications and then applies the filters to rays in the active buffer.
Sub Main
ClearOutputWindow
'Analysis surface whose ray filter set is being retrieved Dim anaNode As Long anaNode = FindFullName( "Analysis Surface(s).DetectorAnalysis" )
'Retrieve the set of ray filters Dim tRayFilterOp() As T_RAYFILTEROP Dim filterCount As Long filterCount = GetRayFilter( anaNode, tRayFilterOp() ) Print filterCount & " ray filters retrieved. "
'Print out ray filter information Dim curFilterOp As Long For curFilterOp = 0 To filterCount-1 Print "Filter " & curFilterOp & ":" Print Chr(9) & "Operation code: " & Chr(9) & tRayFilterOp( curFilterOp ).opCode Print Chr(9) & "Datum: " & Chr(9) & tRayFilterOp( curFilterOp ).datum Print Chr(9) & "Combine code: " & Chr(9) & tRayFilterOp( curFilterOp ).combineCode Next curFilterOp
'Apply filters to existing rays in buffer Dim rayCnt As Long rayCnt = ApplyFilterToRays( tRayFilterOp() ) Print rayCnt & " rays deactivated."
End Sub
See Also
|