So the new Core setup will dramatically simplify Box2d.
What user contributions are being accepted?
What are the limits?
I notice all the conditional compilation has been removed.
The reason I ask is Box2D core as it sits not will almost compile in Linux. The only problem is _finite is a windows specific function. The Linux equivalent is finite().
Can this be fixed? (are we allowed?)
What are reasonable solutions. The easiest is to just conditionally compile the b2IsValid to use _finite in windows and finite in linux. However, this starts to push bo2xd back into the same situation we're trying to get out of.
How about a cross platform implementation of b2IsValid.
Another option is to allow conditional compilation in the b2Settings.h
Then just add the lines
Then it's up to individual platforms to provide an implementation. Of if you're feeling bold we could allow different platforms to add their definitions of _finite to b2Settings.cpp
-nick
What user contributions are being accepted?
What are the limits?
I notice all the conditional compilation has been removed.
The reason I ask is Box2D core as it sits not will almost compile in Linux. The only problem is _finite is a windows specific function. The Linux equivalent is finite().
Can this be fixed? (are we allowed?)
What are reasonable solutions. The easiest is to just conditionally compile the b2IsValid to use _finite in windows and finite in linux. However, this starts to push bo2xd back into the same situation we're trying to get out of.
How about a cross platform implementation of b2IsValid.
Code:
bool b2IsValid( float x )
{
if( x < std::numeric_limits<float>::infinite() &&
x > -std::numeric_limits<float>::infinite() )
{
return true;
}
return false;
}
{
if( x < std::numeric_limits<float>::infinite() &&
x > -std::numeric_limits<float>::infinite() )
{
return true;
}
return false;
}
Another option is to allow conditional compilation in the b2Settings.h
Then just add the lines
Code:
#ifndef _MSC_VER
extern int _finite( float f );
#endif
extern int _finite( float f );
#endif
Then it's up to individual platforms to provide an implementation. Of if you're feeling bold we could allow different platforms to add their definitions of _finite to b2Settings.cpp
-nick