Description This function returns the number of rays that were incident on a surface during the most recent raytrace. 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 numRays = GetSurfIncidentRayCount( nSurf)
Parameters numRays (Long or Huge_) Returned by the function and indicates the number of rays incident on the designated surface during the most recent raytrace.
nSurf As Long Node number of the surface being queried.
Example The example below demonstrates how to query a specific surface for the number of rays that were incident on the surface during the most recent raytrace.
Sub Main
Dim nSurf As Long nSurf = FindFullName( "Geometry.Plane.Surface" )
Dim nRays As Long nRays = GetSurfIncidentRayCount( nSurf ) Print "Rays incident on surface = " & nRays
End Sub
See Also
|