Navigation: Scripting Reference Manual > Functions & Subroutines > GetSourceDirM2Laser

 

GetSourceDirM2Laser

 

Contact Us: fredsupport@photonengr.com

 

Description

This subroutine retrieves the ray direction specification from a detailed source with ray direction type "M Squared Laser Beam".

 

Syntax

GetSourceDirM2Laser srcNode, tM2

 

Parameters

srcNode As Long

Node number of the detailed source whose ray directions specification is being retrieved.

 

tM2 As T_SOURCEDIRM2LASER

Data structure whose members will be populated with the parameters from the source's 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

SetSourceDirM2Laser

InitSourceDirM2Laser

T_SOURCEDIRM2LASER

 

 

 

 

 

Copyright © Photon Engineering, LLC