/MPRTest

A demonstration of the Minkowski Portal Refinement algorithm

Primary LanguageRubyOtherNOASSERTION

MPRTest : A demonstration of the Minkowski Portal Refinement algorithm

Demonstrates intersection tests with the Minkowski Portal Refinement (MPR) algorithm, introduced by Gary Snethen.

  • Last Update: Jan 08, 2022
  • Since: Nov 16, 2008

Example:

  • Cone-Cylinder (not colliding)

  • Cone-Cylinder (detected colliding position and penetration)

Prerequisites

Usage

X:\> ruby Application.rb
  • The two objects are rendered with transparency when the intersection test (MPRAlgorithm::get_contact()) returns true;

Operation

  • Q or Esc : quit.
  • Space : reset the objects' setting.
  • WASD : move red object.
  • Z : change type of shape0 (red)
  • IJKL : move blue object.
  • M : change type of shape1 (blue)
  • Mouse L/R : move eye position.

Reference

License

All source codes are available under the terms of the zlib/libpng license (see LICENSE.txt).


MPRTest : Minkowski Portal Refinement アルゴリズムのデモプログラム

Gary Snethen 氏による Minkowski Portal Refinement (MPR) アルゴリズムのデモプログラムです。

必要なもの

使い方

X:\> ruby Application.rb
  • 交差判定 (MPRAlgorithm::get_contact()) が true となる場合に、2つの箱が半透明で描画されます。

Operation

  • Q または Esc : プログラムの終了
  • Space : オブジェクトの設定をリセット
  • WASD : 赤いオブジェクトの移動
  • Z : 赤いオブジェクトの形状変更
  • IJKL : 青いオブジェクトの移動
  • M : 青いオブジェクトの形状変更
  • マウスでの L/R : 視点の移動

参考文献

License

ソースコードは zlib/libpng ライセンスの条件下で利用可能です。