Wild Magic 2 の物理シミュレーション | 小田九千のblog

Wild Magic 2 の物理シミュレーション

やっぱり、問題があったみたいだ。

http://www.wild-magic.com/UpdateHistory.html

14 Sep 2004. The removal of ParametricSurface::GetNormal required use of GetFrame instead.
Source/Physics/WmlRectangleSurface.cpp

Removed the explicit instantiation from WmlRigidBody.cpp, renamed the file to WmlRigidBody.inl, and #include it in WmlRigidBody.h. The g++ 3.x compilers on the Macintosh are failing to explicitly instantiate RigidBody (XCode 1.1 and XCode 1.5 both have the problem) and generates linker errors in many of the physics applications. The errors are about undefined symbols in the RigidBody class. You need to modify your project files: delete WmlRigidBody.cpp, add WmlRigidBody.inl. The new h and inl files are listed below. The CodeWarrior 9 builds worked fine, by the way. I did modify the Macintosh distribution of Wild Magic 2.4 to include the updated XCode project file and the WmlRigidBody files. I also had the KeplarPolarForm projects in the wrong directory and moved them to where they should have been.
Source/Physics/WmlRigidBody.h
Source/Physics/WmlRigidBody.inl
Wild Magic Physics 2.4 (Macintosh OS 10.3)

しかし、これでも解決はしていない。何やってんだか。:-(

WmlRigidBody.cpp は必要だ。以下のように書いてくれ。

#include "WmlRigidBody.h"
using namespace Wml;

//----------------------------------------------------------------------------
// explicit instantiation
//----------------------------------------------------------------------------
namespace Wml
{
template class WML_ITEM RigidBody;
template class WML_ITEM RigidBody;
}
//----------------------------------------------------------------------------

あと、ターゲットの /Source/Physics 以下のファイルのチェックが外れているので、全部チェックする必要がある。

他にも問題があったかもしれないが、とりあえず正常に動作した。