本文整理汇总了C#中ParameterSet.GetVector3方法的典型用法代码示例。如果您正苦于以下问题:C# ParameterSet.GetVector3方法的具体用法?C# ParameterSet.GetVector3怎么用?C# ParameterSet.GetVector3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParameterSet
的用法示例。
在下文中一共展示了ParameterSet.GetVector3方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseParmSet
public static new void ParseParmSet(ref ParameterSet actorParm, ref ParameterSet worldParm)
{
if (worldParm.HasParm("Strength"))
actorParm.AddParm("Strength", worldParm.GetFloat("Strength"));
if (worldParm.HasParm("Direction"))
actorParm.AddParm("Direction", worldParm.GetVector3("Direction"));
}
示例2: ParseParmSet
public static new void ParseParmSet(ref ParameterSet actorParm, ref ParameterSet worldParm)
{
System.Diagnostics.Debug.Assert(worldParm.HasParm("NewDir"), "Rotate Camera requires a new direction!");
actorParm.AddParm("NewDir", worldParm.GetVector3("NewDir"));
if (worldParm.HasParm("RotateRight"))
actorParm.AddParm("RotateRight", worldParm.GetBool("RotateRight"));
if(worldParm.HasParm("RotationTime"))
actorParm.AddParm("RotationTime", worldParm.GetFloat("RotationTime"));
}
示例3: PostLoadInit
public override void PostLoadInit(ParameterSet Parm)
{
int index = 0;
while (Parm.HasParm("Light" + index))
{
string keyString = "Light" + index;
string lightType = Parm.GetString(keyString);
switch (lightType)
{
case "Directional":
{
// read directional light parameters and create light
Vector3 direction = Parm.GetVector3(keyString + "Direction");
Vector4 color = Parm.GetVector4(keyString + "Color");
float intensity = Parm.GetFloat(keyString + "Intensity");
directionalLights.Add(new DirectionalLight(direction, color, intensity));
}
break;
case "Spot":
{
Vector3 position = Parm.GetVector3(keyString + "Position");
Vector3 direction = Parm.GetVector3(keyString + "Direction");
Vector4 color = Parm.GetVector4(keyString + "Color");
float intensity = Parm.GetFloat(keyString + "Intensity");
spotLights.Add(new SpotLight(DeferredRenderer.Instance.GraphicsDevice, position, direction, color, intensity, true, 1024, spotCookie));
}
break;
case "Point":
{
Vector3 position = Parm.GetVector3(keyString + "Position");
float radius = Parm.GetFloat(keyString + "Radius");
Vector4 color = Parm.GetVector4(keyString + "Color");
float intensity = Parm.GetFloat(keyString + "Intensity");
pointLights.Add(new PointLight(DeferredRenderer.Instance.GraphicsDevice, position, radius, color, intensity, true, 256));
}
break;
}
index++;
}
}