Description This function adds a new Acceptance Filter region to a source node and returns the index number of the Acceptance Filter that was added.
Syntax nFilt = AddSrcAcceptanceRegion( srcNode, tFilt )
Parameters nFilt (Long) Returned index number of the Acceptance Filter region that was added.
srcNode As Long Node number of the source that is being modified.
tFilt As T_ACCEPTANCE_FILTER Data structure that has been initialized with values defining the Acceptance Filter region that is being added to the source.
Example The example below shows how to prepare a T_ACCEPTANCE_FILTER data structure and then use the structure to add a new Acceptance Filter region to an existing source. Sub Main
'Source we want to modify Dim srcNode As Long srcNode = FindFullName( "Optical Sources.Source 1" )
'Define the Acceptance Filter Dim tFilt As T_ACCEPTANCE_FILTER tFilt.isActive = True tFilt.isRender = True tFilt.acceptType = "inside" tFilt.shape = "rectangle" tFilt.semiApeX = 2.5 tFilt.semiApeY = 5.0 tFilt.centerX0 = 0.0 tFilt.centerY0 = 5.0 tFilt.centerZ0 = 15.0 tFilt.rotAngleX = 45 tFilt.rotAngleY = 15.0 tFilt.rotAngleZ = 45.0 tFilt.coordSysNode = FindFullName( "Geometry.Plane.Surface" )
'Add the acceptance filter Dim nFilt As Long nFilt = AddSrcAcceptanceRegion( srcNode, tFilt )
'Update the model Update
End Sub
See Also Sources Acceptance Filter Script Commands
|