Guest User

Untitled

a guest
Dec 19th, 2014
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.03 KB | None | 0 0
  1. //////////////////////////////////File A/////////////////////////////////////////
  2.  
  3. void Physics::CalculateCollision(Object *Obct,double ObctYspeed,Object *secObct)
  4. {
  5.         struct Line *objvec = nullptr;
  6.         objvec = new Line();
  7.        
  8.         //initialize objvec
  9.  
  10.         point pnt = {0,0};
  11.         math::FindPoint(objvec,secObct->Box,&pnt,direction);
  12.         delete(objvec);
  13. }
  14.  
  15. /////////////////////////////////File B///////////////////////////////////////////
  16. typedef struct
  17. {
  18.         double x;
  19.         double y;
  20. }point;
  21.  
  22. struct Line
  23. {
  24.         double incline;
  25.         double y;
  26.         double x;
  27.         double c;
  28.         point start,finish;
  29. };
  30. namespace math
  31. {
  32. ....                               //First And Second are garbage inside this function
  33.                                    //Pt and direction are ok
  34.         static void FindPoint(Line *First,AABB *Second,point *Pt,int direction)
  35.         {
  36.                 std::vector<point*> pntvec;
  37.                 //do stuff with the data
  38.         }
  39. ......
  40. }
Advertisement
Add Comment
Please, Sign In to add comment