RitheshKumar/VoCopter-Project

Obstacle Component File

Closed this issue · 1 comments

Obstacle Component file has 2 classes:

  1. ObstacleCreate() --> to translate midi values to height and width coordinate values
  2. 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.

Wrote a new class called NuObstacleComponent:

  1. Does not inherit from miditranslation: instead, there is now a class called midiStorage, whose object is instantiated;
  2. getMidiData() function is used to get the current midi value
  3. The constructor gets the file path for the midiStorage class
  4. The window shifting is done in mainComponent, rather than within this class