本文整理汇总了C#中VectorLine.Draw3DAuto方法的典型用法代码示例。如果您正苦于以下问题:C# VectorLine.Draw3DAuto方法的具体用法?C# VectorLine.Draw3DAuto怎么用?C# VectorLine.Draw3DAuto使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VectorLine
的用法示例。
在下文中一共展示了VectorLine.Draw3DAuto方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createLines
void createLines()
{
Vector3[] v3;
v3 = new Vector3[720];
selectCircle = new VectorLine("Select Circle", v3, null, line_thickness);
selectCircle.Draw3DAuto();
destinationCircle = new VectorLine("Destination Circle", v3, null, line_thickness);
destinationCircle.Draw3DAuto();
movePathLine = new VectorLine("Move Path Line", lineList, null, line_thickness, LineType.Continuous);
movePathLine.Draw3DAuto();
VectorLine.canvas3D.sortingLayerName = "Select Circles";
}
示例2: removeFrontNode
public void removeFrontNode()
{
color_list.RemoveAt(0);
width_list.RemoveAt(0);
Vector3[] new_points = new Vector3[path_line.points3.Length -1];
for(int i = 0; i < new_points.Length - 1; ++i)
{
new_points[i] = path_line.points3[i+1];
}
VectorLine.Destroy(ref path_line);
path_line = new VectorLine("path", new_points, null, 5F ,LineType.Continuous,Joins.Weld);
path_line.SetColorsSmooth(color_list.ToArray());
path_line.SetWidths(width_list.ToArray());
path_line.Draw3DAuto();
VectorLine del_spot = spot_list[0];
spot_list.RemoveAt(0);
VectorLine.Destroy(ref del_spot);
}
示例3: SetRay3D
public static VectorLine SetRay3D(Color color, float time, Vector3 origin, Vector3 direction)
{
var line = new VectorLine("SetRay3D", new Vector3[] {origin, new Ray(origin, direction).GetPoint(direction.magnitude)}, color, null, 1.0f, LineType.Continuous, Joins.None);
line.Draw3DAuto (time);
return line;
}
示例4: SetLine3D
public static VectorLine SetLine3D(Color color, float time, params Vector3[] points)
{
if (points.Length < 2) {
LogError("VectorLine.SetLine3D needs at least two points");
return null;
}
var line = new VectorLine("SetLine3D", points, color, null, 1.0f, LineType.Continuous, Joins.None);
line.Draw3DAuto (time);
return line;
}
示例5: LegendLine
public LegendLine(GraphLines parent, Guid id, int index, Color color)
{
Transform transform = parent.m_legendMesh.transform;
Vector3 position = transform.position;
m_id = id;
m_vector = new VectorLine("LegendLine" + index, new Vector3[2], parent.m_lineMaterial, parent.m_lineWidth, LineType.Discrete);
m_vector.color = color;
m_vector.drawTransform = transform;
m_vector.Draw3DAuto();
float spacing = parent.m_legendMesh.characterSize * 1.5F;
// Position legend line relative to text descriptions
Vector3 point1 = new Vector3(-2.0F, -(spacing / 2.0F + index * spacing), -position.z);
Vector3 point2 = new Vector3(-0.5F, point1.y, point1.z);
m_vector.points3[0] = point1;
m_vector.points3[1] = point2;
}
示例6: DataLine
public DataLine(GraphLines parent, Guid id, int index)
{
m_id = id;
m_index = index;
m_unscaledData = new float[parent.m_pointsInLine];
m_vector = new VectorLine("DataLine" + index, new Vector3[parent.m_pointsInLine], parent.m_lineMaterial, parent.m_lineWidth, LineType.Continuous);
m_vector.color = parent.m_lineColors[index % parent.m_lineColors.Length];
m_vector.drawTransform = parent.m_target;
m_vector.Draw3DAuto();
for (int x = 0; x < m_vector.points3.Count; x++)
{
m_unscaledData[x] = float.NaN;
m_vector.points3[x] = new Vector3(Mathf.Lerp(-5.0F, 5.0F, x / (float)m_vector.points3.Count), -((index + 1) * parent.m_lineDepthOffset + 0.05F), 0.0F);
}
}
示例7: RenderPoints
private VectorLine RenderPoints()
{
VectorLine templine = null;
// draws the line using Vectrosity library
if (renderedPoints.Length > 1)
{
templine = new VectorLine("Line", renderedPoints, basicLineMaterial, 2.0f, LineType.Continuous);
templine.Draw3DAuto();
}
return templine;
}
示例8: Link
public void Link(GameObject crystal)
{
if (crystal != null)//水晶连线 && linkStop == false
{
if (!draw)//如果还没开始画线
{
//if (EnergyManager.Instance.accessibleEnergy > 0)
{
#region
float x = 0, z = 0; int kx = -1, ky = -1;
linePoints = new Vector3[2];
linePoints[0] = crystal.transform.position;
z = EnergyManager.Instance.HeroMagicCircle.getz(linePoints[0].z);
if (z == EnergyManager.Instance.HeroMagicCircle.rowKey[2])
x = EnergyManager.Instance.HeroMagicCircle.getx1(linePoints[0].x);
else if (z == EnergyManager.Instance.HeroMagicCircle.rowKey[0] || z == EnergyManager.Instance.HeroMagicCircle.rowKey[4])
x = EnergyManager.Instance.HeroMagicCircle.getx2(linePoints[0].x);
else
x = EnergyManager.Instance.HeroMagicCircle.getx3(linePoints[0].x);
kx = EnergyManager.Instance.HeroMagicCircle.getKx(x);
ky = EnergyManager.Instance.HeroMagicCircle.getKy(z);
if (kx != -1)
{
l1 = new Point( kx , ky);
draw = true;
//EnergyManager.Instance.MinusEnergy(1);
}
screenSpace = Camera.main.WorldToScreenPoint(crystal.transform.position);
linePoints[1] = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, screenSpace.z));
temp1 = new VectorLine("3DLine", linePoints, Color.green, lineMaterial, 8.0f);
temp2 = new VectorLine("3DLine", linePoints, Color.green, lineMaterial2, 15.0f);
temp1.Draw3DAuto();
temp2.Draw3DAuto();
#endregion
}
//else
//{
// //linkStop = true;
//}
}
else
{
#region
float x = 0, z = 0; int kx = -1, ky = -1;
linePoints[1] = crystal.transform.position;
z = EnergyManager.Instance.HeroMagicCircle.getz(linePoints[1].z);
if (z == EnergyManager.Instance.HeroMagicCircle.rowKey[2])
x = EnergyManager.Instance.HeroMagicCircle.getx1(linePoints[1].x);
else if (z == EnergyManager.Instance.HeroMagicCircle.rowKey[0] || z == EnergyManager.Instance.HeroMagicCircle.rowKey[4])
x = EnergyManager.Instance.HeroMagicCircle.getx2(linePoints[1].x);
else
x = EnergyManager.Instance.HeroMagicCircle.getx3(linePoints[1].x);
kx = EnergyManager.Instance.HeroMagicCircle.getKx(x);
ky = EnergyManager.Instance.HeroMagicCircle.getKy(z);
l2 = new Point(kx , ky);
if (l2 == l1)//连自己=>取消连线
{
VectorLine.Destroy(ref temp1);
VectorLine.Destroy(ref temp2);
//EnergyManager.Instance.MinusEnergy(-1);
}
else if (EnergyManager.Instance.HeroMagicCircle.IsOperable(new Line(l1,l2)))
{
if (kx != -1 && !EnergyManager.Instance.HeroMagicCircle.GetLine(l1, l2) && EnergyManager.Instance.HeroMagicCircle.GetLineSwitch(l1.GetX(), l1.GetY(), l2.GetX(), l2.GetY()))//画线
{
//AddLine(l1, l2);
if (EnergyManager.Instance.accessibleEnergy>0)
{
temp1.Draw3D();
temp2.Draw3D();
line[l1.GetUni(), l2.GetUni()] = temp1; line2[l1.GetUni(), l2.GetUni()] = temp2;
EnergyManager.Instance.HeroMagicCircle.LineTrue(l1.GetUni(), l2.GetUni());
EnergyManager.Instance.MinusEnergy(1);
}
else
{
VectorLine.Destroy(ref temp1);
VectorLine.Destroy(ref temp2);
GuideText.Instance.ReturnText("LinkNeedEnergy");
}
}
else if (EnergyManager.Instance.HeroMagicCircle.GetLine(l1, l2))//删线
{
// Debug.Log("delete");
DeleteLine(l1, l2);
VectorLine.Destroy(ref temp1);
VectorLine.Destroy(ref temp2);
GuideText.Instance.GuideLevel(2, 33, "RedundentLink");
GuideText.Instance.GuideLevel(3, 33, "RedundentLink");
//EnergyManager.Instance.MinusEnergy(-1);
//linkStop = true;
}
}
else
{
GuideText.Instance.ReturnText("NoJumpLink");
return;
}
draw = false;
//.........这里部分代码省略.........