예제 #1
0
    void Start()
    {
        instance   = this;
        userPoints = new Vector3[4];

        Invoke("UpdateHomography", 0.5f);
    }
예제 #2
0
    public void RotateTexture(bool clockwise)
    {
        var tex = WizardController.instance.RotateTexture(displayImage, clockwise);

        GetComponent <RawImage>().texture        = tex;
        GetComponent <RectTransform>().anchorMin = Vector2.zero;
        GetComponent <RectTransform>().anchorMax = Vector2.one;
        displayImage = tex;
        WizardController.instance.inputTexture = tex;
        GetComponent <ZoomImage>().UpdateRawImageAspect();
        HomographyImage.getInstance().GetTextureFromReference();
        HomographyImage.getInstance().GetComponent <ZoomImage>().UpdateRawImageAspect();
        HomographyImage.getInstance().aspect = HomographyImage.getInstance().GetComponent <ZoomImage>().aspect;
        aspectSlider.value = HomographyImage.getInstance().GetComponent <ZoomImage>().aspect;
    }
예제 #3
0
 private void OnEnable()
 {
     if (!WizardController.instance.inputTexture)
     {
         return;
     }
     displayImage = WizardController.instance.inputTexture;
     GetComponent <RawImage>().texture = displayImage;
     GetComponent <ZoomImage>().UpdateRawImageAspect();
     if (HomographyImage.getInstance())
     {
         HomographyImage.getInstance().GetTextureFromReference();
         HomographyImage.getInstance().GetComponent <ZoomImage>().UpdateRawImageAspect();
         HomographyImage.getInstance().aspect = HomographyImage.getInstance().GetComponent <ZoomImage>().aspect;
         aspectSlider.value = HomographyImage.getInstance().GetComponent <ZoomImage>().aspect;
     }
 }