Envelope のインデックスとその関連頂点のインデックス間のマッピングにアクセスできるようにするClusterElementCollectionを戻します。一部のクラスタにEnvelope を適用する場合は、このプロパティが重要となります。このコマンドは、Envelope を適用するクラスタにあるCluster.Elementsを呼び出す操作に相当します。
パラメータ | タイプ | 詳細 |
---|---|---|
Time | Double | プロパティを取得する時間(フレーム)
デフォルト値:現在の時間(フレーム) |
'vbscript example that demonstrates how Envelope indices are mapped 'to indices of the points on the Geometry via the Envelope.Elements property newscene ,false set oSphere = ActiveSceneRoot.AddGeometry( "Sphere", "MeshSurface" ) 'Create a cluster that only contains some of the points. 'These are the only points that will be inflenced by the skeleton set oCluster = oSphere.ActivePrimitive.Geometry.AddCluster( _ siVertexCluster, "MyFrontPoints", Array( 5,10,12 ) ) 'Create the skeleton set oChainRoot = ActiveSceneRoot.Add3DChain set oEnvelope = oCluster.ApplyEnvelope( oChainRoot, siBranch ) aWeights = oEnvelope.Weights.Array for iElement=lbound(aWeights,2) to ubound(aWeights,2) 'Calculate the index of the point that corresponds to this 'index in the cluster iVertex = oEnvelope.Elements.Item( iElement ) logmessage "Envelope Weight " & iElement & _ " refers to point " & iVertex & " on the Geometry" next 'Output of this script is: 'INFO : "Envelope Weight 0 refers to point 5 on the Geometry" 'INFO : "Envelope Weight 1 refers to point 10 on the Geometry" 'INFO : "Envelope Weight 2 refers to point 12 on the Geometry" |