 |
Rune Engine
Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
|
14 #include <Math\Vec2.h>
15 #include <Entities\component.h>
16 #include <Entities\gameObject.h>
17 #include <Renderer\rectangleShape.h>
33 collision() : objectOne(nullptr), objectTwo(nullptr), normalVector(
rune::Vec2(0,0)), depth(0)
99 std::vector<collision> involvedCollisions;
103 virtual void start();
107 void setUpObject(
int width,
int height,
double mass,
bool rotation);
111 void setMass(
float newMass);
113 AABB getBoundingBox(
void);
115 void addAngularVelocity(
double angularVel);
117 void setRotation(
double angle);
127 void updatePosition(
double dT);
129 void interpolatePosition(
double alpha);
139 double getInvMass(
void);
141 double getInvIntertia(
void);
143 double getRestitution(
void);
145 void setRestitution(
double);
147 double getStaticFriction(
void);
149 void setStaticFriction(
float friction);
151 double getDynamicFriction(
void);
153 void setDynamicFriction(
float friction);
155 double getOrientation(
void);
157 double getWidth(
void);
159 double getHeight(
void);
165 void clearCollisions(
void);
169 std::vector<collision> getCollisions(
void);
171 body* getBodyStruct(
void);
The physics module responsible for handling and resolving collisions between physics::Collider2D.
Definition: AABB.h:7
rune::Vec2 vertexes[4]
Vertices of the body.
Definition: rigidBody.h:58
double invMass
1/mass of the object
Definition: rigidBody.h:70
double restitution
How bouncy, between 0 and 1.
Definition: rigidBody.h:75
Game object component that allows a game object to have collisions with other objects.
Definition: rigidBody.h:95
A component of a rune::GameObject, this class is used to add functionality to a object in the game wo...
Definition: component.h:23
Collision manifold used for reporting rigid body collisions.
Definition: collision.h:8
rune::Vec2 max
Top right corner of the AABB.
Definition: AABB.h:16
rune::Vec2 min
Bottom left corner of the AABB.
Definition: AABB.h:14
rune::Vec2 oldPosition
Previous position in world coordinates.
Definition: rigidBody.h:66
double angleOfRotation
Coefficient of dynamic friction.
Definition: rigidBody.h:82
rune::Vec2 gravityFactor
How much gravity does this object have.
Definition: rigidBody.h:72
AABB boundingBox
Broad phase Minimum bounding box.
Definition: rigidBody.h:60
double xPos
X position in world coordinates.
Definition: rigidBody.h:62
double torque
Rotational torque on the object.
Definition: rigidBody.h:86
double staticFriction
Coefficient of static friction.
Definition: rigidBody.h:77
double angularVelocity
Rate of change of rotation.
Definition: rigidBody.h:84
1 x 2 vector to be used for math.
Definition: vec2.h:20
double yPos
Y Position in world coordinates.
Definition: rigidBody.h:64
double invInertia
Inverse inertia of the body.
Definition: rigidBody.h:88
Rigid body struct containing all the information for a physically realistic response.
Definition: rigidBody.h:56
double dynamicFriction
Coefficient of dynamic friction.
Definition: rigidBody.h:79
rune::Vec2 velocity
Velocity.
Definition: rigidBody.h:68
double rotationalRadius
Largest radius that can have a moment applied to it.
Definition: rigidBody.h:90
The main namespace to be used for interfacing with the engine.
Definition: animator.h:21
Axis aligned bounding box for each object.
Definition: AABB.h:10