Navigation: Scripting Reference Manual > Functions & Subroutines > ImpSampGetScatterLevel

 

ImpSampGetScatterLevel

 

Contact Us: fredsupport@photonengr.com

 

Description

This subroutine retrieves the scatter ancestry level criteria from an importance sample on a surface.

 

Syntax

ImpSampGetScatterLevel (sNode, iSamp, criteria, scatLevel )

 

Parameters

sNode As Long

Node number of the surface whose importance sample is being queried.

 

iSamp As Long

Index (0-based) into the importance sample list of the surface.  The scatter ancestry level criteria will be retrieved from the importance sample at this index.

 

criteria As String

After execution, this variable contains the string form of the scatter ancestry level criteria currently assigned to the importance sample.  Possible values are:

"greater than"

"less than"

"equal to"

 

scatLevel As Long

After execution, this variable contains the scatter ancestry level currently assigned to the importance sample.  In order for scatter rays to be generated at this surface, the generated rays must meet the requirement designated by the combination of the criteria variable and the scatLevel variable.

 

 

Examples

The example below retrieves the scatter level ancestry criteria from the importance sample at index 1 of the specified surface, prints the current information, increments the scatter ancestry level by one and then assigns the modified criteria back to the importance sample.

 

Sub Main

 

    Dim sNode As Long, iSamp As Long, scatLevel As Long

    Dim criteria As String

 

    sNode = FindFullName( "Geometry.Primary.reflecting" )

    iSamp = 1

 

    ImpSampGetScatterLevel( sNode, iSamp, criteria, scatLevel )

    Print "Surface: "     & GetFullName( sNode )

    Print "Imp. Samp: "   & ImpSampGetName( sNode, iSamp )

    Print "Criteria: "    & criteria

    Print "Scat. Level: " & scatLevel

    scatLevel = scatLevel + 1

    ImpSampSetScatterLevel( sNode, iSamp, criteria, scatLevel )

    Update

 

End Sub

 

See Also

Importance Sample Commands

ImpSampSetScatterLevel

 

 

 

 

 

Copyright © Photon Engineering, LLC