mirror of
https://github.com/opencv/opencv.git
synced 2026-07-27 22:33:03 +04:00
59218f9edd
Geometry module #29175 OpenCV Contrib: https://github.com/opencv/opencv_contrib/pull/4129 CI changes: https://github.com/opencv/ci-gha-workflow/pull/313 Continues - https://github.com/opencv/opencv/pull/28804 - https://github.com/opencv/opencv/pull/29101 - https://github.com/opencv/opencv/pull/29108 - https://github.com/opencv/opencv/pull/28810 Todo for followup PRs: - [x] Rename doxygen groups - [x] Fix JS modules layout and whitelists - [ ] Sort tutorials code/snippets ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
24 lines
574 B
Swift
24 lines
574 B
Swift
//
|
|
// Subdiv2DTest.swift
|
|
//
|
|
// Created by Giles Payne on 2020/02/10.
|
|
//
|
|
|
|
import XCTest
|
|
import OpenCV
|
|
|
|
class Subdiv2DTest: OpenCVTestCase {
|
|
|
|
func testGetTriangleList() {
|
|
let s2d = Subdiv2D(rect: Rect(x: 0, y: 0, width: 50, height: 50))
|
|
s2d.insert(pt: Point2f(x: 10, y: 10))
|
|
s2d.insert(pt: Point2f(x: 20, y: 10))
|
|
s2d.insert(pt: Point2f(x: 20, y: 20))
|
|
s2d.insert(pt: Point2f(x: 10, y: 20))
|
|
var triangles = [Float6]()
|
|
s2d.getTriangleList(triangleList: &triangles)
|
|
XCTAssertEqual(2, triangles.count)
|
|
}
|
|
|
|
}
|