Navigation: Scripting Reference Manual > Functions & Subroutines > SetSourceDirM2Laser

 

SetSourceDirM2Laser

 

Contact Us: fredsupport@photonengr.com

 

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

Source Script Commands

IsSourceDirM2Laser

GetSourceDirM2Laser

InitSourceDirM2Laser

T_SOURCEDIRM2LASER

 

 

 

 

 

Copyright © Photon Engineering, LLC