Description For a source node with ray direction type, "Multiple source positions", this subroutine inserts a position specification at the specified index. The index value is 0-based.
Syntax InsertSourceDirIthMultiPos( src, idx, xPos, yPos, zPos, bActive )
Parameters src As Long Node number of the source being modified.
idx As Long The new position specification will be inserted into the current multi-position list at the index value given by idx. The index value is 0-based and valid values range from 0 to n+1, where n is the index of the last specification in the current list.
xPos As Double X position in the source node's coordinate system.
yPos As Double Y position in the source node's coordinate system.
zPos As Double Z position in the source node's coordinate system. If z is a positive value, the emitted rays will propagate in the -z direction relative to the source coordinate system.
bActive As Boolean Indicates whether the inserted position specification is active or inactive. When inactive, no rays will be generated for the current specification.
Example The example below shows how to insert a multi-position specification at index 10 of an existing source.
Sub Main
'Source node being modified Dim src As Long src = FindFullName( "Optical Sources.Multi Pos Source" )
'Insert a new position specification Dim idx As Long idx = 10 InsertSourceDirIthMultiPos( src, idx, 15, -15, -10, True )
Update
End Sub
See Also
|