OpenGL 기반의 Walker 예제
#include #include #include #include #include #include #include using namespace std; const int width = 640;const int height = 480; class Walker {public : int x,y;double timeFrame = 0.0;double deltaTime = 0.01; Walker() {srand((unsigned)time(NULL));// seed valuex = width/2;y = height/2;} // Randomly move to any neighboring pixel (or stay in the same spot)void step() {timeFrame = timeFrame + deltaT..
C++
2017. 3. 5. 17:15