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 !"); } }
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 !"); } }
public void set3DBounding(int frameNumber, LocationMark3D locationMark) { if (this.object3DMarks == null) { this.object3DMarks = new SortedList<int, LocationMark3D>(); } object3DMarks[frameNumber] = locationMark; }
public virtual LocationMark3D addLocationMark(int resultFrameNo, LocationMark3D added) { return null; }