Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////////////File A/////////////////////////////////////////
- void Physics::CalculateCollision(Object *Obct,double ObctYspeed,Object *secObct)
- {
- struct Line *objvec = nullptr;
- objvec = new Line();
- //initialize objvec
- point pnt = {0,0};
- math::FindPoint(objvec,secObct->Box,&pnt,direction);
- delete(objvec);
- }
- /////////////////////////////////File B///////////////////////////////////////////
- typedef struct
- {
- double x;
- double y;
- }point;
- struct Line
- {
- double incline;
- double y;
- double x;
- double c;
- point start,finish;
- };
- namespace math
- {
- .... //First And Second are garbage inside this function
- //Pt and direction are ok
- static void FindPoint(Line *First,AABB *Second,point *Pt,int direction)
- {
- std::vector<point*> pntvec;
- //do stuff with the data
- }
- ......
- }
Advertisement
Add Comment
Please, Sign In to add comment