SelectConstrainedObjects

導入

v3.0

詳細

指定のオブジェクトまたは選択したオブジェクトに拘束されているオブジェクトを含む Selection をリセットします。

スクリプト構文

SelectConstrainedObjects( [ConstrainingObj] );

パラメータ

パラメータ タイプ 説明
ConstrainingObj 文字列または X3DObject 他のオブジェクトを拘束しているオブジェクト。

デフォルト値: 現在選択されている値

JScript の例

/*

	This example demonstrates the SelectConstrainingObjects and 

	SelectConstrainedObjects commands.

*/

NewScene( null, false ) ;

var oRoot0 = Create2DSkeleton( 0, -0.2, 3.0, 0, 2, 0.2, 0, 90, 0, 4 );

var oRoot1 = Create2DSkeleton( 0, -1, 2.0, 0, 4, 0.1, 0, 90, 0, 4 ) ;

var oCube = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" ) ;

// Constrain both skeletons to the cube

ApplyCns( "Position",oRoot0.Effector, oCube ) ;

ApplyCns( "Position",oRoot1.Effector, oCube ) ;

// Give the constrained object, select its constrainer

SelectConstrainingObjects( oRoot1.Effector )

// Expect "cube"

Logmessage( Selection.GetAsText() ) ;

// Give the Constrainer select the constrained objects

SelectConstrainedObjects( oCube ) ;

// Expect "eff1,eff"

LogMessage( Selection.GetAsText() ) ;

関連項目

Constraint Kinematics.Constraints ApplyCns GetConstrainedObjects SelectConstrainingObjects