本文整理汇总了C#中Matrix3.Mul方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix3.Mul方法的具体用法?C# Matrix3.Mul怎么用?C# Matrix3.Mul使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix3
的用法示例。
在下文中一共展示了Matrix3.Mul方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetValue3arg
private void SetValue3arg(string target, double value, bool overrideState)
{
int dotindex = target.IndexOf('.');
if (dotindex >= 0)
{
// target is a vector
string varname = target.Substring(0, dotindex);
string selector = target.Substring(dotindex + 1);
if (varname.Equals("pos", StringComparison.Ordinal))
SetValueInternal(_Position, varname, selector, value, overrideState);
else if (varname.Equals("scale", StringComparison.Ordinal))
SetValueInternal(_Scale, varname, selector, value, overrideState);
else if (varname.Equals("diff", StringComparison.Ordinal))
SetValueInternal(new Vector3(_Diff), varname, selector, value, overrideState);
else if (varname.Equals("refl", StringComparison.Ordinal))
SetValueInternal(new Vector3(_Refl), varname, selector, value, overrideState);
else if (varname.Equals("emi", StringComparison.Ordinal))
SetValueInternal(new Vector3(_Emi), varname, selector, value, overrideState);
else if (varname.Equals("spec", StringComparison.Ordinal))
SetValueInternal(new Vector3(_Spec), varname, selector, value, overrideState);
else if (varname.Equals("abs", StringComparison.Ordinal))
SetValueInternal(new Vector3(_Abs), varname, selector, value, overrideState);
else if (varname.Equals("v0", StringComparison.Ordinal))
SetValueInternal(new Vector3(_v0), varname, selector, value, overrideState);
else if (varname.Equals("v1", StringComparison.Ordinal))
SetValueInternal(new Vector3(_v1), varname, selector, value, overrideState);
else if (varname.Equals("v2", StringComparison.Ordinal))
SetValueInternal(new Vector3(_v2), varname, selector, value, overrideState);
else if (varname.Equals("v3", StringComparison.Ordinal))
SetValueInternal(new Vector3(_v3), varname, selector, value, overrideState);
else if (varname.Equals("distanceoffset", StringComparison.Ordinal))
SetValueInternal(new Vector3(_DistanceOffset), varname, selector, value, overrideState);
else if (varname.Equals("distanceextents", StringComparison.Ordinal))
SetValueInternal(new Vector3(_DistanceExtents), varname, selector, value, overrideState);
else if (IsVectorVariable(varname))
SetValueInternal(GetVectorValue(varname), varname, selector, value, overrideState);
}
else
{
if (target.Equals("rx", StringComparison.Ordinal))
{
double delta = value - _rX;
_rX = value;
Matrix3 rotMatrix = new Matrix3();
rotMatrix.MakeFromRPY(delta * 2 * 3.141592 / 360, 0, 0);
rotMatrix.Mul(_Rotation);
_Rotation = rotMatrix;
}
if (target.Equals("ry", StringComparison.Ordinal))
{
double delta = value - _rY;
_rY = value;
Matrix3 rotMatrix = new Matrix3();
rotMatrix.MakeFromRPY(0, delta * 2 * 3.141592 / 360, 0);
rotMatrix.Mul(_Rotation);
_Rotation = rotMatrix;
}
if (target.Equals("rz", StringComparison.Ordinal))
{
double delta = value - _rZ;
_rZ = value;
Matrix3 rotMatrix = new Matrix3();
rotMatrix.MakeFromRPY(0, 0, delta * 2 * 3.141592 / 360);
rotMatrix.Mul(_Rotation);
_Rotation = rotMatrix;
}
if (target.Equals("power", StringComparison.Ordinal))
{
_Power = value;
}
if (target.Equals("gloss", StringComparison.Ordinal))
{
_Gloss = value;
}
if (target.Equals("opacity", StringComparison.Ordinal))
{
_Opacity = value;
}
if (target.Equals("density", StringComparison.Ordinal))
{
_Density = value;
}
if (target.Equals("tintdensity", StringComparison.Ordinal))
{
_TintDensity = value;
}
if (target.Equals("refractiveindex", StringComparison.Ordinal))
{
_RefractiveIndex = value;
}
if (target.Equals("recursions", StringComparison.Ordinal))
{
_Recursions = (int)(value + 0.5);
}
if (target.Equals("objects", StringComparison.Ordinal))
{
_Objects = (int)(value + 0.5);
}
if (target.Equals("mengeriterations", StringComparison.Ordinal))
{
//.........这里部分代码省略.........