移動先: 概要 戻り値 関連項目. フラグ. MEL 例.
constrain [-barrier] [-damping float] [-directionalHinge] [-hinge] [-interpenetrate boolean] [-nail] [-name string] [-orientation float float float] [-pinConstraint] [-position float float float] [-restLength float] [-spring] [-stiffness float]
constrain は 「元に戻す」が可能、「照会」が可能、「編集」が可能 です。
このコマンドは、リジッドボディをワールド、あるいは他のリジッド ボディにコンストレインします。
なし
戻り値の型は照会モードでは照会フラグが基になります。
rigidBody, rigidSolver
barrier, damping, directionalHinge, hinge, interpenetrate, nail, name, orientation, pinConstraint, position, restLength, spring, stiffness
: コマンドの作成モードで使用可能なフラグ
|
: コマンドの編集モードで使用可能なフラグ
|
: コマンドの照会モードで使用可能なフラグ
|
: 1 つのコマンドで複数回使用可能なフラグ
|
// "Nail" a rigid body at position <<0.0, 2.5, 0.0>>
//
constrain -nail -p 0 2.5 0 rigidBody1;
// "Pin" two rigid bodies together at the position <<0.0, 2.5, 0.0>>.
//
constrain -pin -n pin -p 0 2.5 0 rigidBody1 rigidBody2;
// "Hinge" a rigid body at the position <<0.0, 2.5, 0.0>>.
//
constrain -hinge -p 0 2.5 0 rigidBody1;
// Create a barrier for a rigid body which will not allow the rigid body
// to fall below (in y by default) the plane defined by the
// barrier point <<0.0, 2.5, 0.0>>.
//
constrain -barrier -p 0 2.5 0 rigidBody1;
// Add a "Spring" to a rigid body at the position <<0.0, 2.5, 0.0>>
// connected on the rigid body at point <<0, 0, 0>>
//
constrain -spring -name spring -p 0 2.5 0 -rl 1.0 rigidBody1;