Navigation: Scripting Reference Manual > Functions & Subroutines > IsSourceDirM2Laser

 

IsSourceDirM2Laser

 

Contact Us: fredsupport@photonengr.com

 

Description

This function queries a source node and returns a boolean indicating whether the ray direction specification is of the type, "M Squared Laser Beam".

 

Syntax

flag = IsSourceDirM2Laser( srcNode )

 

Parameters

flag (Boolean)

Returned boolean flag indicating whether the source has ray directions type "M Squared Laser Beam".  Returns False if ray directions are not of this type.

 

srcNode As Long

Node number of the source whose ray directions type is being queried.

 

 

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

SetSourceDirM2Laser

GetSourceDirM2Laser

InitSourceDirM2Laser

T_SOURCEDIRM2LASER

 

 

 

 

 

Copyright © Photon Engineering, LLC