Navigation: Scripting Reference Manual > Functions & Subroutines > IsSourceDirLaserDiode

 

IsSourceDirLaserDiode

 

Contact Us: fredsupport@photonengr.com

 

Description

Queries a source node and returns True or False determining whether a source's ray direction specification is Laser Diode Beam.

 

Syntax

ldFlag = IsSourceDirLaserDiode( srcNode )

 

Parameters

ldFlag (Boolean)

Returned boolean with query result.  True if the source node's ray direction specification is Laser Diode Beam, False otherwise.

 

 

srcNode As Long

Node number of the source whose ray direction specification is being queried.

 

 

Example

The following script demonstrates how to query, retrieve and modify the Laser Diode Beam ray direction specification of a source node.

 

Sub Main

 

          Dim ld As T_SOURCEDIRLASERDIODE

          Dim srcNode As Long

          Dim success As Boolean

 

          'Source node being queried

          srcNode = FindFullName( "Optical Sources.LaserDiodeSource" )

 

          'Does the source node have laser diode beam ray directions?

          If IsSourceDirLaserDiode( srcNode ) Then

 

                    'Retrieve the source's laser diode direction specifications

                    success = GetSourceDirLaserDiode( srcNode, ld )

                    Print "Current Laser Diode Parameters: "

                    Print Chr(9) & "Angle Type: " & Chr(9) & ld.angleType

                    Print Chr(9) & "X Focus: " & Chr(9) & ld.focusX

                    Print Chr(9) & "Y Focus: " & Chr(9) & ld.focusY

                    Print Chr(9) & "X Samples: " & Chr(9) & ld.numX

                    Print Chr(9) & "Y Samples: " & Chr(9) & ld.numY

                    Print Chr(9) & "X Semi Ang: " & Chr(9) & ld.semiAngX

                    Print Chr(9) & "Y Semi Ang: " & Chr(9) & ld.semiAngY

 

                    'Set the default ray directions back to the source

                    InitSourceDirLaserDiode ld

                    SetSourceDirLaserDiode srcNode, ld

                    Print "Source reset to default laser diode ray directions."

 

          End If

 

End Sub

 

 

See Also

SetSourceDirLaserDiode

GetSourceDirLaserDiode

InitSourceDirLaserDiode

T_SOURCEDIRLASERDIODE

 

 

 

 

 

Copyright © Photon Engineering, LLC