Navigation: Scripting Reference Manual > Functions & Subroutines > GetRay

 

GetRay

 

Contact Us: fredsupport@photonengr.com

 

Description

Retrieves the data from a specified ray in the ray buffer.  Depending on the number of rays traced, it may be necessary to dimension ray index and ray counter variables as data type Huge_ instead of Long.  Please see Multi-threaded Raytracing for more information.

 

Syntax

GetRay id, ray

 

Parameters

id As Long (or Huge_)

Identifier of the ray.

 

ray As T_RAY

Returns the data for the specified ray.

 

Remarks

This subroutine retrieves the data from a specified ray in the ray buffer.  If there is a problem, the subroutine sets an error and returns without modifying ray.

 

If a ray-related error occurs during execution of a script, check Multi-Threaded Raytrace for a possible explanation.

 

Internally, FRED stores the ray wavelength in system units even though the T_RAY structure accepts wavelength values in microns.  When the ray is altered using the GetRay and SetRay subroutines a conversion operation occurs in going between internal system units and the micron units of T_RAY that can cause a change in the last decimal place of the wavelength.  If a coherent field calculation is performed and multiple wavelengths are encountered, only the first wavelength satisfying the ray filter criteria will be used in the calculation and a warning dialog will be displayed.

 

See Also

T_RAY

AddRay

SetRay

GetRayCount

Multi-Threaded Raytrace

Examples

Basic Raytrace Functions

 

 

 

 

 

 

Copyright © Photon Engineering, LLC