|
CoriEngine
|
Anything connected to physics is in this namespace. Please refer to Box2D docs 'https://box2d.org/' for any details regarding physics. More...
Classes | |
| struct | BodyUserData |
| class | Capsule |
| struct | CastResult |
| class | Circle |
| class | ConvexHull |
| class | Polygon |
| class | Segment |
| struct | ShapeUserData |
Typedefs | |
| using | Vec2 = b2Vec2 |
| An alias for Box2D native vec2 type, if you see it somewhere, be sure data there is in meters contrary to when glm used, there data is in camera pixels. | |
| using | Rot = b2Rot |
| using | Transform = b2Transform |
| using | CollisionPlane = b2CollisionPlane |
| using | RayResult = b2RayResult |
Enumerations | |
| enum | CollisionBits : uint64_t { StaticBit = 1ull << 0 , MoverBit = 1ull << 1 , DynamicBit = 1ull << 2 , DebrisBit = 1ull << 3 , SensorBit = 1ull << 4 , CustomBit5 = 1ull << 5 , CustomBit6 = 1ull << 6 , CustomBit7 = 1ull << 7 , CustomBit8 = 1ull << 8 , CustomBit9 = 1ull << 9 , CustomBit10 = 1ull << 10 , CustomBit11 = 1ull << 11 , CustomBit12 = 1ull << 12 , CustomBit13 = 1ull << 13 , CustomBit14 = 1ull << 14 , CustomBit15 = 1ull << 15 , CustomBit16 = 1ull << 16 , CustomBit17 = 1ull << 17 , CustomBit18 = 1ull << 18 , CustomBit19 = 1ull << 19 , CustomBit20 = 1ull << 20 , CustomBit21 = 1ull << 21 , CustomBit22 = 1ull << 22 , CustomBit23 = 1ull << 23 , CustomBit24 = 1ull << 24 , CustomBit25 = 1ull << 25 , CustomBit26 = 1ull << 26 , CustomBit27 = 1ull << 27 , CustomBit28 = 1ull << 28 , CustomBit29 = 1ull << 29 , CustomBit30 = 1ull << 30 , CustomBit31 = 1ull << 31 , CustomBit32 = 1ull << 32 , CustomBit33 = 1ull << 33 , CustomBit34 = 1ull << 34 , CustomBit35 = 1ull << 35 , CustomBit36 = 1ull << 36 , CustomBit37 = 1ull << 37 , CustomBit38 = 1ull << 38 , CustomBit39 = 1ull << 39 , CustomBit40 = 1ull << 40 , CustomBit41 = 1ull << 41 , CustomBit42 = 1ull << 42 , CustomBit43 = 1ull << 43 , CustomBit44 = 1ull << 44 , CustomBit45 = 1ull << 45 , CustomBit46 = 1ull << 46 , CustomBit47 = 1ull << 47 , CustomBit48 = 1ull << 48 , CustomBit49 = 1ull << 49 , CustomBit50 = 1ull << 50 , CustomBit51 = 1ull << 51 , CustomBit52 = 1ull << 52 , CustomBit53 = 1ull << 53 , CustomBit54 = 1ull << 54 , CustomBit55 = 1ull << 55 , CustomBit56 = 1ull << 56 , CustomBit57 = 1ull << 57 , CustomBit58 = 1ull << 58 , CustomBit59 = 1ull << 59 , CustomBit60 = 1ull << 60 , CustomBit61 = 1ull << 61 , CustomBit62 = 1ull << 62 , CustomBit63 = 1ull << 63 , AllBits = ~0u } |
| enum class | WindingOrder : uint8_t { COLLINEAR , CLOCKWISE , COUNTER_CLOCKWISE } |
Functions | |
| WindingOrder | GetPolygonWindingOrder (const std::vector< Vec2 > &polygon) |
| Calculates the winding order of the polygon made up from individual points. Box2D version. Takes Box2Ds vec2s. | |
| WindingOrder | GetPolygonWindingOrder (const std::vector< tmx::Vector2f > &polygon) |
| Calculates the winding order of the polygon made up from individual points. TMXLite version. Takes TMXLite vec2s. | |
| const char * | WindingOrderToString (WindingOrder order) |
| Converts the WindingOrder enumerator to string, for logging. | |
| glm::vec2 | ToPixels (const Vec2 vec) |
| Converts physical meters to camera space pixels. | |
| Vec2 | ToMeters (const glm::vec2 vec) |
| Converts camera space pixels to physical meters. | |
| std::string | Vec2ToString (Vec2 vec) |
| Converts a native Box2D vec2 to string, for logging. | |
Anything connected to physics is in this namespace. Please refer to Box2D docs 'https://box2d.org/' for any details regarding physics.
Cori engine doesn't have a native physics engine and uses Box2D, so refer to Box2D docs 'https://box2d.org/' for any details on physics.
All the engine does is provide a convenient C++ API for it, as Box2D is a C project and the default API is not really convenient in C++ environment.
Big thanks HolyBlackCat for: 'https://github.com/HolyBlackCat/box2cpp/tree/master'
| using Cori::Physics::CollisionPlane = b2CollisionPlane |
Definition at line 45 of file Physics/Physics.hpp.
| using Cori::Physics::RayResult = b2RayResult |
Definition at line 46 of file Physics/Physics.hpp.
| using Cori::Physics::Rot = b2Rot |
Definition at line 43 of file Physics/Physics.hpp.
| using Cori::Physics::Transform = b2Transform |
Definition at line 44 of file Physics/Physics.hpp.
| using Cori::Physics::Vec2 = b2Vec2 |
An alias for Box2D native vec2 type, if you see it somewhere, be sure data there is in meters contrary to when glm used, there data is in camera pixels.
Definition at line 42 of file Physics/Physics.hpp.
| enum Cori::Physics::CollisionBits : uint64_t |
Definition at line 49 of file Physics/Physics.hpp.
|
strong |
| Enumerator | |
|---|---|
| COLLINEAR | |
| CLOCKWISE | |
| COUNTER_CLOCKWISE | |
Definition at line 118 of file Physics/Physics.hpp.
| WindingOrder Cori::Physics::GetPolygonWindingOrder | ( | const std::vector< tmx::Vector2f > & | polygon | ) |
Calculates the winding order of the polygon made up from individual points. TMXLite version. Takes TMXLite vec2s.
| polygon | Point that from a polygon. |
Definition at line 30 of file Physics/Physics.cpp.
| WindingOrder Cori::Physics::GetPolygonWindingOrder | ( | const std::vector< Vec2 > & | polygon | ) |
Calculates the winding order of the polygon made up from individual points. Box2D version. Takes Box2Ds vec2s.
| polygon | Point that from a polygon. |
Definition at line 5 of file Physics/Physics.cpp.
| Vec2 Cori::Physics::ToMeters | ( | const glm::vec2 | vec | ) |
Converts camera space pixels to physical meters.
| vec | Position in pixels. |
Definition at line 74 of file Physics/Physics.cpp.
| glm::vec2 Cori::Physics::ToPixels | ( | const Vec2 | vec | ) |
Converts physical meters to camera space pixels.
| vec | Position in meters. |
Definition at line 70 of file Physics/Physics.cpp.
| std::string Cori::Physics::Vec2ToString | ( | Vec2 | vec | ) |
Converts a native Box2D vec2 to string, for logging.
| vec | Native Box2D vec2 to convert to string. |
Definition at line 78 of file Physics/Physics.cpp.
| const char * Cori::Physics::WindingOrderToString | ( | WindingOrder | order | ) |
Converts the WindingOrder enumerator to string, for logging.
| order | Enumerator. |
Definition at line 56 of file Physics/Physics.cpp.