Question: Please make in C + + and explain with detail thank you Create a new scene, GravityWellScene, that inherits from the abstract Scene class. Add

Please make in C++ and explain with detail thank you
Create a new scene, GravityWellScene, that inherits from the abstract Scene class.
Add three bodies to this scene: one moving planet and two stationary stars (the texture for these two bodies can be found in the SDL framework texture folder).
The size of the two stars on the screen must be proportional to their mass.
The simulation must start when the button S is pressed and it must stop when the button S is pressed again. In the simulation:
All the bodies must spin around themselves and the spin speed must depend on the body's mass (i.e., the larger the mass, the faster it spins).
The planet must move based on the gravity of the two stars.
Position the planet and the stats such that the planet movement does not cause the body to render off the screen (at least not for the first few rotations) and even if it renders off, it must come back at one point.
Enhancement (20%):
Grab and move a star to a new location. This should cause the planet to move differently since the distance would be altered. In this case, the planet may start moving off the screen. This is OK (but it shouldnt stay off the screen for the whole rotation. It should get back to the screen if you did your calculations correctly).
Grab and shoot the planet into a new velocity.
Notes:
Create GravityWellScene.h and GravityWellScene.cpp files and write your code in them.
Update Body.h and Body.cpp files accordingly. You may also update vector.h.
All the physics code should be in the Body class. All rendering(drawing) and scene math should be done in GravityWellScene.
The GravityWellSceneclass should have the method void HandleEvents(const SDL_Event& sdlEvent) to handle events from the user.
DO NOT CHANGE anything else in the framework except inGameManager.cpp files:
line 2: #include "Scene0.h"-> #include "GravityWellScene.h")
line 23: new Scene0(windowPtr->GetSDL_Window())-> new GravityWellScene(windowPtr->GetSDL_Window())
DO NOT INCLUDE ANY OTHER EXTERNAL LIBRARY or header files. You may use any built-in ones or in the SDL framework.
What to submit to this course to get a grade (if you submit only to your physics course, it will not count):
Body.h
Body.cpp
GravityWellScene.h
GravityWellScene.cpp
Vector.h [if you made changes to it]
[optional: texture file you used other than the ones provided/renamed texture files/extra h/cpp files used like matrix]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!