commonlibsse_ng\re\h/
hkbCharacter.rs1use crate::re::hkArray::hkArray;
2use crate::re::hkRefPtr::hkRefPtr;
3use crate::re::hkRefVariant::hkRefVariant;
4use crate::re::hkReferencedObject::hkReferencedObject;
5use crate::re::hkReferencedObject::hkReferencedObjectVtbl;
6use crate::re::hkStringPtr::hkStringPtr;
7use crate::re::hkbBehaviorGraph::hkbBehaviorGraph;
8use crate::re::hkbCharacterSetup::hkbCharacterSetup;
9use crate::re::hkbProjectData::hkbProjectData;
10use crate::re::hkbRagdollDriver;
11use crate::re::offsets_rtti::RTTI_hkbCharacter;
12use crate::re::offsets_vtable::VTABLE_hkbCharacter;
13use crate::rel::id::VariantID;
14
15#[repr(C)]
19#[derive(Debug)]
20pub struct hkbCharacter {
21 pub __base: hkReferencedObject,
23
24 pub nearbyCharacters: hkArray<*mut hkbCharacter>,
27
28 pub currentLOD: i16,
31
32 pub numTracksInLOD: i16,
35
36 pub pad24: u32,
39
40 pub name: hkStringPtr,
43
44 pub ragdollDriver: hkRefPtr<hkbRagdollDriver>,
47
48 pub characterControllerDriver: hkRefVariant,
51
52 pub footIkDriver: hkRefVariant,
55
56 pub handIkDriver: hkRefVariant,
59
60 pub setup: hkRefPtr<hkbCharacterSetup>,
63
64 pub behaviorGraph: hkRefPtr<hkbBehaviorGraph>,
67
68 pub projectData: hkRefPtr<hkbProjectData>,
71
72 pub animationBindingSet: hkRefVariant,
75
76 pub raycastInterface: hkRefVariant,
79
80 pub world: hkRefVariant,
83
84 pub eventQueue: hkRefVariant,
87
88 pub worldFromModel: hkRefVariant,
91
92 pub poseLocal: *const *const (), pub numPoseLocal: i32,
99
100 pub deleteWorldFromModel: bool,
103
104 pub deletePoseLocal: bool,
107
108 pub pad9E: u16,
111}
112
113const _: () = {
115 assert!(core::mem::offset_of!(hkbCharacter, __base) == 0x0);
116 assert!(core::mem::offset_of!(hkbCharacter, nearbyCharacters) == 0x10);
117 assert!(core::mem::offset_of!(hkbCharacter, currentLOD) == 0x20);
118 assert!(core::mem::offset_of!(hkbCharacter, numTracksInLOD) == 0x22);
119 assert!(core::mem::offset_of!(hkbCharacter, pad24) == 0x24);
120 assert!(core::mem::offset_of!(hkbCharacter, name) == 0x28);
121 assert!(core::mem::offset_of!(hkbCharacter, ragdollDriver) == 0x30);
122 assert!(core::mem::offset_of!(hkbCharacter, characterControllerDriver) == 0x38);
123 assert!(core::mem::offset_of!(hkbCharacter, footIkDriver) == 0x40);
124 assert!(core::mem::offset_of!(hkbCharacter, handIkDriver) == 0x48);
125 assert!(core::mem::offset_of!(hkbCharacter, setup) == 0x50);
126 assert!(core::mem::offset_of!(hkbCharacter, behaviorGraph) == 0x58);
127 assert!(core::mem::offset_of!(hkbCharacter, projectData) == 0x60);
128 assert!(core::mem::offset_of!(hkbCharacter, animationBindingSet) == 0x68);
129 assert!(core::mem::offset_of!(hkbCharacter, raycastInterface) == 0x70);
130 assert!(core::mem::offset_of!(hkbCharacter, world) == 0x78);
131 assert!(core::mem::offset_of!(hkbCharacter, eventQueue) == 0x80);
132 assert!(core::mem::offset_of!(hkbCharacter, worldFromModel) == 0x88);
133 assert!(core::mem::offset_of!(hkbCharacter, poseLocal) == 0x90);
134 assert!(core::mem::offset_of!(hkbCharacter, numPoseLocal) == 0x98);
135 assert!(core::mem::offset_of!(hkbCharacter, deleteWorldFromModel) == 0x9C);
136 assert!(core::mem::offset_of!(hkbCharacter, deletePoseLocal) == 0x9D);
137 assert!(core::mem::offset_of!(hkbCharacter, pad9E) == 0x9E);
138 assert!(core::mem::size_of::<hkbCharacter>() == 0xA0);
139};
140
141impl Default for hkbCharacter {
142 fn default() -> Self {
143 Self::new()
144 }
145}
146
147impl hkbCharacter {
148 pub const RTTI: VariantID = RTTI_hkbCharacter;
150
151 pub const VTABLE: [VariantID; 1] = VTABLE_hkbCharacter;
153
154 #[inline]
156 pub fn new() -> Self {
157 Self {
158 __base: hkReferencedObject::new(),
159 nearbyCharacters: hkArray::new(),
160 currentLOD: 0,
161 numTracksInLOD: 0,
162 pad24: 0,
163 name: hkStringPtr::default(),
164 ragdollDriver: hkRefPtr::default(),
165 characterControllerDriver: hkRefVariant::default(),
166 footIkDriver: hkRefVariant::default(),
167 handIkDriver: hkRefVariant::default(),
168 setup: hkRefPtr::default(),
169 behaviorGraph: hkRefPtr::default(),
170 projectData: hkRefPtr::default(),
171 animationBindingSet: hkRefVariant::default(),
172 raycastInterface: hkRefVariant::default(),
173 world: hkRefVariant::default(),
174 eventQueue: hkRefVariant::default(),
175 worldFromModel: hkRefVariant::default(),
176 poseLocal: std::ptr::null(), numPoseLocal: 0,
178 deleteWorldFromModel: false,
179 deletePoseLocal: false,
180 pad9E: 0,
181 }
182 }
183}
184
185#[repr(C)]
187pub struct hkbCharacterVtbl {
188 pub __base: hkReferencedObjectVtbl,
189
190 pub Unk_03: fn(this: &mut hkbCharacter),
192
193 pub Unk_04: fn(this: &mut hkbCharacter),
195}