Created
July 1, 2013 18:19
-
-
Save yoavlt/5903250 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 衝突検出方法の選択(デフォルトを選択) | |
btDefaultCollisionConfiguration *config = new btSoftBodyRigidBodyCollisionConfiguration(); | |
btCollisionDispatcher *dispatcher = new btCollisionDispatcher(config); | |
// ブロードフェーズ法の設定(Dynamic AABB tree method) | |
btDbvtBroadphase *broadphase = new btDbvtBroadphase(); | |
// 拘束(剛体間リンク)のソルバ設定 | |
btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver(); | |
// Bulletのワールド作成 | |
m_dynamic_world = new btSoftRigidDynamicsWorld(dispatcher, broadphase, solver, config, 0); | |
// 重力加速度の設定(OpenGLに合わせてy軸方向を上下方向にする) | |
// m_dynamic_world->setGravity(btVector3(0, -9.8, 0)); | |
m_world_info.m_dispatcher = dispatcher; | |
m_world_info.m_broadphase = broadphase; | |
m_world_info.m_sparsesdf.Initialize(); | |
m_world_info.m_gravity.setValue(0, -9.8, 0); | |
m_world_info.air_density = 1.2; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment