Пример #1
0
    public override void CreateMesh(EyeName eye)
    {
        Eye = eye;
        MeshRenderer mr = GetComponent <MeshRenderer> ();

        if (mr == null)
        {
            _internalCreateMesh(eye);
        }
        else
        {
            CameraPostRenderer r = DisplayCamera.GetComponent <CameraPostRenderer>();
            if (r == null)
            {
                r = DisplayCamera.gameObject.AddComponent <CameraPostRenderer>();
            }
            r.AddRenderer(this);
            _RenderPlane = gameObject;
            mr.material  = Mat;
        }

        /*if (eye == EyeName.LeftEye)
         *      _RenderPlane.transform.localPosition = new Vector3 (-0.03f, 0, 0);
         * else
         *      _RenderPlane.transform.localPosition = new Vector3 (0.03f, 0, 0);*/
    }
Пример #2
0
    void OnDestroy()
    {
        //	Destroy (_RenderPlane);
        CameraPostRenderer r = DisplayCamera.GetComponent <CameraPostRenderer>();

        if (r != null)
        {
            r.RemoveRenderer(this);
        }
    }
Пример #3
0
    public override void CreateMesh(EyeName eye)
    {
        Eye = eye;

        CameraPostRenderer r = DisplayCamera.GetComponent <CameraPostRenderer>();

        if (r == null)
        {
            r = DisplayCamera.gameObject.AddComponent <CameraPostRenderer>();
        }
        r.AddRenderer(this);
        _RenderPlane = gameObject;

        Receiver.OnFrameBlitted += OnImageArrived;
    }
Пример #4
0
    public override void CreateMesh(EyeName eye)
    {
        Eye            = eye;
        Image.material = Mat;

        CameraPostRenderer r = DisplayCamera.GetComponent <CameraPostRenderer>();

        if (r == null)
        {
            r = DisplayCamera.gameObject.AddComponent <CameraPostRenderer>();
        }
        r.AddRenderer(this);
        _RenderPlane = gameObject;
        Enable();
    }
Пример #5
0
    public override void CreateMesh(EyeName eye)
    {
        Eye = eye;
        MeshRenderer mr = GetComponent <MeshRenderer> ();

        if (mr == null)
        {
            _internalCreateMesh(eye);
        }
        else
        {
            CameraPostRenderer r = DisplayCamera.GetComponent <CameraPostRenderer>();
            if (r == null)
            {
                r = DisplayCamera.gameObject.AddComponent <CameraPostRenderer>();
            }
            r.AddRenderer(this);
            _RenderPlane = gameObject;
            mr.material  = Mat;
        }
    }
Пример #6
0
    public override void CreateMesh(EyeName eye)
    {
        Eye = eye;
        MeshRenderer mr = GetComponent <MeshRenderer> ();

        if (mr == null)
        {
            mr = _internalCreateMesh(eye);
        }

        if (mr != null)
        {
            mr.material = Mat;
        }

        _postRenderer = DisplayCamera.GetComponent <CameraPostRenderer>();
        if (_postRenderer == null)
        {
            _postRenderer = DisplayCamera.gameObject.AddComponent <CameraPostRenderer>();
        }
        _postRenderer.AddRenderer(this);
        Enable();
    }