(overrides: Partial<Camera> = {})
| 50 | } |
| 51 | |
| 52 | export function buildCamera(overrides: Partial<Camera> = {}): Camera { |
| 53 | const width = overrides.width ?? 640; |
| 54 | const height = overrides.height ?? 480; |
| 55 | |
| 56 | return { |
| 57 | cameraId: 1, |
| 58 | modelId: CameraModelId.PINHOLE, |
| 59 | width, |
| 60 | height, |
| 61 | params: [500, 500, width / 2, height / 2], |
| 62 | ...overrides, |
| 63 | }; |
| 64 | } |
| 65 | |
| 66 | export function buildPoint2D(overrides: Partial<Point2D> = {}): Point2D { |
| 67 | return { |
no outgoing calls