group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Ragdoll.hpp File Reference

Ragdoll components — bone-to-rigid-body mapping for character death. More...

#include <array>
#include <cstdint>
#include <entt/entt.hpp>
Include dependency graph for Ragdoll.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RagdollBoneTag
 Marker on each ragdoll-body entity; points back to the parent ragdoll character and which bone slot this body fills. More...
struct  Ragdoll
 Parent component on the dead character; holds the 15 ragdoll body entities and the joint entities connecting them. More...

Enumerations

enum class  RagdollBone : uint8_t {
  Head = 0 , Torso = 1 , Pelvis = 2 , UpperArmL = 3 ,
  UpperArmR = 4 , ForearmL = 5 , ForearmR = 6 , HandL = 7 ,
  HandR = 8 , UpperLegL = 9 , UpperLegR = 10 , LowerLegL = 11 ,
  LowerLegR = 12 , FootL = 13 , FootR = 14 , Count = 15
}
 Standard humanoid bone indices for the 15-body ragdoll. More...

Detailed Description

Ragdoll components — bone-to-rigid-body mapping for character death.

On character death the gameplay code calls spawnRagdoll(...) which allocates 15 rigid bodies (one per major bone) and the joints connecting them. The new bodies are owned by a Ragdoll parent component on the character entity; destroying the character also destroys all its ragdoll children.

Renderer integration: each ragdoll body carries a RagdollBoneTag linking it back to the source character + bone index; the skinning system reads the body's Position + Orientation and pipes them into the bone palette for that character.

Enumeration Type Documentation

◆ RagdollBone

enum class RagdollBone : uint8_t
strong

Standard humanoid bone indices for the 15-body ragdoll.

Order matches the joint table in Ragdoll::buildHumanoid.

Enumerator
Head 
Torso 
Pelvis 
UpperArmL 
UpperArmR 
ForearmL 
ForearmR 
HandL 
HandR 
UpperLegL 
UpperLegR 
LowerLegL 
LowerLegR 
FootL 
FootR 
Count