-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
257b066
commit 0c7de2e
Showing
5 changed files
with
77 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// (c) 2023 Eduardo Doria. | ||
// | ||
|
||
#include "WorldManifold2D.h" | ||
|
||
#include "PhysicsSystem.h" | ||
#include "box2d.h" | ||
|
||
using namespace Supernova; | ||
|
||
WorldManifold2D::WorldManifold2D(Scene* scene, b2WorldManifold* worldmanifold){ | ||
this->scene = scene; | ||
this->worldmanifold = worldmanifold; | ||
} | ||
|
||
WorldManifold2D::~WorldManifold2D(){ | ||
|
||
} | ||
|
||
WorldManifold2D::WorldManifold2D(const WorldManifold2D& rhs){ | ||
scene = rhs.scene; | ||
worldmanifold = rhs.worldmanifold; | ||
|
||
} | ||
|
||
WorldManifold2D& WorldManifold2D::operator=(const WorldManifold2D& rhs){ | ||
scene = rhs.scene; | ||
worldmanifold = rhs.worldmanifold; | ||
|
||
return *this; | ||
} | ||
|
||
b2WorldManifold* Manifold2D::getBox2DWorldManifold(){ | ||
return worldmanifold; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// (c) 2023 Eduardo Doria. | ||
// | ||
|
||
#ifndef WORLDMANIFOLD2D_H | ||
#define WORLDMANIFOLD2D_H | ||
|
||
#include "Scene.h" | ||
|
||
class b2WorldManifold; | ||
|
||
namespace Supernova{ | ||
|
||
class WorldManifold2D{ | ||
private: | ||
Scene* scene; | ||
b2WorldManifold* worldmanifold; | ||
|
||
public: | ||
WorldManifold2D(Scene* scene, b2WorldManifold* worldmanifold); | ||
virtual ~WorldManifold2D(); | ||
|
||
WorldManifold2D(const WorldManifold2D& rhs); | ||
WorldManifold2D& operator=(const WorldManifold2D& rhs); | ||
|
||
b2WorldManifold* getBox2DWorldManifold(); | ||
|
||
Vector2 getNormal() const; | ||
Vector2 getPoint() const; | ||
float getSeparations() const; | ||
}; | ||
} | ||
|
||
#endif //WORLDMANIFOLD2D_H |