当前位置: 首页>>代码示例>>C#>>正文


C# Matrix3.MakeFromRPY方法代码示例

本文整理汇总了C#中Matrix3.MakeFromRPY方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix3.MakeFromRPY方法的具体用法?C# Matrix3.MakeFromRPY怎么用?C# Matrix3.MakeFromRPY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Matrix3的用法示例。


在下文中一共展示了Matrix3.MakeFromRPY方法的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))
         {
//.........这里部分代码省略.........
开发者ID:dom767,项目名称:woofractal,代码行数:101,代码来源:WooState.cs


注:本文中的Matrix3.MakeFromRPY方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。