@@ -2688,7 +2688,7 @@ CcdPhysicsEnvironment *CcdPhysicsEnvironment::Create(Scene *blenderscene, bool v
2688
2688
}
2689
2689
2690
2690
void CcdPhysicsEnvironment::ConvertObject (BL_BlenderSceneConverter& converter, KX_GameObject *gameobj, RAS_MeshObject *meshobj,
2691
- KX_Scene *kxscene, PHY_ShapeProps * shapeprops, PHY_IMotionState *motionstate,
2691
+ KX_Scene *kxscene, const PHY_ShapeProps& shapeprops, PHY_IMotionState *motionstate,
2692
2692
int activeLayerBitInfo, bool isCompoundChild, bool hasCompoundChildren)
2693
2693
{
2694
2694
Object *blenderobject = gameobj->GetBlenderObject ();
@@ -2736,15 +2736,15 @@ void CcdPhysicsEnvironment::ConvertObject(BL_BlenderSceneConverter& converter, K
2736
2736
((blenderobject->gameflag2 & OB_LOCK_RIGID_BODY_Y_ROT_AXIS) != 0 ) ? 0 .0f : 1 .0f ,
2737
2737
((blenderobject->gameflag2 & OB_LOCK_RIGID_BODY_Z_ROT_AXIS) != 0 ) ? 0 .0f : 1 .0f );
2738
2738
ci.m_localInertiaTensor = btVector3 (0 .0f , 0 .0f , 0 .0f );
2739
- ci.m_mass = isbulletdyna ? shapeprops-> m_mass : 0 .0f ;
2740
- ci.m_clamp_vel_min = shapeprops-> m_clamp_vel_min ;
2741
- ci.m_clamp_vel_max = shapeprops-> m_clamp_vel_max ;
2742
- ci.m_clamp_angvel_min = shapeprops-> m_clamp_angvel_min ;
2743
- ci.m_clamp_angvel_max = shapeprops-> m_clamp_angvel_max ;
2744
- ci.m_stepHeight = isbulletchar ? shapeprops-> m_step_height : 0 .0f ;
2745
- ci.m_jumpSpeed = isbulletchar ? shapeprops-> m_jump_speed : 0 .0f ;
2746
- ci.m_fallSpeed = isbulletchar ? shapeprops-> m_fall_speed : 0 .0f ;
2747
- ci.m_maxJumps = isbulletchar ? shapeprops-> m_max_jumps : 0 ;
2739
+ ci.m_mass = isbulletdyna ? shapeprops. m_mass : 0 .0f ;
2740
+ ci.m_clamp_vel_min = shapeprops. m_clamp_vel_min ;
2741
+ ci.m_clamp_vel_max = shapeprops. m_clamp_vel_max ;
2742
+ ci.m_clamp_angvel_min = shapeprops. m_clamp_angvel_min ;
2743
+ ci.m_clamp_angvel_max = shapeprops. m_clamp_angvel_max ;
2744
+ ci.m_stepHeight = isbulletchar ? shapeprops. m_step_height : 0 .0f ;
2745
+ ci.m_jumpSpeed = isbulletchar ? shapeprops. m_jump_speed : 0 .0f ;
2746
+ ci.m_fallSpeed = isbulletchar ? shapeprops. m_fall_speed : 0 .0f ;
2747
+ ci.m_maxJumps = isbulletchar ? shapeprops. m_max_jumps : 0 ;
2748
2748
2749
2749
// mmm, for now, take this for the size of the dynamicobject
2750
2750
// Blender uses inertia for radius of dynamic object
@@ -3077,26 +3077,26 @@ void CcdPhysicsEnvironment::ConvertObject(BL_BlenderSceneConverter& converter, K
3077
3077
3078
3078
ci.m_collisionShape = bm;
3079
3079
ci.m_shapeInfo = shapeInfo;
3080
- ci.m_friction = shapeprops-> m_friction ;// tweak the friction a bit, so the default 0.5 works nice
3081
- ci.m_rollingFriction = shapeprops-> m_rollingFriction ;
3082
- ci.m_restitution = shapeprops-> m_restitution ;
3080
+ ci.m_friction = shapeprops. m_friction ;// tweak the friction a bit, so the default 0.5 works nice
3081
+ ci.m_rollingFriction = shapeprops. m_rollingFriction ;
3082
+ ci.m_restitution = shapeprops. m_restitution ;
3083
3083
ci.m_physicsEnv = this ;
3084
3084
// drag / damping is inverted
3085
- ci.m_linearDamping = 1 .0f - shapeprops-> m_lin_drag ;
3086
- ci.m_angularDamping = 1 .0f - shapeprops-> m_ang_drag ;
3085
+ ci.m_linearDamping = 1 .0f - shapeprops. m_lin_drag ;
3086
+ ci.m_angularDamping = 1 .0f - shapeprops. m_ang_drag ;
3087
3087
// need a bit of damping, else system doesn't behave well
3088
- ci.m_inertiaFactor = shapeprops-> m_inertia / 0 .4f ;// defaults to 0.4, don't want to change behavior
3088
+ ci.m_inertiaFactor = shapeprops. m_inertia / 0 .4f ;// defaults to 0.4, don't want to change behavior
3089
3089
3090
- ci.m_do_anisotropic = shapeprops-> m_do_anisotropic ;
3091
- ci.m_anisotropicFriction = ToBullet (shapeprops-> m_friction_scaling );
3090
+ ci.m_do_anisotropic = shapeprops. m_do_anisotropic ;
3091
+ ci.m_anisotropicFriction = ToBullet (shapeprops. m_friction_scaling );
3092
3092
3093
3093
// do Fh, do Rot Fh
3094
- ci.m_do_fh = shapeprops-> m_do_fh ;
3095
- ci.m_do_rot_fh = shapeprops-> m_do_rot_fh ;
3096
- ci.m_fh_damping = shapeprops-> m_fh_damping ;
3097
- ci.m_fh_distance = shapeprops-> m_fh_distance ;
3098
- ci.m_fh_normal = shapeprops-> m_fh_normal ;
3099
- ci.m_fh_spring = shapeprops-> m_fh_spring ;
3094
+ ci.m_do_fh = shapeprops. m_do_fh ;
3095
+ ci.m_do_rot_fh = shapeprops. m_do_rot_fh ;
3096
+ ci.m_fh_damping = shapeprops. m_fh_damping ;
3097
+ ci.m_fh_distance = shapeprops. m_fh_distance ;
3098
+ ci.m_fh_normal = shapeprops. m_fh_normal ;
3099
+ ci.m_fh_spring = shapeprops. m_fh_spring ;
3100
3100
3101
3101
ci.m_collisionFilterGroup =
3102
3102
(isbulletsensor) ? short (CcdConstructionInfo::SensorFilter) :
0 commit comments