示例#1
0
 public override LocationMark3D addLocationMark(int resultFrameNo, LocationMark3D added)
 {
     if (added is RigLocationMark3D)
     {
         var addedRigFigure = (added as RigLocationMark3D).rigFigure;
         return new RigLocationMark3D(resultFrameNo,
             new RigFigure<Point3>((rigFigure as RigFigure<Point3>).rigJoints.ToDictionary(
                 k => k.Key, k => k.Value.scalePoint(1, addedRigFigure.rigJoints[k.Key]
          )), rigFigure.rigBones));
     }
     else
     {
         throw new ArgumentException(" Adding location mark needs to be of the same type !");
     }
 }
示例#2
0
        public override LocationMark3D addLocationMark(int resultFrameNo, LocationMark3D added)
        {
            var addedFaces = (added as GlyphBoxLocationMark3D).faces;

            if (faces.Count != addedFaces.Count)
                throw new ArgumentException(" Glyph box location mark to add needs to have the same number of faces!");

            for (int i = 0; i < faces.Count; i++)
            {
                if (!faces[i].Equals(addedFaces[i]))
                    throw new ArgumentException(" Glyph box location mark to add needs to have the same faces!");
            }

            if (added is GlyphBoxLocationMark3D)
            {
                var addedPolygons = (added as GlyphBoxLocationMark3D).boundingPolygons;
                var newBoundingPolygon = boundingPolygons.
                Zip(addedPolygons, (firstBound, secondBound) => firstBound.Zip(secondBound, (first, second) => first.scalePoint(1, second)).ToList()).ToList();
                return new GlyphBoxLocationMark3D(resultFrameNo, glyphSize, newBoundingPolygon, faces);
            }
            else
            {
                throw new ArgumentException(" Adding location mark needs to be of the same type !");
            }
        }
示例#3
0
文件: Object.cs 项目: tuandnvn/ecat
 public void set3DBounding(int frameNumber, LocationMark3D locationMark)
 {
     if (this.object3DMarks == null)
     {
         this.object3DMarks = new SortedList<int, LocationMark3D>();
     }
     object3DMarks[frameNumber] = locationMark;
 }
示例#4
0
 public virtual LocationMark3D addLocationMark(int resultFrameNo, LocationMark3D added)
 {
     return null;
 }