当前位置: 首页>>代码示例>>C#>>正文


C# ShadingState.getReflectionDepth方法代码示例

本文整理汇总了C#中ShadingState.getReflectionDepth方法的典型用法代码示例。如果您正苦于以下问题:C# ShadingState.getReflectionDepth方法的具体用法?C# ShadingState.getReflectionDepth怎么用?C# ShadingState.getReflectionDepth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ShadingState的用法示例。


在下文中一共展示了ShadingState.getReflectionDepth方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: traceReflection

 public Color traceReflection(ShadingState previous, Ray r, int i)
 {
     // limit path depth and disable caustic paths
     if (previous.getReflectionDepth() >= maxReflectionDepth || previous.getDiffuseDepth() > 0)
         return Color.BLACK;
     IntersectionState istate = previous.getIntersectionState();
     istate.numReflectionRays++;
     scene.trace(r, istate);
     return istate.hit() ? shadeHit(ShadingState.createReflectionBounceState(previous, r, i)) : Color.BLACK;
 }
开发者ID:,项目名称:,代码行数:10,代码来源:

示例2: traceReflectionPhoton

 public void traceReflectionPhoton(ShadingState previous, Ray r, Color power)
 {
     if (previous.getReflectionDepth() >= maxReflectionDepth)
         return;
     IntersectionState istate = previous.getIntersectionState();
     scene.trace(r, istate);
     if (previous.getIntersectionState().hit())
     {
         // create a new shading context
         ShadingState state = ShadingState.createReflectionBounceState(previous, r, 0);
         shadePhoton(state, power);
     }
 }
开发者ID:,项目名称:,代码行数:13,代码来源:

示例3: store

 public void store(ShadingState state, Vector3 dir, Color power, Color diffuse)
 {
     if (((state.getDiffuseDepth() == 0) && (state.getReflectionDepth() > 0 || state.getRefractionDepth() > 0)))
     {
         // this is a caustic photon
         Photon p = new Photon(state.getPoint(), dir, power);
         lock (lockObj)
         {
             storedPhotons++;
             photonList.Add(p);
             bounds.include(new Point3(p.x, p.y, p.z));
             maxPower = Math.Max(maxPower, power.getMax());
         }
     }
 }
开发者ID:rzel,项目名称:sunflowsharp,代码行数:15,代码来源:CausticPhotonMap.cs


注:本文中的ShadingState.getReflectionDepth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。