Description This subroutine sets the ray direction specification for a detailed source with ray direction type "M Squared Laser Beam".
Syntax SetSourceDirM2Laser srcNode, tM2
Parameters srcNode As Long Node number of the source whose ray directions specification is being modified.
tM2 As T_SOURCEDIRM2LASER Data structure containing the parameters for the ray direction specification.
Example The following example queries a source for its ray directions type and then gets, modifies and resets the M2 Laser Beam specification.
Sub Main
Dim srcNode As Long srcNode = FindFullName( "Optical Sources.Source 1" )
Dim tM2 As T_SOURCEDIRM2LASER InitSourceDirM2Laser( tM2 ) If IsSourceDirM2Laser( srcNode ) Then GetSourceDirM2Laser( srcNode, tM2 ) tM2.M2x = 2.1 tM2.M2y = 2.1 SetSourceDirM2Laser( srcNode, tM2 ) End If
End Sub
See Also
|