Navigation: Scripting Reference Manual > Functions & Subroutines > MPCSetSimpleTraceMode

 

MPCSetSimpleTraceMode

 

Contact Us: fredsupport@photonengr.com

 

Description

This subroutine sets the single/double precision state of the MPC raytrace for the document.  This state does not apply to the MPC Advanced Raytrace, which has its own flag determining the precision mode of the advanced raytrace.  Any simple MPC raytrace called using MPCRaytrace() (or the GUI equivalents. MPC Trace CPU Rays and MPC Trace GPU Rays) will be executed with the precision specified by the document's MPC precision state, which can be specified using the MPCSetSimpleTraceMode() command.

 

Syntax

MPCSetSimpleTraceMode( mpcMode )

 

 

Parameters

mpcMode As String

Can be one of either "single" or "double".  A value of "single" means that any subsequent MPCRaytrace() calls (excluding MPC Advanced Raytrace) will be performed with single-float precision (32-bit).  A value of "double" means that subsequent MPCRaytrace() calls will be performed with double-float precision.

 

Example

The following example shows how the single/double precision state of an MPC raytrace can be retrieved from a document and then modified prior to calling a simple (i.e. non-advanced raytrace) MPC raytrace.

 

Sub Main

   

    'Retrieve and report current precision mode

    Dim mpcMode As String

          MPCGetSimpleTraceMode( mpcMode )

    Print "Current MPC raytrace precision mode is " & mpcMode

 

    'Set the mode to double precision and raytrace

    MPCSetSimpleTraceMode( "double" )

    Update

    MPCRaytrace( "GPU" )

 

End Sub

 

 

See Also

MPCAdvancedRaytrace

MPCGetSimpleTraceMode

MPCInitAdvancedRaytrace

T_MPCADVANCEDRAYTRACE

MPCRaytrace

MPCSetRaySumMode

 

 

 

 

 

Copyright © Photon Engineering, LLC