-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple "framed object" and "light source". #217
Comments
In the above commits, I did a bit of cleanup and made some simpler changes before diving into the major changes. |
…uce "scenes" (rulers and labels disabled) #217
Major changes in the above commit. Framed objects and light sources are now mostly decoupled. And I've introduced the "scenes" that I discussed with @arouinfar last week. This work is not complete, but this felt like a good check point to commit. NOTE that a few features are temporarily out-of-service:
Here's my high-level TODO list:
|
This work is done. The bits of duplication will be addressed after the Arrows scene is added in #228. |
Framed objects and light sources are currently combined into one "representation", differentiated by the
isObject
field of Representation. This "combining" is carried through the implementation of the model and the view.Disadvantages:
A bunch of
isObject
tests are required througout the code, with different code paths for Object vs Light Source. This is not very object-oriented, complicates the model and view, and makes it difficult to address issues like Second light source can be dragged to the right of the lens. #58.SourceObject and SourceObjectNode handle the model and view respectively for Objects and the first light source.
SecondSource and SecondSourceNode handle the model and view respectively for the 2nd point of interest on the Object, and the second light source. This makes it very difficult for the first and second light sources to share implementation and behavior, for example Second light source can be dragged to the right of the lens. #58.
It's difficult to add additional representations. For example, it will be difficult (impossible?) to support the classic "arrow" representation for the Object , like this example from Wikipedia:
In this representation, the arrow's tail is anchored to the optical axis. The arrow can be resized and translated along the optical axis. This representation has come up several time in design meetings.
For the longterm, it would be best to decouple "object" and "light source", in a way that supports other Object representations like "arrow", and allows light sources (first and second) to share the same implementation. This will be a big task, and will be destabilizing.
The text was updated successfully, but these errors were encountered: