本文整理汇总了C#中System.Vector3.ToUnity方法的典型用法代码示例。如果您正苦于以下问题:C# Vector3.ToUnity方法的具体用法?C# Vector3.ToUnity怎么用?C# Vector3.ToUnity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Vector3
的用法示例。
在下文中一共展示了Vector3.ToUnity方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawBox
public override void DrawBox(ref Vector3 bbMin, ref Vector3 bbMax, ref Vector3 color)
{
UnityEngine.Bounds b = new UnityEngine.Bounds(bbMin.ToUnity(), UnityEngine.Vector3.zero);
b.Encapsulate(bbMax.ToUnity());
UnityEngine.Gizmos.color = new UnityEngine.Color(color.X, color.Y, color.Z);
UnityEngine.Gizmos.DrawWireCube(b.center,b.size);
}
示例2: DrawArc
public override void DrawArc(ref Vector3 center, ref Vector3 normal, ref Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle,
ref Vector3 color, bool drawSect, float stepDegrees)
{
UnityEngine.Color col = new UnityEngine.Color(color.X, color.Y, color.Z);
BUtility.DebugDrawArc(center.ToUnity(), normal.ToUnity(), axis.ToUnity(), radiusA, radiusB, minAngle, maxAngle, col, drawSect, stepDegrees);
}
示例3: DrawTriangle
public override void DrawTriangle(ref Vector3 v0, ref Vector3 v1, ref Vector3 v2, ref Vector3 color, float alpha)
{
UnityEngine.Gizmos.color = new UnityEngine.Color(color.X, color.Y, color.Z);
UnityEngine.Gizmos.DrawLine(v0.ToUnity(), v1.ToUnity());
UnityEngine.Gizmos.DrawLine(v1.ToUnity(), v2.ToUnity());
UnityEngine.Gizmos.DrawLine(v2.ToUnity(), v0.ToUnity());
}
示例4: DrawSphere
public override void DrawSphere(ref Vector3 p, float radius, ref Vector3 color)
{
UnityEngine.Color c = new UnityEngine.Color(color.X, color.Y, color.Z);
BUtility.DebugDrawSphere(p.ToUnity(),UnityEngine.Quaternion.identity,UnityEngine.Vector3.one, UnityEngine.Vector3.one * radius, c);
}
示例5: DrawPlane
public override void DrawPlane(ref Vector3 planeNormal, float planeConst, ref Matrix trans, ref Vector3 color)
{
UnityEngine.Vector3 pos = BSExtensionMethods2.ExtractTranslationFromMatrix(ref trans);
UnityEngine.Quaternion rot = BSExtensionMethods2.ExtractRotationFromMatrix(ref trans);
UnityEngine.Vector3 scale = BSExtensionMethods2.ExtractScaleFromMatrix(ref trans);
UnityEngine.Color c = new UnityEngine.Color(color.X, color.Y, color.Z);
BUtility.DebugDrawPlane(pos, rot, scale, planeNormal.ToUnity(), planeConst, c);
}
示例6: DrawLine
public override void DrawLine(ref Vector3 from, ref Vector3 to, ref Vector3 fromColor, ref Vector3 toColor)
{
UnityEngine.Gizmos.color = new UnityEngine.Color(fromColor.X, fromColor.Y, fromColor.Z);
UnityEngine.Gizmos.DrawLine(from.ToUnity(), to.ToUnity());
}
示例7: SetEyeTarget
public void SetEyeTarget(Vector3 eye, Vector3 targ)
{
UnityEngine.Transform t = UnityEngine.Camera.main.transform;
t.position = eye.ToUnity();
t.rotation = UnityEngine.Quaternion.LookRotation((targ - eye).ToUnity().normalized, UnityEngine.Vector3.up);
}