Ejemplo n.º 1
0
        protected override void Init()
        {
            base.Init();

            position = new double[] { 0, 0, 0 };
            scale    = new ExpressionD("1");
            trans    = new VectorExpr(new string[] { "0", "0", "0" });
            color    = new VectorExpr(new string[] { "1", "0", "1", "0" });
            origin   = new VectorExpr(new string[] { "0", "0", "0" });
            rot      = new VectorExpr(new string[] { "0", "0", "0" });
        }
Ejemplo n.º 2
0
        public override void SetAttributes(Dictionary <string, string> args)
        {
            base.SetAttributes(args);

            #region Set Rotational Values
            if (args.ContainsKey("rotation"))
            {
                rot = new VectorExpr(new string[] {
                    args["rotation"], args["rotation"], args["rotation"]
                });
            }

            if (args.ContainsKey("xrotation"))
            {
                rot.SetExprAt(0, args["xrotation"]);
            }

            if (args.ContainsKey("yrotation"))
            {
                rot.SetExprAt(1, args["yrotation"]);
            }

            if (args.ContainsKey("zrotation"))
            {
                rot.SetExprAt(2, args["zrotation"]);
            }
            #endregion

            #region Set Color Values
            if (args.ContainsKey("color"))
            {
                color = new VectorExpr(new string[] {
                    args["color"], args["color"], args["color"], args["color"]
                });
            }

            if (args.ContainsKey("rcolor"))
            {
                color.SetExprAt(0, args["rcolor"]);
            }

            if (args.ContainsKey("gcolor"))
            {
                color.SetExprAt(1, args["gcolor"]);
            }

            if (args.ContainsKey("bcolor"))
            {
                color.SetExprAt(2, args["bcolor"]);
            }

            if (args.ContainsKey("acolor"))
            {
                color.SetExprAt(3, args["acolor"]);
            }
            #endregion

            if (args.ContainsKey("scale"))
            {
                scale = new ExpressionD(args["scale"]);
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="vec"></param>
 public void SetTranslation(VectorExpr vec)
 {
     trans = vec;
 }
Ejemplo n.º 4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="origin"></param>
 public void SetOrigin(VectorExpr origin)
 {
     this.origin = origin;
 }