![]() |
Quark Physics
1.0
2D Rigid and Soft Body Physics Engine
|
CQAABB | |
CQAngleConstraint | You can apply angle constraints between 3 particles using the QAngleConstraint. The physics engine uses QAngleConstraint to impose angle constraints between particles in objects already simulated using mass-spring models (e.g. QSoftBody objects). However, if the user wants, they can apply specific angle constraints between any 3 particles using QAngleConstraint. QWorld also provides methods to manage QAngleConstraint objects |
CQAreaBody | QAreaBody objects are objects that don't respond to collisions or receive any response from them, but only report collisions. An operation is not applied for them to move during physics steps, they are stationary. Unlike other body types, they have two event listeners named OnCollisionEnter and OnCollisionExit |
▼CQBody | QBody objects are the base class for all types of bodies. Any class derived from QBody shares these methods and properties. Additionally, this base type provides flexible and common references for independent operations from qualified and named body types in the entire simulation. Virtual methods are defined for users to create different body types that inherit QBody. For example, the Update() method is used to apply different dynamics for all body types. QRigidBody instances derived from QBody have their own Update() solution, while QSoftBody instances have their own Update() solution. With these and similar virtual methods, unique new body types can be created |
CBodyPairEqual | |
CBodyPairHash | |
CCollisionInfo | CollisionInfo structure contains collision information of a body object. This information is sent to the relevant event listeners during a collision event |
CQBroadPhase | |
▼CQCollision | Performs all collision detection operations. The relevant methods return contact data from the collision tests |
CContact | Contains all the contact information required to resolve collisions |
CProject | |
CQGizmo | |
CQGizmoCircle | |
CQGizmoLine | |
CQGizmoRect | |
CQJoint | QJoint objects serves to apply various distance constraints between rigid bodies. Additionally, you can create a distance constraint between any object and an imaginary point in space. Instead of separate methods for all fundamental constraints in physics engines, there is a set of property sets available. For example, setting a distance constraint to a distance of 0 creates a constraint known as a pin joint. By decreasing the rigidity of a set distance constraint, you obtain another type of joint called a spring joint. Enabling the groove mode prevents the constraint from being applied as long as the set distance is not exceeded, resulting in another type of joint called a groove joint. QWorld also provides methods to manage QJoint objects |
CQManifold | QManifold retrieves collision data from collision tests between two QBody objects using QCollision methods and resolves collisions based on this data. The Solve() method applies collision reactions by changing the positions of contact partners, while the SolveFrictionAndVelocities() method applies friction to the contact partners and adjusts their velocity values |
CQManifoldKey | |
▼CQMesh | Every QBody object requires meshes. In other traditional physics engines, the term 'shape' is used instead. However, in Quark Physics, meshes do not only contain information about primitive shapes. A QMesh includes collision shapes, collision behaviors, internal and external spring connections, particle informations, and necessary collective information for rendering. In the QMesh class, there are methods to quickly create primitive types such as circles, rectangles, and polygons that are suitable for the types and needs of body objects. However, QMesh objects are created with a struct called MeshData. Therefore, it is also possible to create many complex mesh examples for body types |
CMeshData | |
▼CQObjectPool | |
CNode | |
CQParticle | QParticle objects form the network structures of QMesh objects defined for all body object types. They are the smallest building blocks of physics simulation and are manipulated differently in different body object types. For example, in QRigidBody objects, particles are collectively forced into positions obtained through various calculations based on the current body properties. However, in soft body objects, simulation particles are individually manipulated and can move freely, determining the next steps of the simulation through their individual movements. QMesh objects offer a number of methods to manage particles. For more information on restrictions between particles in soft body objects, see the QSpring object |
▼CQPlatformerBody | QPlatformerBody provides a ready-to-use foundation for character physics in platformer games. It includes behaviors such as gravity, walking on slopes, and jumping. Additionally, it offers helper methods and properties for further customization |
CCollisionTestInfo | |
▼CQRaycast | QRaycast objects send a ray into the world and return collision results with body objects. You can create a constant raycast object that you can add to the world and update collision results at every physics step, or you can make instantaneous raycast calls at runtime using the QRaycast::RaycastTo static method. QWorld also provides methods for managing QRaycast objects |
CContact | |
CQRigidBody | QRigidBody is a type of body that is simulated with the dynamics of Rigid body. A rigid body is a type of object in physics simulations that models non-deformable, solid objects. Rigid bodies have properties such as momentum, center of mass, inertia, and mass, which affect their simulation. These properties are used to compute the motion and collisions of rigid bodies in a physics engine |
CQSoftBody | QSoftBody is a body type that defines deformable, soft objects in the physics world. Mass-spring model is used for simulation dynamics in soft bodies. In the mass-spring model, there are particles with mass that can move individually and interact with the physics world, and these particles can be connected to each other with spring constraints. Additionally, with some user-configurable options specific to the simulation, particles can be subjected to constraints obtained from some calculations. For example, you can add a constraint that ensures particles remain faithful to their initially defined local positions using the "shape matching" option. You can apply a constraint that gives the feeling that the polygon are filled with gas and maintains their area using the "area preserving" option. You can use options that allow particles to collide with each other with a specific radius, and create objects called PBD (Position Based Dynamics). QSoftBody objects inherently require a more flexible configuration than other body types and contain many options |
CQSpatialHashing | |
CQSpring | You can apply distance constraints between 2 particles using the QSpring. The physics engine uses QSpring to impose distance constraints between particles in objects already simulated using mass-spring models (e.g. QSoftBody objects). However, if the user wants, they can apply specific distance constraints between any 2 particles using QSpring. QWorld also provides methods to manage QSpring objects |
CQVector | |
CQWorld | A QWorld object is required to create a physics simulation. The QWorld class manages the entire physics simulation. You can add or remove objects to the physics world and make specific settings for the simulation. Additionally, the QWorld class is responsible for updating the simulation |