Whenever a ray is cast the following state variables are set to describe the ray:
| type | name | content |
|---|---|---|
| miState * | parent | state of parent shader |
| miState * | child | state of child shader |
| miRay_type | type | type of ray: reflect, light... |
| miCBoolean | scanline | from scanline algorithm |
| void * | cache | RC intersection cache |
| miVector | org | start point of the ray |
| miVector | dir | direction of the ray |
| float | time | shutter interval time |
| miTag | volume | volume shader of primitive |
| miTag | environment | environment shader |
| int | reflection_level | current reflection ray depth |
| int | refraction_level | current refraction ray depth |
| int | face | facing flag for sub-rays |
parentchildstate→user, state→label, and
all other local information.typemiRAY_EYEmiRAY_TRANSPARENTmiRAY_REFRACTmiRAY_REFLECTmiRAY_SHADOWmiRAY_LIGHTmiRAY_ENVIRONMENTmiRAY_DISPLACEmiRAY_OUTPUTmiRAY_FINALGATHERmiRAY_LM_VERTEXmiRAY_LM_MESHmiRAY_PROBEmiRAY_NONEmiPHOTON_LIGHTmiPHOTON_REFLECT_SPECULARmiPHOTON_REFLECT_GLOSSYmiPHOTON_REFLECT_DIFFUSEmiPHOTON_TRANSMIT_SPECULARmiPHOTON_TRANSMIT_GLOSSYmiPHOTON_TRANSMIT_DIFFUSEmiPHOTON_TRANSPARENTmiPHOTON_ABSORBmiPHOTON_SCATTER_VOLUMEmiPHOTON_EMIT_CAUSTICmiPHOTON_EMIT_GLOBILLUMThe ray type (state→type) can be queried with
the following macros:
miRAY_PRIMARY(raytype)miRAY_SECONDARY(raytype)miRAY_PHOTON(raytype)scanlinecacheorgdirtimevolumeenvironmentreflection_levelrefraction_levelfaceCopyright © 1986-2010 by mental images GmbH