|
group2 0.1.0
CSE 125 Group 2
|
One articulated joint in a PBD ragdoll skeleton. More...
#include <RagdollPbd.hpp>
Public Types | |
| enum class | Kind : uint8_t { Point , Hinge , ConeTwist } |
Public Attributes | |
| entt::entity | bodyA {entt::null} |
| Parent. | |
| entt::entity | bodyB {entt::null} |
| Child. | |
| glm::vec3 | localAnchorA {0.0f} |
| Joint origin in parent local space. | |
| glm::vec3 | localAnchorB {0.0f} |
| Joint origin in child local space. | |
| Kind | kind = Kind::Point |
| glm::vec3 | axisLocalA {1.0f, 0.0f, 0.0f} |
| Hinge / twist axis expressed in the parent's local frame. | |
| float | swingLimit = 1.4f |
| Max half-cone angle for swing about the joint frame (radians). | |
| float | twistLimit = 0.8f |
| Max ± twist angle for ConeTwist (radians). | |
| float | hingeMin = -1.5f |
| Hinge angle bounds (radians). Used only when kind == Hinge. | |
| float | hingeMax = 0.05f |
One articulated joint in a PBD ragdoll skeleton.
Lifetime: one entity per joint, holds this single component. bodyA is the parent, bodyB the child. Anchors localAnchorA / localAnchorB are the joint origin in each body's local space — they MUST coincide in world space at all times (PBD enforces this).
|
strong |
| Enumerator | |
|---|---|
| Point | Ball-and-socket. Cone limit applied (swingLimit). |
| Hinge | 1-DOF rotation about axisLocalA. Clamped to [hingeMin, hingeMax]. |
| ConeTwist | Swing limit (cone) + twist limit about axisLocalA. |
| glm::vec3 physics::RagdollPbdJoint::axisLocalA {1.0f, 0.0f, 0.0f} |
Hinge / twist axis expressed in the parent's local frame.
| entt::entity physics::RagdollPbdJoint::bodyA {entt::null} |
Parent.
| entt::entity physics::RagdollPbdJoint::bodyB {entt::null} |
Child.
| float physics::RagdollPbdJoint::hingeMax = 0.05f |
| float physics::RagdollPbdJoint::hingeMin = -1.5f |
Hinge angle bounds (radians). Used only when kind == Hinge.
| Kind physics::RagdollPbdJoint::kind = Kind::Point |
| glm::vec3 physics::RagdollPbdJoint::localAnchorA {0.0f} |
Joint origin in parent local space.
| glm::vec3 physics::RagdollPbdJoint::localAnchorB {0.0f} |
Joint origin in child local space.
| float physics::RagdollPbdJoint::swingLimit = 1.4f |
Max half-cone angle for swing about the joint frame (radians).
Point and ConeTwist consult this; Hinge ignores it.
| float physics::RagdollPbdJoint::twistLimit = 0.8f |
Max ± twist angle for ConeTwist (radians).