本文整理汇总了C#中Scene.Occludes8方法的典型用法代码示例。如果您正苦于以下问题:C# Scene.Occludes8方法的具体用法?C# Scene.Occludes8怎么用?C# Scene.Occludes8使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scene
的用法示例。
在下文中一共展示了Scene.Occludes8方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IncoherentOcclusion8
private static void IncoherentOcclusion8(Scene<Sphere> scene, int nray, Ray[] rays)
{
for (var t = 0; t < nray / 8; ++t)
{
var rays2 = new[]
{
rays[t * 8 + 0],
rays[t * 8 + 1],
rays[t * 8 + 2],
rays[t * 8 + 3],
rays[t * 8 + 4],
rays[t * 8 + 5],
rays[t * 8 + 6],
rays[t * 8 + 7],
};
scene.Occludes8(rays2);
}
}
示例2: CoherentOcclusion8
private static void CoherentOcclusion8(Scene<Sphere> scene, int w, int h)
{
float invW = 1.0f / w, invH = 1.0f / h;
for (var y = 0; y < h; y += 4)
for (var x = 0; x < w; x += 2)
{
var rays = new[]
{
new Ray(Vector.Zero, new Vector((float)(x + 0) * invW, 1, (float)(y + 0) * invH)),
new Ray(Vector.Zero, new Vector((float)(x + 1) * invW, 1, (float)(y + 0) * invH)),
new Ray(Vector.Zero, new Vector((float)(x + 0) * invW, 1, (float)(y + 1) * invH)),
new Ray(Vector.Zero, new Vector((float)(x + 1) * invW, 1, (float)(y + 1) * invH)),
new Ray(Vector.Zero, new Vector((float)(x + 0) * invW, 1, (float)(y + 2) * invH)),
new Ray(Vector.Zero, new Vector((float)(x + 1) * invW, 1, (float)(y + 2) * invH)),
new Ray(Vector.Zero, new Vector((float)(x + 0) * invW, 1, (float)(y + 3) * invH)),
new Ray(Vector.Zero, new Vector((float)(x + 1) * invW, 1, (float)(y + 3) * invH)),
};
scene.Occludes8(rays);
}
}