diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-03-27 15:21:27 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-03-27 15:21:27 -0300 |
commit | a6f3bc7c696af03e3875f78e098d2476e409d15e (patch) | |
tree | fc1bb58e900436c48c03c52106eb57250442ae35 /scene/3d/vehicle_body_3d.cpp | |
parent | 307b1b3a5835ecdb477859785c673a07e248f904 (diff) |
Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D
Also renamed corresponding files.
Diffstat (limited to 'scene/3d/vehicle_body_3d.cpp')
-rw-r--r-- | scene/3d/vehicle_body_3d.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/scene/3d/vehicle_body_3d.cpp b/scene/3d/vehicle_body_3d.cpp index 5d601b0d43..5984b776b2 100644 --- a/scene/3d/vehicle_body_3d.cpp +++ b/scene/3d/vehicle_body_3d.cpp @@ -111,7 +111,7 @@ String VehicleWheel3D::get_configuration_warning() const { return String(); } -void VehicleWheel3D::_update(PhysicsDirectBodyState *s) { +void VehicleWheel3D::_update(PhysicsDirectBodyState3D *s) { if (m_raycastInfo.m_isInContact) @@ -388,7 +388,7 @@ VehicleWheel3D::VehicleWheel3D() { body = NULL; } -void VehicleBody3D::_update_wheel_transform(VehicleWheel3D &wheel, PhysicsDirectBodyState *s) { +void VehicleBody3D::_update_wheel_transform(VehicleWheel3D &wheel, PhysicsDirectBodyState3D *s) { wheel.m_raycastInfo.m_isInContact = false; @@ -405,7 +405,7 @@ void VehicleBody3D::_update_wheel_transform(VehicleWheel3D &wheel, PhysicsDirect wheel.m_raycastInfo.m_wheelAxleWS = chassisTrans.get_basis().xform(wheel.m_wheelAxleCS).normalized(); } -void VehicleBody3D::_update_wheel(int p_idx, PhysicsDirectBodyState *s) { +void VehicleBody3D::_update_wheel(int p_idx, PhysicsDirectBodyState3D *s) { VehicleWheel3D &wheel = *wheels[p_idx]; _update_wheel_transform(wheel, s); @@ -430,7 +430,7 @@ void VehicleBody3D::_update_wheel(int p_idx, PhysicsDirectBodyState *s) { wheel.m_raycastInfo.m_hardPointWS + wheel.m_raycastInfo.m_wheelDirectionWS * wheel.m_raycastInfo.m_suspensionLength); } -real_t VehicleBody3D::_ray_cast(int p_idx, PhysicsDirectBodyState *s) { +real_t VehicleBody3D::_ray_cast(int p_idx, PhysicsDirectBodyState3D *s) { VehicleWheel3D &wheel = *wheels[p_idx]; @@ -448,9 +448,9 @@ real_t VehicleBody3D::_ray_cast(int p_idx, PhysicsDirectBodyState *s) { real_t param = real_t(0.); - PhysicsDirectSpaceState::RayResult rr; + PhysicsDirectSpaceState3D::RayResult rr; - PhysicsDirectSpaceState *ss = s->get_space_state(); + PhysicsDirectSpaceState3D *ss = s->get_space_state(); bool col = ss->intersect_ray(source, target, rr, exclude); @@ -513,7 +513,7 @@ real_t VehicleBody3D::_ray_cast(int p_idx, PhysicsDirectBodyState *s) { return depth; } -void VehicleBody3D::_update_suspension(PhysicsDirectBodyState *s) { +void VehicleBody3D::_update_suspension(PhysicsDirectBodyState3D *s) { real_t chassisMass = mass; @@ -558,7 +558,7 @@ void VehicleBody3D::_update_suspension(PhysicsDirectBodyState *s) { } //bilateral constraint between two dynamic objects -void VehicleBody3D::_resolve_single_bilateral(PhysicsDirectBodyState *s, const Vector3 &pos1, +void VehicleBody3D::_resolve_single_bilateral(PhysicsDirectBodyState3D *s, const Vector3 &pos1, PhysicsBody3D *body2, const Vector3 &pos2, const Vector3 &normal, real_t &impulse, const real_t p_rollInfluence) { real_t normalLenSqr = normal.length_squared(); @@ -636,7 +636,7 @@ void VehicleBody3D::_resolve_single_bilateral(PhysicsDirectBodyState *s, const V #endif } -VehicleBody3D::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirectBodyState *s, PhysicsBody3D *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse) : +VehicleBody3D::btVehicleWheelContactPoint::btVehicleWheelContactPoint(PhysicsDirectBodyState3D *s, PhysicsBody3D *body1, const Vector3 &frictionPosWorld, const Vector3 &frictionDirectionWorld, real_t maxImpulse) : m_s(s), m_body1(body1), m_frictionPositionWorld(frictionPosWorld), @@ -698,7 +698,7 @@ real_t VehicleBody3D::_calc_rolling_friction(btVehicleWheelContactPoint &contact } static const real_t sideFrictionStiffness2 = real_t(1.0); -void VehicleBody3D::_update_friction(PhysicsDirectBodyState *s) { +void VehicleBody3D::_update_friction(PhysicsDirectBodyState3D *s) { //calculate the impulse, so that the wheels don't move sidewards int numWheel = wheels.size(); @@ -854,7 +854,7 @@ void VehicleBody3D::_direct_state_changed(Object *p_state) { RigidBody3D::_direct_state_changed(p_state); - state = Object::cast_to<PhysicsDirectBodyState>(p_state); + state = Object::cast_to<PhysicsDirectBodyState3D>(p_state); float step = state->get_step(); @@ -992,7 +992,7 @@ VehicleBody3D::VehicleBody3D() { ccd = false; exclude.insert(get_rid()); - //PhysicsServer::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed"); + //PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed"); set_mass(40); } |