Exemplo n.º 1
0
        public BVHBone(BVHBone Parent, string Name, int nrChannels, TransAxis Axis, bool IsKinectJoint, int dex)
        {
            parent        = Parent;
            index         = dex;
            name          = Name;
            isKinectJoint = IsKinectJoint;
            axis          = Axis;
            if (parent != null)
            {
                depth = parent.Depth + 1;
            }
            else
            {
                depth = 0;
                root  = true;
            }
            channels = new BVHChannel[nrChannels];
            int ind = 5;

            for (int k = nrChannels - 1; k >= 0; k--)
            {
                channels[k] = (BVHChannel)ind;
                ind--;
            }
        }
Exemplo n.º 2
0
        bool isKinectJoint; //Флаг является ли элемент частью скелетного потока

        /// <summary>
        /// Конструктор класса
        /// </summary>
        /// <param name="Parent">Родительский элемент того же типа</param>
        /// <param name="Name">Имя элемента</param>
        /// <param name="nrChannels">Номер каналов (Либо транляция, либо ротация)</param>
        /// <param name="Axis">Предположительно направление элемента в осях Kinect</param>
        /// <param name="IsKinectJoint">Флаг, является ли элементом потока Kinect</param>
        public BVHBone(BVHBone Parent, string Name, int nrChannels, TransAxis Axis, bool IsKinectJoint)
        {
            this.parent        = Parent;        //Устанавливаем ссылку на родительскую кость
            BVHBone.index     += BVHBone.index; //Увеличиваем счетчик костей в скелете
            this.name          = Name;          //Имя кости
            this.isKinectJoint = IsKinectJoint;

            this.axis = Axis;

            if (parent != null)                     // Если есть родитеьская кость
            {
                this.depth = this.parent.Depth + 1; //Увеличиваем глубины текущей кости
            }
            else
            {
                depth = 0;
                root  = true; //Эта кость является корневой
            }

            this.channels = new BVHChannel[nrChannels]; //Выделяется количество степеней свободы кости
            int ind = 5;

            for (int k = nrChannels - 1; k >= 0; k--)
            {
                this.channels[k] = (BVHChannel)ind;
                ind--;
            }
        }
Exemplo n.º 3
0
Arquivo: BVH.cs Projeto: vlusslus/BVHC
        private bool root; //Признак корневой кости

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Конструктор класса
        /// </summary>
        /// <param name="Parent">Родительский элемент того же типа</param>
        /// <param name="Name">Имя элемента</param>
        /// <param name="nrChannels">Номер каналов (Либо транляция, либо ротация)</param>
        /// <param name="Axis">Предположительно направление элемента в осях Kinect</param>
        /// <param name="IsKinectJoint">Флаг, является ли элементом потока Kinect</param>
        public BVHBone(BVHBone Parent, string Name, int nrChannels, TransAxis Axis, bool IsKinectJoint)
        {
            this.parent = Parent;   //Устанавливаем ссылку на родительскую кость
            BVHBone.index += BVHBone.index;     //Увеличиваем счетчик костей в скелете
            this.name = Name;   //Имя кости
            this.isKinectJoint = IsKinectJoint;

            this.axis = Axis;

            if (parent != null) // Если есть родитеьская кость
            {
                this.depth = this.parent.Depth + 1; //Увеличиваем глубины текущей кости
            }
            else
            {
                depth = 0;
                root = true; //Эта кость является корневой
            }

            this.channels = new BVHChannel[nrChannels]; //Выделяется количество степеней свободы кости
            int ind = 5;
            for (int k = nrChannels - 1; k >= 0; k--)
            {
                this.channels[k] = (BVHChannel)ind;
                ind--;
            }
        }
Exemplo n.º 4
0
 public JointNode(NodeTypeEnum type, JointType index, JointNode parent, TransAxis axis)
 {
     this.JointIndex = index;
     this.Type = type;
     if (NodeTypeEnum.END != Type)
         Children = new ArrayList();
     this.Parent = parent;
     if(parent != null)
         parent.AddChild(this);
     this.Axis = axis;
 }
Exemplo n.º 5
0
 public JointNode(NodeTypeEnum type, JointType index, JointNode parent, TransAxis axis)
 {
     this.JointIndex = index;
     this.Type       = type;
     if (NodeTypeEnum.END != Type)
     {
         Children = new ArrayList();
     }
     this.Parent = parent;
     if (parent != null)
     {
         parent.AddChild(this);
     }
     this.Axis = axis;
 }
Exemplo n.º 6
0
 public NGEBone(NGEBone Parent, string Name, int nrChannels, TransAxis Axis, bool IsKinectJoint)
 {
     parent = Parent;
     index += index;
     name = Name;
     isKinectJoint = IsKinectJoint;
     axis = Axis;
     if (parent != null)
         depth = parent.Depth + 1;
     else
     {
         depth = 0;
         root = true;
     }
     channels = new NGEChannel[nrChannels];
     int ind = 5;
     for (int k = nrChannels-1; k >= 0; k--)
     {
         channels[k] = (NGEChannel)ind;
         ind--;
     }
 }
Exemplo n.º 7
0
 public JointNode(JointType index, JointNode parent, TransAxis axis) :
     this(NodeTypeEnum.JOINT, index, parent, axis)
 {
 }
Exemplo n.º 8
0
 public JointNode(JointType index, JointNode parent, TransAxis axis)
     : this(NodeTypeEnum.JOINT, index, parent, axis)
 {
 }