Download presentation
Presentation is loading. Please wait.
1
Collision Detection
2
collision detection Run spaceTravel.cpp
Go through code - non-collision parts Notice class, Two constructors radius = 0 for no asteroid there Notice viewports. Notice display list. Notice rand. In setup I added srand(time(0)); Need to include ctime Can also changed FILL_PROBABILITY
3
geometry of the spacecraft
radius 5 height 10 red center to edge of circle =sqrt(50) = 7.072
4
geometry of collisions
Got to Here!!!!!!!!
5
collision detection spaceTravel.cpp
static int isCollision = 0; // Is there collision between the spacecraft and an asteroid? functions: int checkSpheresIntersection(...) int asteroidCraftCollision(...) see specialKeyInput function
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.