Obstacle Component File
Closed this issue · 1 comments
RitheshKumar commented
Obstacle Component file has 2 classes:
- ObstacleCreate() --> to translate midi values to height and width coordinate values
- ObstacleComponent() --> the class in which ObstacleCreate is instantiated. This creates a window in which the drawn obstacle is held. This window can be time shifted to create the illusion of moving obstacles
Issues:
In the mainComponent, we must know what the bounds of the obstacles (in coordinates) are , with respect to the copter.
The current design of the obstacle component interface does not allow this in a straightforward manner.
RitheshKumar commented
Wrote a new class called NuObstacleComponent:
- Does not inherit from miditranslation: instead, there is now a class called midiStorage, whose object is instantiated;
- getMidiData() function is used to get the current midi value
- The constructor gets the file path for the midiStorage class
- The window shifting is done in mainComponent, rather than within this class