本文整理汇总了C#中ParameterSet.FindOneInt方法的典型用法代码示例。如果您正苦于以下问题:C# ParameterSet.FindOneInt方法的具体用法?C# ParameterSet.FindOneInt怎么用?C# ParameterSet.FindOneInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterSet
的用法示例。
在下文中一共展示了ParameterSet.FindOneInt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateAreaLight
public static AreaLight CreateAreaLight(Transform lightToWorld, ParameterSet paramSet, IShape shape)
{
Spectrum L = paramSet.FindOneSpectrum ("L", new Spectrum (1.0));
Spectrum sc = paramSet.FindOneSpectrum ("scale", new Spectrum (1.0));
int nSamples = paramSet.FindOneInt ("nsamples", 1);
return new DiffuseAreaLight (lightToWorld, L * sc, nSamples, shape);
}
示例2: CreateSampler
public static ISampler CreateSampler(ParameterSet parameters, IFilm film, ICamera camera)
{
// Initialize common sampler parameters
int xstart, xend, ystart, yend;
film.GetSampleExtent (out xstart, out xend, out ystart, out yend);
int nsamp = parameters.FindOneInt ("pixelsamples", 4);
return new LowDiscrepancy (xstart, xend, ystart, yend, nsamp, camera.ShutterOpen, camera.ShutterClose);
}
示例3: CreateAccelerator
/// <summary>
/// Creates a new Kd-Tree
/// </summary>
/// <param name="primitives">
/// List of primitives to include in the Tree
/// </param>
/// <param name="parameterSet">
/// Parameters for the Kd-Tree
/// </param>
/// <returns>
/// The newly created Kd-Tree
/// </returns>
public static IAggregate CreateAccelerator(List<IPrimitive> primitives, ParameterSet parameterSet)
{
int isectCost = parameterSet.FindOneInt ("intersectcost", 80);
int traversalCost = parameterSet.FindOneInt ("traversalcost", 1);
double emptyBonus = parameterSet.FindOneDouble ("emptybonus", 0.5);
int maxPrimitives = parameterSet.FindOneInt ("maxprims", 1);
int maxDepth = parameterSet.FindOneInt ("maxdepth", -1);
return new KdTree (primitives, isectCost, traversalCost, emptyBonus, maxPrimitives, maxDepth);
}