本文整理汇总了C#中IColorType类的典型用法代码示例。如果您正苦于以下问题:C# IColorType类的具体用法?C# IColorType怎么用?C# IColorType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IColorType类属于命名空间,在下文中一共展示了IColorType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HistoryData
internal HistoryData(int Capacity, IColorType Color)
{
m_Color = Color.GetAsRGBA_Bytes();
m_Capacity = Capacity;
m_Data = new TwoSidedStack<double>();
Reset();
}
示例2: HistoryData
internal HistoryData(int capacity, IColorType lineColor)
{
this.lineColor = lineColor.GetAsRGBA_Bytes();
this.capacity = capacity;
data = new List<double>();
Reset();
}
示例3: EvaluateShadow
public override void EvaluateShadow(ShadePointInfo pt, float u0, float u1, float u2, out IColorType radiance, out float pdf, out RayData ray)
{
var wi = MC.CosineSampleHemisphere(u1, u2);
pdf = wi.z * MathLab.INVPI;
wi = pt.Frame.ToWorld(ref wi);
ray = new RayData(ref pt.HitPoint, ref wi, 1e-4f, float.MaxValue);
radiance = Le(ref wi);
}
示例4: F
public override void F(ShadePointInfo pt, out IColorType fs, BrdfType types = BrdfType.Diffuse)
{
float c = 1f - Vector.Dot(ref pt.IncomingDirection, ref pt.ShadingNormal);
float Re = R0 + (1f - R0) * c * c * c * c * c;
float P = .25f + .5f * Re;
fs = pt.Diffuse.CloneValue().Mul(MathLab.INVPI).Mul((1f - Re) / (1f - P));
}
示例5: EvaluateIllumination
public override void EvaluateIllumination(RayEngineScene scn, float u0, float u1, float u2, float u3, float u4, out RayData ray, out float pdf, out IColorType radiance)
{
Vector dir = MC.UniformSampleSphere(u0, u1);
ray = new RayData(ref Position, ref dir, 1e-4f, 1e4f);
pdf = MathLab.INV4PI;
radiance = (power.Mul(MathLab.M_PI * 4f));
}
示例6: EvaluateShadow
public override void EvaluateShadow(ShadePointInfo pt, float u0, float u1, float u2, out IColorType radiance, out float pdf, out RayData ray)
{
var dir = -(Position - pt.HitPoint);
var l2 = dir.Length2();
var l = MathLab.Sqrt(l2);
dir.Normalize();
pdf = MC.UniformSpherePdf();
ray = new RayData(ref pt.HitPoint, ref dir, 1e-4f, l - 1e-4f);
radiance = power.Mul(1f / l);
//float theta = Vector.SphericalTheta(ref dir);
//Profile.Evaluate(Vector.SphericalPhi(ref dir) * MathLab.INVTWOPI, theta * MathLab.INVPI);
}
示例7: Render
public override void Render(IVertexSource vertexSource, int pathIndexToRender, IColorType colorBytes)
{
rasterizer.reset();
Affine transform = GetTransform();
if (!transform.is_identity())
{
vertexSource = new VertexSourceApplyTransform(vertexSource, transform);
}
rasterizer.add_path(vertexSource, pathIndexToRender);
if (destImageByte != null)
{
scanlineRenderer.RenderSolid(destImageByte, rasterizer, m_ScanlineCache, colorBytes.GetAsRGBA_Bytes());
DestImage.MarkImageChanged();
}
else
{
scanlineRenderer.RenderSolid(destImageFloat, rasterizer, m_ScanlineCache, colorBytes.GetAsRGBA_Floats());
destImageFloat.MarkImageChanged();
}
}
示例8: FillRectangle
public abstract void FillRectangle(double left, double bottom, double right, double top, IColorType fillColor);
示例9: Render
public void Render(IVertexSource vertexSource, Vector2 position, IColorType color)
{
Render(new VertexSourceApplyTransform(vertexSource, Affine.NewTranslation(position.x, position.y)), 0, color);
}
示例10: Clear
public abstract void Clear(IColorType color);
示例11: FillRectangle
public override void FillRectangle(double left, double bottom, double right, double top, IColorType fillColor)
{
RoundedRect rect = new RoundedRect(left, bottom, right, top, 0);
Render(rect, fillColor.GetAsRGBA_Bytes());
}
示例12: ActiveColor
public void ActiveColor(IColorType c)
{
m_active_color = c.GetAsRGBA_Doubles();
}
示例13: BackgroundColor
public void BackgroundColor(IColorType bk)
{
unsafe { m_pixf.MakePixel(m_pBackBufferColor, bk); }
}
示例14: Clear
//--------------------------------------------------------------------
public void Clear(IColorType in_c)
{
uint y;
RGBA_Bytes c = new RGBA_Bytes(in_c.R_Byte, in_c.G_Byte, in_c.B_Byte, in_c.A_Byte);
if (Width != 0)
{
for (y = 0; y < Height; y++)
{
base.CopyHorizontalLine(0, (int)y, Width, c);
}
}
}
示例15: span_image_filter_rgba_bilinear_clip
public span_image_filter_rgba_bilinear_clip(IImageBufferAccessor src,
IColorType back_color, ISpanInterpolator inter)
: base(src, inter, null)
{
m_OutsideSourceColor = back_color.GetAsRGBA_Bytes();
}