![]() |
vkmEngine 1.0.0
A C++ game engine · vkmengine.com
|
One joint, resolved to the two solver bodies it constrains. More...
#include <joint_solver.h>
Public Attributes | |
| glm::vec3 | anchorA = {0.0f, 0.0f, 0.0f} |
| World, relative to A's origin. | |
| glm::vec3 | anchorB = {0.0f, 0.0f, 0.0f} |
| World, relative to B's origin. | |
| float | distance = -1.0f |
| Distance the anchors are held at; negative for a point joint. | |
| bool | solvable = false |
| The solve's working state, built once per tick by prepareJoints. | |
| glm::mat3 | mass = glm::mat3(0.0f) |
| Impulse per unit of relative anchor velocity. | |
| glm::vec3 | bias = {0.0f, 0.0f, 0.0f} |
| Relative velocity that closes the drift, stiffness applied. | |
| glm::vec3 | impulse = {0.0f, 0.0f, 0.0f} |
| Accumulated over this tick's passes from last tick's final value, world space. | |
| float | holdTorque = 0.0f |
| Joint::holdTorque; 0 leaves the rotation free. | |
| glm::quat | heldRotation = {1.0f, 0.0f, 0.0f, 0.0f} |
| B's rotation in A's frame that the hold keeps. | |
| float | holdLimit = 0.0f |
| Most angular impulse it carries this tick. | |
| bool | holdSolvable = false |
| False when free, or nothing can turn. | |
| glm::mat3 | holdMass = glm::mat3(0.0f) |
| Angular impulse per unit of relative spin. | |
| glm::vec3 | holdBias = {0.0f, 0.0f, 0.0f} |
| Relative spin that turns the pair back. | |
| glm::vec3 | holdImpulse = {0.0f, 0.0f, 0.0f} |
| Accumulated like impulse, world space, within holdLimit. | |
One joint, resolved to the two solver bodies it constrains.
The tick's view of a Joint, as ContactManifold is of an overlap: ids and anchors are already body indices and lever arms, so the solver never looks at the scene.
| float Vkm::Engine::JointConstraint::distance = -1.0f |
Distance the anchors are held at; negative for a point joint.
A point joint removes all three degrees of freedom between the anchors; a distance joint the one along their line.
| bool Vkm::Engine::JointConstraint::solvable = false |
The solve's working state, built once per tick by prepareJoints.
Constant across passes. A point joint's mass is the inverse effective mass; a distance joint's is its scalar mass along the line times the projector onto it, leaving every direction across it free. False when nothing can move, or there is no line to hold