本文整理汇总了C#中JBooth.VertexPainterPro.PaintJob.HasStream方法的典型用法代码示例。如果您正苦于以下问题:C# PaintJob.HasStream方法的具体用法?C# PaintJob.HasStream怎么用?C# PaintJob.HasStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JBooth.VertexPainterPro.PaintJob
的用法示例。
在下文中一共展示了PaintJob.HasStream方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawVertexPoints
void DrawVertexPoints(PaintJob j, Vector3 point)
{
Profiler.BeginSample("Draw Vertex Points");
if (j.HasStream() && j.HasData())
{
PrepBrushMode(j);
}
if (j.renderer == null)
{
return;
}
// convert point into local space, so we don't have to convert every point
point = j.renderer.transform.worldToLocalMatrix.MultiplyPoint3x4(point);
// for some reason this doesn't handle scale, seems like it should
// we handle it poorly until I can find a better solution
float scale = 1.0f / Mathf.Abs(j.renderer.transform.lossyScale.x);
float bz = scale * brushSize;
for (int i = 0; i < j.verts.Length; ++i)
{
float d = Vector3.Distance(point, j.verts[i]);
if (d < bz)
{
Handles.color = Color.white;
Vector3 wp = j.meshFilter.transform.localToWorldMatrix.MultiplyPoint(j.verts[i]);
Handles.SphereCap(0, wp, Quaternion.identity, HandleUtility.GetHandleSize(wp) * 0.02f);
}
}
Profiler.EndSample();
}