Navigation: Scripting Reference Manual > Functions & Subroutines > InitSourceDirM2Laser

 

InitSourceDirM2Laser

 

Contact Us: fredsupport@photonengr.com

 

Description

This initializes a data structure of type T_SOURCEDIRM2LASER for use with a detailed source having ray direction type "M Squared Laser Beam".

 

Syntax

InitSourceDirM2Laser tM2

 

Parameters

tM2 As T_SOURCEDIRM2LASER

Data structure whose members are being initialized.  The structure members are initialized with the following values:

angleType = Half width at 1/e amplitude point

M2x = 1

M2y = 1

numX = 32

numY = 32

semiAngX = 10

semiAngY = 10

semiWidX = 0

semiWidY = 0

 

 

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

GetSourceDirM2Laser

T_SOURCEDIRM2LASER

 

 

 

 

 

Copyright © Photon Engineering, LLC