|
group2 0.1.0
CSE 125 Group 2
|
Single-axis hinge — locks the bodies' anchors together AND constrains their relative rotation to a single axis. More...
#include <Joints.hpp>
Public Attributes | |
| entt::entity | bodyA {entt::null} |
| entt::entity | bodyB {entt::null} |
| glm::vec3 | localAnchorA {0.0f} |
| glm::vec3 | localAnchorB {0.0f} |
| glm::vec3 | localAxisA {0.0f, 0.0f, 1.0f} |
| Hinge axis in A's local space. | |
| glm::vec3 | localAxisB {0.0f, 0.0f, 1.0f} |
| Hinge axis in B's local space. | |
| float | minAngle = 0.0f |
| Limit angles in radians. | |
| float | maxAngle = 0.0f |
| bool | hasLimit = false |
| bool | motorEnabled = false |
| Motor — if enabled, drive angularVelocity toward targetAngularSpeed with at most maxMotorTorque. | |
| float | targetAngularSpeed = 0.0f |
| float | maxMotorTorque = 0.0f |
| glm::vec3 | accumulatedAnchorImpulse {0.0f} |
| glm::vec3 | accumulatedAngularImpulse {0.0f} |
Single-axis hinge — locks the bodies' anchors together AND constrains their relative rotation to a single axis.
Optional swing limit (relative to body A's local-space rest orientation).
| glm::vec3 physics::HingeJoint::accumulatedAnchorImpulse {0.0f} |
| glm::vec3 physics::HingeJoint::accumulatedAngularImpulse {0.0f} |
| entt::entity physics::HingeJoint::bodyA {entt::null} |
| entt::entity physics::HingeJoint::bodyB {entt::null} |
| bool physics::HingeJoint::hasLimit = false |
| glm::vec3 physics::HingeJoint::localAnchorA {0.0f} |
| glm::vec3 physics::HingeJoint::localAnchorB {0.0f} |
| glm::vec3 physics::HingeJoint::localAxisA {0.0f, 0.0f, 1.0f} |
Hinge axis in A's local space.
| glm::vec3 physics::HingeJoint::localAxisB {0.0f, 0.0f, 1.0f} |
Hinge axis in B's local space.
| float physics::HingeJoint::maxAngle = 0.0f |
| float physics::HingeJoint::maxMotorTorque = 0.0f |
| float physics::HingeJoint::minAngle = 0.0f |
| bool physics::HingeJoint::motorEnabled = false |
Motor — if enabled, drive angularVelocity toward targetAngularSpeed with at most maxMotorTorque.
| float physics::HingeJoint::targetAngularSpeed = 0.0f |