CommonLibVR
hkpConstraintInstance.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace RE
6 {
7  struct hkConstraintInternal;
8  class hkpConstraintData;
9  class hkpConstraintOwner;
10  struct hkpModifierConstraintAtom;
11 
13  {
14  public:
15  enum class ConstraintPriority
16  {
17  kInvalid,
18  kPSI,
20  kTOI,
21  kTOIHigher,
22  kTOIForced,
23 
24  kTotal
25  };
26 
28  {
29  kRemap = 0,
30  kRemove = 1,
31  kResetRemove = 2
32  };
33 
34  inline static constexpr auto RTTI = RTTI_hkpConstraintInstance;
35  inline static constexpr auto VTABLE = VTABLE_hkpConstraintInstance;
36 
37  ~hkpConstraintInstance() override; // 00
38 
39  inline hkpRigidBody* GetRigidBodyA() const
40  {
41  return reinterpret_cast<hkpRigidBody*>(entities[0]);
42  }
43 
44  inline hkpRigidBody* GetRigidBodyB() const
45  {
46  return reinterpret_cast<hkpRigidBody*>(entities[1]);
47  }
48 
49  // members
52  hkpModifierConstraintAtom* constraintModifiers; // 20
53  hkpEntity* entities[2]; // 28
55  bool wantRuntime; // 39
59  uint64_t userData; // 58
60  hkConstraintInternal* internal; // 60
61  uint32_t uid; // 68
62  private:
63  KEEP_FOR_RE()
64  };
65  static_assert(sizeof(hkpConstraintInstance) == 0x70);
66 
68  {
70  hkpEntity* entities[2]; // 08
72  uint16_t atomsSize; // 20
73  uint8_t callbackRequest; // 22
75  uint16_t sizeOfSchemas; // 24
76  uint16_t numSolverResults; // 26
77  uint16_t numSolverElemTemps; // 28
78  uint8_t whoIsMaster; // 2A
79  bool isNormalType; // 2B
80  hkpConstraintRuntime* runtime; // 30
81  uint16_t runtimeSize; // 38
83  };
84  static_assert(sizeof(hkConstraintInternal) == 0x40);
85 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: hkReferencedObject.h:11
Definition: hkStringPtr.h:6
Definition: hkpConstraintData.h:11
Definition: hkpConstraintInstance.h:13
hkpEntity * entities[2]
Definition: hkpConstraintInstance.h:53
~hkpConstraintInstance() override
hkStringPtr name
Definition: hkpConstraintInstance.h:58
static constexpr auto RTTI
Definition: hkpConstraintInstance.h:34
hkpConstraintData * data
Definition: hkpConstraintInstance.h:51
stl::enumeration< ConstraintPriority, std::uint8_t > priority
Definition: hkpConstraintInstance.h:54
static constexpr auto VTABLE
Definition: hkpConstraintInstance.h:35
ConstraintPriority
Definition: hkpConstraintInstance.h:16
stl::enumeration< OnDestructionRemapInfo, std::uint8_t > destructionRemapInfo
Definition: hkpConstraintInstance.h:56
uint64_t userData
Definition: hkpConstraintInstance.h:59
OnDestructionRemapInfo
Definition: hkpConstraintInstance.h:28
hkSmallArray< hkpConstraintListener * > listeners
Definition: hkpConstraintInstance.h:57
hkpRigidBody * GetRigidBodyA() const
Definition: hkpConstraintInstance.h:39
bool wantRuntime
Definition: hkpConstraintInstance.h:55
hkpConstraintOwner * owner
Definition: hkpConstraintInstance.h:50
hkpModifierConstraintAtom * constraintModifiers
Definition: hkpConstraintInstance.h:52
hkpRigidBody * GetRigidBodyB() const
Definition: hkpConstraintInstance.h:44
uint32_t uid
Definition: hkpConstraintInstance.h:61
Definition: hkpConstraintOwner.h:11
Definition: hkpEntity.h:25
Definition: hkpRigidBody.h:8
Definition: AbsorbEffect.h:6
std::uint16_t hkObjectIndex
Definition: hkBaseTypes.h:5
constexpr std::array< REL::ID, 1 > VTABLE_hkpConstraintInstance
Definition: Offsets_VTABLE.h:14198
constexpr REL::ID RTTI_hkpConstraintInstance(static_cast< std::uint64_t >(689860))
Definition: hkpConstraintInstance.h:68
uint16_t sizeOfSchemas
Definition: hkpConstraintInstance.h:75
hkpConstraintRuntime * runtime
Definition: hkpConstraintInstance.h:80
uint16_t numSolverElemTemps
Definition: hkpConstraintInstance.h:77
uint8_t whoIsMaster
Definition: hkpConstraintInstance.h:78
hkpEntity * entities[2]
Definition: hkpConstraintInstance.h:70
bool isNormalType
Definition: hkpConstraintInstance.h:79
stl::enumeration< hkpConstraintInstance::ConstraintPriority, std::uint8_t > priority
Definition: hkpConstraintInstance.h:74
hkpConstraintAtom * atoms
Definition: hkpConstraintInstance.h:71
uint16_t numSolverResults
Definition: hkpConstraintInstance.h:76
uint16_t atomsSize
Definition: hkpConstraintInstance.h:72
uint16_t runtimeSize
Definition: hkpConstraintInstance.h:81
hkObjectIndex slaveIndex
Definition: hkpConstraintInstance.h:82
uint8_t callbackRequest
Definition: hkpConstraintInstance.h:73
hkpConstraintInstance * constraint
Definition: hkpConstraintInstance.h:69
Definition: hkpConstraintAtom.h:8