Papervision3D 2.0 > DisplayObjectContainer3D

DisplayObjectContainer3D Class


パッケージ org.papervision3d.core.proto
クラス DisplayObjectContainer3D
継承 DisplayObjectContainer3D→EventDispatcher
サブクラス DisplayObject3D,SceneObject3D

DisplayObjectContainer3DのクラスはDisplayObject3Dのコンテナとして使えるすべてのオブジェクトのための基本クラスです。
それぞれのDisplayObjectContainer3Dオブジェクトには、それ自身の子のリストがあります。


パブリックプロパティ

プロパティ名 定義元
children : Object
[read-only] 子オブジェクトを返します。
DisplayObjectContainer3D
numChildren : int
[read-only]子のオブジェクトの数を返します。
DisplayObjectContainer3D
root : DisplayObjectContainer3D
[read-only]シーン。(ツリー構造の最も上のdisplayObjectContainer3D)
DisplayObjectContainer3D

プロテクトプロパティ

プロパティ名 定義元
_children : Dictionary
[internal-use] Names indexed by children.
DisplayObjectContainer3D
_childrenByName : Object
[internal-use] Children indexed by name.
DisplayObjectContainer3D

パブリックメソッド

メソッド名 定義元
DisplayObjectContainer3D()
新しいDisplayObjectContainer3Dオブジェクトを作成します。
DisplayObjectContainer3D
addChild(child:DisplayObject3D, name:String = null) : DisplayObject3D
このDisplayObjectContainerインスタンスに子供DisplayObject3Dインスタンスを追加します。
DisplayObjectContainer3D
addChildren(parent:DisplayObject3D) : DisplayObjectContainer3D
このDisplayObjectContainerインスタンスにDisplayObject3Dインスタンスのすべての子供を加えます。
DisplayObjectContainer3D
addCollada(filename:String, materials:MaterialsList = null, scale:Number = 1) : void
このメソッドは推奨しません。
DisplayObjectContainer3D
childrenList() : String
オブジェクトのリストがあるストリング値を返します。
DisplayObjectContainer3D
getChildByName(name:String) : DisplayObject3D
指定された名前で存在する子DisplayObject3Dオブジェクトを返します。
DisplayObjectContainer3D
removeChild(child:DisplayObject3D) : DisplayObject3D
DisplayObjectContainer3Dインスタンスの子のリストから指定された子のDisplayObject3Dインスタンスを削除します。
DisplayObjectContainer3D
removeChildByName(name:String) : DisplayObject3D
DisplayObjectContainer3Dインスタンスの子のリストから指定された名前の子DisplayObject3Dインスタンスを削除します。
DisplayObjectContainer3D
toString() : String
オブジェクトのリストがあるストリング値を返します。
DisplayObjectContainer3D


プロパティの詳細


_children プロパティ
protected var _children:Dictionary

[internal-use] Names indexed by children.



children : プロパティ
children:Object [read-only]

子供オブジェクトを返します。

実装
public function get children():Object



_childrenByName プロパティ
protected var _childrenByName:Object

[internal-use] Children indexed by name.



numChildren プロパティ
numChildren:int [read-only]

子のオブジェクトの数を返します。

実装
public function get numChildren():int



root プロパティ
public var root:DisplayObjectContainer3D

[read-only]シーン。(ツリー構造の最も上のdisplayObjectContainer3D)



コンストラクタの詳細

DisplayObjectContainer3D() : コンストラクタ
public function DisplayObjectContainer3D()

新しいDisplayObjectContainer3Dオブジェクトを作成します。



メソッドの詳細

addChild() メソッド
public function addChild(child:DisplayObject3D, name:String = null):DisplayObject3D

このDisplayObjectContainerインスタンスに子DisplayObject3Dインスタンスを追加します。
[TODO もし既に異なったディスプレイオブジェクトコンテナを親に持つ子オブジェクトを加えるなら、そのディスプレイオブジェクトコンテナの子のリストからオブジェクトを削除します。]

パラメータ
  child:DisplayObject3D — このDisplayObjectContainer3Dインスタンスの子供として加えるDisplayObject3Dインスタンス。
  name:String (default = null) — 追加、または作成する子供の任意の名前。もし名前を入力しないなら、子供の名前を使用します。

戻り値
  DisplayObject3D — 追加、または作成したDisplayObject3Dインスタンス。



addChildren() メソッド
public function addChildren(parent:DisplayObject3D):DisplayObjectContainer3D

このDisplayObjectContainerインスタンスにDisplayObject3Dインスタンスのすべての子供を加えます。

パラメータ
  parent:DisplayObject3D —加える子供を含むDisplayObjectContainer3Dインスタンス。

戻り値
  DisplayObjectContainer3D — 追加、または作成したDisplayObject3Dインスタンス。



addCollada() : メソッド
public function addCollada( filename :String, materials :MaterialsList=null, scale :Number=1 ):void

このメソッドは推奨しません。

パラメータ
  filename:String
  materials:MaterialsList (default = null)
  scale:Number (default = 1)



childrenList() メソッド
public function childrenList():String

オブジェクトのリストがあるストリング値を返します。

戻り値
  String —ストリング



getChildByName() メソッド
public function getChildByName(name:String):DisplayObject3D

指定された名前の子ディスプレイオブジェクトを返します。
もし指定された名前の子ディスプレイオブジェクトがリストに複数存在する場合、メソッドは子のリストにおける最初のオブジェクトを返します。

パラメータ
  name:String — 返す子供の名前。

戻り値
  DisplayObject3D — 指定された名前がある子供ディスプレイオブジェクト。



removeChild() メソッド
public function removeChild(child:DisplayObject3D):DisplayObject3D

DisplayObjectContainer3Dインスタンスの子のリストから指定された子DisplayObject3Dインスタンスを取り除きます。
[TODO The parent property of the removed child is set to null, and the object is garbage collected if no other references to the child exist.]
The garbage collector is the process by which Flash Player reallocates unused memory space. When a variable or object is no longer actively referenced or stored somewhere, the garbage collector sweeps through and wipes out the memory space it used to occupy if no other references to it exist.

パラメータ
  child:DisplayObject3D — 取り除くDisplayObject3Dインスタンス。

戻り値
  DisplayObject3D — The DisplayObject3D instance that you pass in the child parameter.



removeChildByName() メソッド
public function removeChildByName(name:String):DisplayObject3D

DisplayObjectContainer3Dインスタンスの子のリストから指定された名前の子DisplayObject3Dインスタンスを取り除きます。
もし指定された名前の子ディスプレイオブジェクトがリストに複数存在する場合、メソッドは子のリストにおける最初のオブジェクトを削除します。
[TODO The parent property of the removed child is set to null, and the object is garbage collected if no other references to the child exist.]
The garbage collector is the process by which Flash Player reallocates unused memory space. When a variable or object is no longer actively referenced or stored somewhere, the garbage collector sweeps through and wipes out the memory space it used to occupy if no other references to it exist.

パラメータ
  name:String — 削除する子供の名前。

戻り値
  DisplayObject3D — 取り除かれたDisplayObject3Dインスタンス。



toString() メソッド
public override function toString():String

オブジェクトのリストがあるストリング値を返します。

戻り値
  String — ストリング

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

最終更新:2008年02月20日 18:29