本文整理汇总了C#中VRageMath.Vector3.AssertIsValid方法的典型用法代码示例。如果您正苦于以下问题:C# Vector3.AssertIsValid方法的具体用法?C# Vector3.AssertIsValid怎么用?C# Vector3.AssertIsValid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VRageMath.Vector3
的用法示例。
在下文中一共展示了Vector3.AssertIsValid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddBillboardOriented
internal static void AddBillboardOriented(string material,
Color color, Vector3D origin, Vector3 leftVector, Vector3 upVector, float radius, int priority = 0, int customViewProjection = -1)
{
Debug.Assert(material != null);
origin.AssertIsValid();
leftVector.AssertIsValid();
upVector.AssertIsValid();
radius.AssertIsValid();
MyDebug.AssertDebug(radius > 0);
MyBillboard billboard = SpawnBillboard();
if (billboard == null)
return;
billboard.Priority = priority;
billboard.CustomViewProjection = customViewProjection;
MyQuadD quad;
MyUtils.GetBillboardQuadOriented(out quad, ref origin, radius, ref leftVector, ref upVector);
CreateBillboard(billboard, ref quad, material, ref color, ref origin);
}
示例2: AddBillboardOriented
// Add billboard for one frame only. This billboard isn't particle (it doesn't survive this frame, doesn't have update/draw methods, etc).
// This billboard isn't facing the camera. It's always oriented in specified direction. May be used as thrusts, or inner light of reflector.
// It's used by other classes when they want to draw some billboard (e.g. rocket thrusts, reflector glare).
public static void AddBillboardOriented(string material,
Color color, Vector3D origin, Vector3 leftVector, Vector3 upVector, float radius, int priority = 0, bool colorize = false, int customViewProjection = -1)
{
Debug.Assert(material != null);
if (!IsEnabled) return;
origin.AssertIsValid();
leftVector.AssertIsValid();
upVector.AssertIsValid();
radius.AssertIsValid();
MyDebug.AssertDebug(radius > 0);
MyBillboard billboard = m_billboardOncePool.Allocate();
if (billboard == null)
return;
billboard.Priority = priority;
billboard.CustomViewProjection = customViewProjection;
MyQuadD quad;
MyUtils.GetBillboardQuadOriented(out quad, ref origin, radius, ref leftVector, ref upVector);
CreateBillboard(billboard, ref quad, material, ref color, ref origin, colorize);
m_billboardsOnce.Add(billboard);
}
示例3: AddBillboardOriented
internal static void AddBillboardOriented(string material,
Color color, Vector3D origin, Vector3 leftVector, Vector3 upVector, float radius, int priority = 0, float softParticleDistanceScale = 1.0f,
int customViewProjection = -1)
{
if (!MyRender11.DebugOverrides.BillboardsDynamic)
return;
Debug.Assert(material != null);
origin.AssertIsValid();
leftVector.AssertIsValid();
upVector.AssertIsValid();
radius.AssertIsValid();
MyDebug.AssertDebug(radius > 0);
MyBillboard billboard = MyBillboardRenderer.AddBillboardOnce();
if (billboard == null)
return;
billboard.Priority = priority;
billboard.CustomViewProjection = customViewProjection;
MyQuadD quad;
MyUtils.GetBillboardQuadOriented(out quad, ref origin, radius, ref leftVector, ref upVector);
CreateBillboard(billboard, ref quad, material, ref color, ref origin, softParticleDistanceScale);
}