本文整理汇总了C#中ShadingState.getIntersectionState方法的典型用法代码示例。如果您正苦于以下问题:C# ShadingState.getIntersectionState方法的具体用法?C# ShadingState.getIntersectionState怎么用?C# ShadingState.getIntersectionState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShadingState
的用法示例。
在下文中一共展示了ShadingState.getIntersectionState方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: traceRefraction
public Color traceRefraction(ShadingState previous, Ray r, int i)
{
// limit path depth and disable caustic paths
if (previous.getRefractionDepth() >= maxRefractionDepth || previous.getDiffuseDepth() > 0)
return Color.BLACK;
IntersectionState istate = previous.getIntersectionState();
istate.numRefractionRays++;
scene.trace(r, istate);
return istate.hit() ? shadeHit(ShadingState.createRefractionBounceState(previous, r, i)) : Color.BLACK;
}
示例2: traceRefractionPhoton
public void traceRefractionPhoton(ShadingState previous, Ray r, Color power)
{
if (previous.getRefractionDepth() >= maxRefractionDepth)
return;
IntersectionState istate = previous.getIntersectionState();
scene.trace(r, istate);
if (previous.getIntersectionState().hit())
{
// create a new shading context
ShadingState state = ShadingState.createRefractionBounceState(previous, r, 0);
shadePhoton(state, power);
}
}
示例3: traceFinalGather
public ShadingState traceFinalGather(ShadingState previous, Ray r, int i)
{
if (previous.getDiffuseDepth() >= maxDiffuseDepth)
return null;
IntersectionState istate = previous.getIntersectionState();
scene.trace(r, istate);
return istate.hit() ? ShadingState.createFinalGatherState(previous, r, i) : null;
}