Exemplo n.º 1
0
    public void Init(CamPoseModel camPosModel)
    {
        this.camPosModel   = camPosModel;
        idText.text        = camPosModel.id;
        transform.position = camPosModel.position;
        Vector3 pivot = button.transform.localRotation.eulerAngles;

        button.transform.localRotation = Quaternion.Euler(pivot.x, pivot.y, camPosModel.rotation.z);
    }
Exemplo n.º 2
0
 public void Init(CamPoseModel camPosModel)
 {
     this.camPosModel   = camPosModel;
     idField.text       = camPosModel.id;
     posXField.text     = camPosModel.position.x.ToString();
     posYField.text     = camPosModel.position.y.ToString();
     posZField.text     = camPosModel.position.z.ToString();
     rotationField.text = camPosModel.rotation.z.ToString();
 }
    private void OnButtonOkClick()
    {
        foreach (Transform item in pointContainer)
        {
            PosRendererElement posRenderer = item.GetComponent <PosRendererElement>();
            CamPoseModel       camPose     = GetCamPoseModel(videoSourceModel.points, posRenderer.GetId());
            if (camPose == null)
            {
                continue;
            }

            camPose.position = posRenderer.GetPosition();
            camPose.rotation = posRenderer.GetRotation();
        }

        camPosPanel.SetActive(false);
    }