Collision detection is fundamental to many applications, including computer games, physical simulations, robotics and virtual prototyping. In computer games, collision detection ensures that the illusion of a solid world is maintained. Without collision detection, characters could go through walls and other obstacles. Collision detection involves algorithms checking for intersection of two given objects. Simulating what happens once a collision is detected is sometimes referred to as "collision response". In its basic development the collision detection and resolution algorithm supports circular shapes and handle an arbitrary number objects at the same time using a Quad tree.

Physics of an entity in Caco*Asteroids


The physics in this project is based of newton laws of motion. An entity has a position, velocity and acceleration which helps to know the direction to which an entity is travelling and at what speed. this means that orientation of the entity do not matter as it is easier to determine where the entity is going.

The Entity Implemented in this Project has different physics components that helps one track the physics components of the entity from position to velocity, mass to inverse mass , torque and speed thus having the following components:

/** * Holds the Inverse Mass of the entity. */
  float inverseMass;
  /** * Holds the damping force of the entity. */
  float damping;
  float radius;
  /** * Holds the linear position of the entity. */
  Vector2D position;
  /** * Holds the linear velocity of the entity. */
  Vector2D velocity;
  Vector2D forceAccum;
  /** * Holds the acceleration of the entity. This value * can be used to set acceleration due to gravity (its primary * use) or any other constant acceleration. */
  Vector2D acceleration;
  /** * The speed of The entity*/ 
  float Speed;
  /** The current rotation on the Z axis of this entity */
  float rotation;
  /** * Rotation of the body around it's center of gravity in radians.
  Must agree with rotation! Use SetAngle() when changing the angle for this reason.*/
  float Angle;
  /** * Angular velocity of the body around it's center of gravity in radians/second.*/
  float wAngle;
  /** * Torque applied to the body around it's center of gravity.*/
  float torque;
  Vector2D rot;//entity's rotational value// temp
  float Area;//entity's Area
  CacoShapeType type;//entity's Shape Type



This Page is still under construction Please bear with us. All our Resources are being gathered to provide you with more information about our services.