本文整理汇总了C#中WinterLeaf.Containers.Point3F.vecotrScale方法的典型用法代码示例。如果您正苦于以下问题:C# Point3F.vecotrScale方法的具体用法?C# Point3F.vecotrScale怎么用?C# Point3F.vecotrScale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WinterLeaf.Containers.Point3F
的用法示例。
在下文中一共展示了Point3F.vecotrScale方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShapeBaseTossPatch
public string ShapeBaseTossPatch(coShapeBase thisobj)
{
if (!thisobj.isObject())
return string.Empty;
coItem item = console.Call_Classname("ItemData", "CreateItem", new[] {"HealthKitPatch"});
item["istemp"] = true.AsString();
item["sourceObject"] = thisobj;
item["static"] = false.AsString();
(( coSimSet)"MissionCleanup").pushToBack(item);
Random r = new Random();
Point3F vec = new Point3F(-1 + (float) r.NextDouble()*2, -1*(float) r.NextDouble()*2, (float) r.NextDouble());
vec = vec.vecotrScale(10);
Point3F eye = thisobj.getEyeVector();
float dot = new Point3F("0 0 1 ").vectorDot(eye);
if (dot < 0)
dot = -dot;
vec = vec + new Point3F("0 0 8").vecotrScale(1 - dot);
vec = vec + thisobj.getVelocity();
TransformF pos = new TransformF(thisobj.getWorldBox().minExtents);
item.setTransform(pos);
item.applyImpulse(pos.MPosition, vec);
item.setCollisionTimeout(thisobj);
item.call("schedulePop");
return item;
}
示例2: ShapeBaseTossPatch
public string ShapeBaseTossPatch(string thisobj)
{
if (!console.isObject(thisobj))
return string.Empty;
string item = console.Call_Classname("ItemData", "CreateItem", new[] {"HealthKitPatch"});
console.SetVar(item + ".istemp", true);
//string item = con.Eval("ItemData::CreateItem(HealthKitPatch);", true);
console.SetVar(string.Format("{0}.sourceObject", item), thisobj);
console.SetVar(string.Format("{0}.static", item), false);
SimSet.pushToBack("MissionCleanup", item);
Random r = new Random();
Point3F vec = new Point3F(-1 + (float) r.NextDouble()*2, -1*(float) r.NextDouble()*2, (float) r.NextDouble());
vec = vec.vecotrScale(10);
Point3F eye = ShapeBase.getEyeVector(thisobj);
float dot = new Point3F("0 0 1 ").vectorDot(eye);
if (dot < 0)
dot = -dot;
vec = vec + new Point3F("0 0 8").vecotrScale(1 - dot);
vec = vec + ShapeBase.getVelocity(thisobj);
TransformF pos = new TransformF(SceneObject.getWorldBox(thisobj).minExtents);
SceneObject.setTransform(item, pos);
ShapeBase.applyImpulse(item, pos.MPosition, vec);
Item.setCollisionTimeout(item, thisobj.AsInt());
console.Call(item, "schedulePop");
return item;
}