コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultMesh"/> class.
        /// </summary>

        public TBNMesh(DefaultMesh mesh)
        {
            Position.AddRange(mesh.Position);
            Normal.AddRange(mesh.Normal);
            TexCoord.AddRange(mesh.TexCoord);
            IDs.AddRange(mesh.IDs);

            Tangent   = AddAttribute <Vector3>(TangentName);
            Bitangent = AddAttribute <Vector3>(BitangentName);
            CalcTangentsAndBitangents();
        }
コード例 #2
0
        private void InitTagPositions()
        {
            Log.InfoStart("InitTagPositions");
            Tag tag1 = new Tag()
            {
                Name = "标签1", Code = "0002"
            };
            Tag tag2 = new Tag()
            {
                Name = "标签2", Code = "0003"
            };
            Tag tag3 = new Tag()
            {
                Name = "标签3", Code = "0004"
            };
            Tag tag4 = new Tag()
            {
                Name = "标签4", Code = "0005"
            };
            Tag tag5 = new Tag()
            {
                Name = "标签5", Code = "0006"
            };
            Tag tag6 = new Tag()
            {
                Name = "标签6", Code = "0007"
            };
            Tag tag7 = new Tag()
            {
                Name = "标签7", Code = "0008"
            };
            Tag tag8 = new Tag()
            {
                Name = "标签8", Code = "0009"
            };
            List <Tag> tags = new List <Tag>()
            {
                tag1, tag2, tag3, tag4, tag5, tag6, tag7, tag8
            };

            Tags.AddRange(tags);


            //TagPosition tagposition1 = new TagPosition() { Tag = "0002", X = -50, Y = -50, Z = -50, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0" };
            //TagPosition tagposition2 = new TagPosition() { Tag = "0003", X = -50, Y = -50, Z = -50, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0" };
            TagPosition tagposition1 = new TagPosition()
            {
                Tag = "0002", X = 2293.5, Y = 2, Z = 1715.5F, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            TagPosition tagposition2 = new TagPosition()
            {
                Tag = "0003", X = 2294.5, Y = 2, Z = 1715.5f, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            TagPosition tagposition3 = new TagPosition()
            {
                Tag = "0004", X = 2295.5, Y = 2, Z = 1715.5F, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            TagPosition tagposition4 = new TagPosition()
            {
                Tag = "0005", X = 2296.5, Y = 2, Z = 1715.5f, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            TagPosition tagposition5 = new TagPosition()
            {
                Tag = "0006", X = 2297.5, Y = 2, Z = 1715.5F, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            TagPosition tagposition6 = new TagPosition()
            {
                Tag = "0007", X = 2298.5, Y = 2, Z = 1715.5F, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            TagPosition tagposition7 = new TagPosition()
            {
                Tag = "0008", X = 2299.5, Y = 2, Z = 1715.5f, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            TagPosition tagposition8 = new TagPosition()
            {
                Tag = "0009", X = 2300.5, Y = 2, Z = 1715.5F, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };

            List <TagPosition> tagpositions = new List <TagPosition>()
            {
                tagposition1, tagposition2, tagposition3, tagposition4, tagposition5, tagposition6, tagposition7, tagposition8
            };

            TagPositions.AddRange(tagpositions);

            Position position1 = new Position()
            {
                Tag = "002", X = -50, Y = -50, Z = -50, Time = 1527754678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position2 = new Position()
            {
                Tag = "002", X = 0, Y = 0, Z = 0, Time = 1527756478, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position3 = new Position()
            {
                Tag = "002", X = 50, Y = 50, Z = 50, Time = 1527758278, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position4 = new Position()
            {
                Tag = "002", X = 100, Y = 100, Z = 100, Time = 1527760078, Power = 0, Number = 0, Flag = "0:0:0:0:1"
            };
            Position position5 = new Position()
            {
                Tag = "002", X = 150, Y = 150, Z = 150, Time = 1527761878, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position6 = new Position()
            {
                Tag = "002", X = 200, Y = 200, Z = 200, Time = 1527763678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position7 = new Position()
            {
                Tag = "002", X = 250, Y = 250, Z = 250, Time = 1527765478, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position8 = new Position()
            {
                Tag = "002", X = 300, Y = 300, Z = 300, Time = 1527767278, Power = 0, Number = 0, Flag = "0:0:0:0:1"
            };
            Position position9 = new Position()
            {
                Tag = "002", X = 350, Y = 350, Z = 350, Time = 1527769078, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position10 = new Position()
            {
                Tag = "002", X = 400, Y = 400, Z = 400, Time = 1527770878, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position11 = new Position()
            {
                Tag = "002", X = 500, Y = 500, Z = 450, Time = 1527772678, Power = 0, Number = 0, Flag = "0:0:0:0:1"
            };
            Position position12 = new Position()
            {
                Tag = "002", X = 600, Y = 600, Z = 500, Time = 1527774478, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position13 = new Position()
            {
                Tag = "002", X = 700, Y = 700, Z = 550, Time = 1527776278, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position14 = new Position()
            {
                Tag = "002", X = 800, Y = 800, Z = 600, Time = 1527778078, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position15 = new Position()
            {
                Tag = "002", X = 900, Y = 900, Z = 650, Time = 1527779878, Power = 0, Number = 0, Flag = "0:0:0:0:1"
            };
            Position position16 = new Position()
            {
                Tag = "002", X = 1100, Y = 1100, Z = 700, Time = 1527781678, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position17 = new Position()
            {
                Tag = "002", X = 1200, Y = 1200, Z = 750, Time = 1527783478, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position18 = new Position()
            {
                Tag = "002", X = 1300, Y = 1300, Z = 800, Time = 1527785278, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position19 = new Position()
            {
                Tag = "002", X = 1400, Y = 1400, Z = 850, Time = 1527787078, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            Position position20 = new Position()
            {
                Tag = "002", X = 1500, Y = 1500, Z = 900, Time = 1527788878, Power = 0, Number = 0, Flag = "0:0:0:0:0"
            };
            List <Position> positions = new List <Position>()
            {
                position1, position2, position3, position4, position5, position6, position7, position8, position9, position10, position11, position12, position13, position14, position15, position16, position17, position18, position19, position20
            };

            Position.AddRange(positions);
            Log.InfoEnd("InitTagPositions");
        }