Physics4K  2013-06-04
Physics4K is the next great evolution in 2D physics engines. built upon the C++ Game Framework, it is going to take the next generation gaming world by storm.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
BoxPair.h
Go to the documentation of this file.
1 // Filename: BoxPair.h
4 
5 //Preprocessor directive designed to cause the current source file to be included only once in a single compilation
6 #pragma once
7 
8 //Includes
9 #include "PKInclude.h"
10 #include "Box.h"
11 #include "Contact.h"
12 #include "Collision.h"
13 
14 namespace PK
15 {
17  {
18  friend class World;
19 
20  public:
21  BoxPair(Box* box1, Box* box2);
22  ~BoxPair();
23 
24  void Update(float deltaTime);
25  void ApplyImpulse();
26 
27  private:
28  void CalculateContactData(float deltaTime);
29 
30  private:
31  Box* m_box1;
32  Box* m_box2;
33 
34  float combinedFriction;
35 
36  Contact m_contacts[2];
37  int m_numContacts;
38  };
39 }