Пример #1
0
 public void InjectAllGrabStrengthIndicator(IHandGrabber handGrab, IInteractor interactor,
                                            MaterialPropertyBlockEditor handMaterialPropertyBlockEditor)
 {
     InjectHandGrab(handGrab);
     InjectInteractor(interactor);
     InjectHandMaterialPropertyBlockEditor(handMaterialPropertyBlockEditor);
 }
Пример #2
0
        private void UpdateMaterialPropertyBlock()
        {
            if (_editor == null)
            {
                _editor = GetComponent <MaterialPropertyBlockEditor>();
                if (_editor == null)
                {
                    return;
                }
            }

            MaterialPropertyBlock block = _editor.MaterialPropertyBlock;

            block.SetColor(_colorShaderID, _color);
            block.SetColor(_borderColorShaderID, _borderColor);
            block.SetVector(_radiiShaderID,
                            new Vector4(
                                _radiusTopRight,
                                _radiusBottomRight,
                                _radiusTopLeft,
                                _radiusBottomLeft
                                ));
            block.SetVector(_dimensionsShaderID,
                            new Vector4(
                                transform.localScale.x,
                                transform.localScale.y,
                                _borderInnerRadius,
                                _borderOuterRadius
                                ));

            _editor.UpdateMaterialPropertyBlock();
        }
Пример #3
0
 public void InjectAllControllerRayVisual(RayInteractor rayInteractor,
                                          Renderer renderer,
                                          MaterialPropertyBlockEditor materialPropertyBlockEditor)
 {
     InjectRayInteractor(rayInteractor);
     InjectRenderer(renderer);
     InjectMaterialPropertyBlockEditor(materialPropertyBlockEditor);
 }
Пример #4
0
 public void InjectOptionalMaterialPropertyBlockEditor(MaterialPropertyBlockEditor editor)
 {
     _handMaterialPropertyBlockEditor = editor;
 }
Пример #5
0
 public void InjectMaterialPropertyBlockEditor(MaterialPropertyBlockEditor editor)
 {
     _materialPropertyBlockEditor = editor;
 }
Пример #6
0
 public void InjectAllDotGridProperties(MaterialPropertyBlockEditor editor)
 {
     InjectMaterialPropertyBlockEditor(editor);
 }
Пример #7
0
 public void InjectAllInteractableColorVisual(IInteractableView interactableView,
                                              MaterialPropertyBlockEditor editor)
 {
     InjectInteractableView(interactableView);
     InjectMaterialPropertyBlockEditor(editor);
 }
Пример #8
0
 public void InjectHandMaterialPropertyBlockEditor(MaterialPropertyBlockEditor handMaterialPropertyBlockEditor)
 {
     _handMaterialPropertyBlockEditor = handMaterialPropertyBlockEditor;
 }