Description Sets the data for 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 SetRay id, ray
Parameters id As Long (or Huge_) Identifier of the ray.
ray As T_RAY Structure containing the data for the ray.
Remarks This subroutine sets the data from a specified ray in the ray buffer. If there is a problem, the subroutine posts an error and returns without modifying the specified ray.
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 Examples
|