当前位置: 首页>>代码示例>>C#>>正文


C# Vector3.ToUnity方法代码示例

本文整理汇总了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);
 }
开发者ID:RatherGood1,项目名称:BulletSharpUnity3d,代码行数:7,代码来源:DebugDrawUnity.cs

示例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);
 }
开发者ID:RatherGood1,项目名称:BulletSharpUnity3d,代码行数:6,代码来源:DebugDrawUnity.cs

示例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());
 }
开发者ID:RatherGood1,项目名称:BulletSharpUnity3d,代码行数:7,代码来源:DebugDrawUnity.cs

示例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);
 }
开发者ID:RatherGood1,项目名称:BulletSharpUnity3d,代码行数:5,代码来源:DebugDrawUnity.cs

示例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);
 }
开发者ID:RatherGood1,项目名称:BulletSharpUnity3d,代码行数:8,代码来源:DebugDrawUnity.cs

示例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());
 }
开发者ID:RatherGood1,项目名称:BulletSharpUnity3d,代码行数:5,代码来源:DebugDrawUnity.cs

示例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);
 }
开发者ID:RatherGood1,项目名称:BulletSharpUnity3d,代码行数:6,代码来源:DemoFramework2UnityInterface.cs


注:本文中的System.Vector3.ToUnity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。