realitycollective / com.realitytoolkit.core

The all-purpose framework for building the next reality
MIT License
3 stars 0 forks source link

Introduce IInteractorVisualizer and implement foundation for separating visualization from interactor logic #132

Closed FejZa closed 1 week ago

FejZa commented 1 week ago

Reality Collective - Reality Toolkit Pull Request

Overview

Right now interactor visualization is very convoluted and even goes as far as that the visualization impacts how the interactor works. The goal is to completely separate an interactors visualization layer from the interactor itself. The visualization should only use whatever data the interactor provides to visualize for the user what is happening.

As a first step IInteractorVisualizer and BaseInteractorVisualizer have been introduced. Also the FarInteractor is now a pure interactor whereas its "line visualization" is performed by the LineInteractorVisualization, which is now the default implementation and way of visualizing far interactors.

This gives user a new and flexible way of implementing their own kinds of ray visualization without having to worry about changing the actual interactor code.