// TODO: replace with types exported from the sdk when created
import { UuidTool } from 'uuid-tool';
import { createGeometryFromFrame } from './geometry';
import { createPoseFromFrame } from './transform';
export const createFrame = (geometry) => {
    return {
        parent: 'world',
        translation: { x: 0, y: 0, z: 0 },
        orientation: {
            type: 'ov_degrees',
            value: { x: 0, y: 0, z: 1, th: 0 },
        },
        geometry: (geometry ?? { type: 'box', x: 100, y: 100, z: 100 }),
    };
};
export const createTransformFromFrame = (name, frame) => {
    return {
        uuid: new Uint8Array(UuidTool.toBytes(UuidTool.newUuid())),
        referenceFrame: name,
        poseInObserverFrame: {
            referenceFrame: frame.parent ?? 'world',
            pose: createPoseFromFrame(frame),
        },
        physicalObject: createGeometryFromFrame(frame),
    };
};
