Added debug traps
This commit is contained in:
parent
68dc5be9cb
commit
c8e8d3510d
|
@ -51,6 +51,15 @@ namespace
|
||||||
Float4 protoG = protoState.GetLinearMomentum( worldPointOfContact.xyz ),
|
Float4 protoG = protoState.GetLinearMomentum( worldPointOfContact.xyz ),
|
||||||
deuterG = deuterState.GetLinearMomentum( worldPointOfContact.xyz );
|
deuterG = deuterState.GetLinearMomentum( worldPointOfContact.xyz );
|
||||||
|
|
||||||
|
if( normal != normal ) // debug: trap
|
||||||
|
const char *breakpoint = "This should never happen";
|
||||||
|
|
||||||
|
if( protoG != protoG ) // debug: trap
|
||||||
|
const char *breakpoint = "This should never happen";
|
||||||
|
|
||||||
|
if( deuterG != deuterG ) // debug: trap
|
||||||
|
const char *breakpoint = "This should never happen";
|
||||||
|
|
||||||
Float protoG_Magnitude = protoG.Dot( normal ),
|
Float protoG_Magnitude = protoG.Dot( normal ),
|
||||||
deuterG_Magnitude = deuterG.Dot( normal );
|
deuterG_Magnitude = deuterG.Dot( normal );
|
||||||
|
|
||||||
|
@ -107,6 +116,9 @@ namespace
|
||||||
deuterG_Magnitude = -deuterG_Magnitude;
|
deuterG_Magnitude = -deuterG_Magnitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( normal != normal ) // debug: trap
|
||||||
|
const char *breakpoint = "This should never happen";
|
||||||
|
|
||||||
// bounce
|
// bounce
|
||||||
Float4 bounceP = normal * Formula::CollisionResponse::Bounce( protoState.GetRestitutionCoeff(),
|
Float4 bounceP = normal * Formula::CollisionResponse::Bounce( protoState.GetRestitutionCoeff(),
|
||||||
protoState.GetMass(), protoG_Magnitude,
|
protoState.GetMass(), protoG_Magnitude,
|
||||||
|
@ -223,6 +235,9 @@ void API_Impl::Update()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( gravityImpulse != gravityImpulse ) // debug: trap
|
||||||
|
const char *breakpoint = "This should never happen";
|
||||||
|
|
||||||
if( gravityImpulse != Float4::null )
|
if( gravityImpulse != Float4::null )
|
||||||
{
|
{
|
||||||
state.ApplyLinearImpulse( gravityImpulse.xyz );
|
state.ApplyLinearImpulse( gravityImpulse.xyz );
|
||||||
|
|
Loading…
Reference in New Issue