本文整理汇总了C#中Scientrace.toVector方法的典型用法代码示例。如果您正苦于以下问题:C# Scientrace.toVector方法的具体用法?C# Scientrace.toVector怎么用?C# Scientrace.toVector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scientrace
的用法示例。
在下文中一共展示了Scientrace.toVector方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: constructPlaneNodeLoc
public Scientrace.Location constructPlaneNodeLoc(Scientrace.Location planeCenter, double radius,
double angle, Scientrace.NonzeroVector baseVec1, Scientrace.NonzeroVector baseVec2)
{
Scientrace.Vector ix = baseVec1.toVector()*radius*Math.Sin(angle);
Scientrace.Vector iy = baseVec2.toVector()*radius*Math.Cos(angle);
return planeCenter+ix+iy;
}
示例2: ParallelSquareLightSource
public ParallelSquareLightSource(Scientrace.Object3dEnvironment env, Scientrace.Location cloc, Scientrace.UnitVector direction, Scientrace.NonzeroVector u, Scientrace.NonzeroVector v, int ucount, int vcount, double wavelength)
: base(env)
{
Scientrace.Location loc = (cloc - ((u*(ucount-1)*0.5)+(v*(vcount-1)*0.5))).toLocation();
for (int iu = 0; iu < ucount; iu++) {
for (int iv = 0; iv < vcount; iv++) {
//Console.WriteLine("New line at "+(loc+((u.toVector()*iu)+(v.toVector()*iv)).toLocation()).trico());
Scientrace.Line line = new Scientrace.Line(loc+((u.toVector()*iu)+(v.toVector()*iv)).toLocation(), direction);
this.addTrace(new Scientrace.Trace(wavelength, this, line, env,1,1));
}
}
}
示例3: transformback
public Scientrace.Location transformback(Scientrace.Location loc)
{
return this.transformback(loc.toVector()).toLocation();
}