Description Retrieves ray data for the first "Live" ray. 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 success = GetFirstRay( id, tr )
Parameters success (Boolean) Returns True is successful and False if a problem is encountered.
id As Long (or Huge_) Index number of the ray being accessed. This variable is passed into the function without a specific value assigned to it by the user. After execution, the value of the variable contains the index number of the first ray in the buffer.
tr As T_RAY Structure to be loaded with ray data.
Example The example below shows the standard ray buffer looping construction.
Dim success As Boolean Dim curRay As Long Dim tRay as T_RAY
success = GetFirstRay( curRay, tRay ) While success 'Do something with tRay structure here... success = GetNextRay( curRay, tRay ) Wend
See Also
|