Example #1
0
        public RotationMatrixRow this[Int32 row]
        {
            get {
            switch (row) {
              case 0:
            return this.m_0;

              case 1:
            return this.m_1;

              case 2:
            return this.m_2;

              default:
            throw new ArgumentOutOfRangeException();
            }
              }
              set {
            switch (row) {
              case 0:
            this.m_0 = value;
            break;

              case 1:
            this.m_1 = value;
            break;

              case 2:
            this.m_2 = value;
            break;

              default:
            throw new ArgumentOutOfRangeException();
            }
              }
        }
Example #2
0
 public RotationMatrix(Single[][] value)
 {
     if ((value.Length <= 0) || (value.Length > 3)) {
     throw new ArgumentOutOfRangeException();
       } else {
     if ((value[0].Length <= 0) || (value[0].Length > 3) || (value[1].Length <= 0) || (value[1].Length > 3) || (value[2].Length <= 0) || (value[2].Length > 3)) {
       throw new ArgumentOutOfRangeException();
     } else {
       this.m_0 = new RotationMatrixRow(value[0]);
       this.m_1 = new RotationMatrixRow(value[1]);
       this.m_2 = new RotationMatrixRow(value[2]);
     }
       }
 }