MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / get_State

Method get_State

ogsr_engine/xrGame/PHCharacter.cpp:55–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void CPHCharacter::get_State(SPHNetState& state)
56{
57 GetPosition(state.position);
58 m_body_interpolation.GetPosition(state.previous_position, 0);
59 GetVelocity(state.linear_vel);
60 getForce(state.force);
61
62 state.angular_vel.set(0.f, 0.f, 0.f);
63 state.quaternion.identity();
64 state.previous_quaternion.identity();
65 state.torque.set(0.f, 0.f, 0.f);
66 // state.accel = GetAcceleration();
67 // state.max_velocity = GetMaximumVelocity();
68
69 if (!b_exist)
70 {
71 state.enabled = false;
72 return;
73 }
74 state.enabled = CPHObject::is_active(); //!!dBodyIsEnabled(m_body);
75}
76void CPHCharacter::set_State(const SPHNetState& state)
77{
78 m_body_interpolation.SetPosition(state.previous_position, 0);

Callers 6

SyncNetStateMethod · 0.45
PHSaveStateMethod · 0.45
OnEventMethod · 0.45
RestoreVelocityStateFunction · 0.45
GetStateMethod · 0.45

Calls 4

GetVelocityFunction · 0.85
GetPositionMethod · 0.45
setMethod · 0.45
identityMethod · 0.45

Tested by

no test coverage detected