Packagesandy.primitive
Classpublic class SkyBox
InheritanceSkyBox Inheritance TransformGroup Inheritance ATransformable Inheritance Node


Example
To create a skybox, apply some appearance and, if needed, remove some of the sides
   // -- creation of the skybox
   var l_oSkyBox:SkyBox = new SkyBox( "game_sky", 3000, 6, 6 );
   // -- Access to FRONT, BACK, LEFT and RIGHT planes, and set an appearance
  l_oSkyBox.front.appearance = new Appearance( new BitmapMaterial( lPic.bitmapData ) );
  l_oSkyBox.back.appearance = new Appearance( new BitmapMaterial( lPic.bitmapData ) );
  l_oSkyBox.left.appearance = new Appearance( new BitmapMaterial( lPic.bitmapData ) );
  l_oSkyBox.right.appearance = new Appearance( new BitmapMaterial( lPic.bitmapData ) );
  // -- In case you don't need some of the skybox side, access to them, and remove them.
  l_oSkyBox.top.remove();
  l_oSkyBox.bottom.remove();
  // -- link the skybox to a group to make is displayable
  l_oGroup.addChild( l_oSkyBox );
   



Public Properties
 PropertyDefined by
  back : Plane3D
[read-only]
SkyBox
  bottom : Plane3D
[read-only]
SkyBox
 InheritedboundingBox : BBox
The bounding box of this node IMPORTANT: Do not modify it unless you perfectly know what you are doing
Node
 InheritedboundingSphere : BSphere
The bounding sphere of this node IMPORTANT: Do not modify it unless you perfectly know what you are doing
Node
 Inheritedbroadcaster : BubbleEventBroadcaster
The broadcaster

The broadcaster is used to send events to listeners.
This property is a BubbleEventBroadcaster.

Node
 Inheritedchanged : Boolean = false
This property set the cache status of the current node.
Node
 Inheritedchildren : Array
The children of this node are stored inside this array.
Node
 Inheritedculled : CullingState
This property represent the culling state of the current node.
Node
 Inheriteddisable : Boolean = false
Disable the local transformations applied to this Node if set to false.
ATransformable
  front : Plane3D
[read-only]
SkyBox
  left : Plane3D
[read-only]
SkyBox
 Inheritedmatrix : Matrix4
ATransformable
 InheritedmodelMatrix : Matrix4
Cached matrix corresponding to the transformation to the 0,0,0 frame system
Node
 Inheritedname : String
Name of this node.
Node
 Inheritedout : Vector
Forward direction ( local z ) in parent coordinates.
ATransformable
 Inheritedpan : Number
Pans this object around the local y axis.
ATransformable
 Inheritedparent : Node
The parent node of this node.
Node
  right : Plane3D
[read-only]
SkyBox
 Inheritedroll : Number
Rolls this object around the local z axis.
ATransformable
 InheritedrotateX : Number
Rotates this object around an axis parallel to the parents x axis.
ATransformable
 InheritedrotateY : Number
Rotates this object around an axis parallel to the parents y axis.
ATransformable
 InheritedrotateZ : Number
Rotates this object around an axis paralell to the parents z axis.
ATransformable
 InheritedscaleX : Number
x scale of this object.
ATransformable
 InheritedscaleY : Number
y scale of this object.
ATransformable
 InheritedscaleZ : Number
z scale of this object.
ATransformable
 Inheritedscene : Scene3D = null
Reference to the scene is it linked to.
Node
 Inheritedside : Vector
Side direction ( local x ) in parent coordinates.
ATransformable
 Inheritedtarget : Vector
The position in the parent frame this object should "look at".
ATransformable
 Inheritedtilt : Number
Getter for the tilt value
ATransformable
  top : Plane3D
[read-only]
SkyBox
 Inheritedup : Vector
Up direction ( local y ) in parent coordinates.
ATransformable
 InheritedviewMatrix : Matrix4
Cached matrix corresponding to the transformation to the camera frame system
Node
 Inheritedvisible : Boolean = true
Specify the visibility of this node.
Node
 Inheritedx : Number
x position of this object in its parent frame.
ATransformable
 Inheritedy : Number
y position of this object in its parent frame.
ATransformable
 Inheritedz : Number
z position of the node in its parent frame.
ATransformable
Protected Properties
 PropertyDefined by
 Inheritedm_oEB : BubbleEventBroadcaster
Node
 Inheritedm_oPreviousOffsetRotation : Vector
ATransformable
 Inheritedm_tmpMt : Matrix4
ATransformable
 Inherited_oScale : Vector
ATransformable
 Inherited_p : Vector
ATransformable
 Inherited_vOut : Vector
ATransformable
 Inherited_vSide : Vector
ATransformable
 Inherited_vUp : Vector
ATransformable
Public Methods
 MethodDefined by
  
SkyBox(p_sName:String = "", p_nDim:Number = 100, p_nQualityH:uint = 1, p_nQualityV:uint = 1, p_bDisable:Boolean = true)
Creates a SkyBox objets

The skybox is created as a TransformGroup.

SkyBox
 Inherited
addChild(p_oChild:Node):void
Adds a new child to this node.
Node
 Inherited
addEventListener(p_sEvt:String, p_oL:*):void
Adds a listener for the specified event.
Node
 Inherited
cull(p_oScene:Scene3D, p_oFrustum:Frustum, p_oViewMatrix:Matrix4, p_bChanged:Boolean):void
Tests this node against the camera frustum to get its visibility.
TransformGroup
 Inherited
destroy():void
Delete this node and all its child nodes.
Node
 Inherited
getChildByName(p_sName:String, p_bRecurs:Boolean = false):Node
Returns the child node with the specified name.
Node
 Inherited
getChildFromId(p_nId:uint, p_bRecurs:Boolean = false):Node
Returns the child node with the specified id.
Node
 Inherited
getChildList():Array
Returns an array with all child nodes of this node.
Node
 Inherited
getPosition(p_sMode:String = "local"):Vector
Returns the position of this group or object.
ATransformable
 Inherited
hasParent():Boolean
Tests if this node has a parent.
Node
 Inherited
initFrame():void
Initiates the local coordinate system for this object.
ATransformable
 Inherited
isParent(p_oNode:Node):Boolean
Tests if the node passed in the argument is parent of this node.
Node
 Inherited
lookAt(p_nX:Number, p_nY:Number, p_nZ:Number):void
Makes this object "look at" the specified position in the parent frame.
ATransformable
 Inherited
moveForward(p_nD:Number):void
Translates this object along its forward vector ( local z ) in the parent frame.
ATransformable
 Inherited
moveHorizontally(p_nD:Number):void
Translates this object parallel to its parent zx plane and in its forward direction.
ATransformable
 Inherited
moveLateraly(p_nD:Number):void
Translates this object laterally in its parent frame.
ATransformable
 Inherited
moveSideways(p_nD:Number):void
Translates this object along its side vector ( local x ) in the parent frame.
ATransformable
 Inherited
moveUpwards(p_nD:Number):void
Translates this object along its up vector ( local y ) in the parent frame.
ATransformable
 Inherited
moveVertically(p_nD:Number):void
Translates this object vertically in ots parent frame.
ATransformable
 Inherited
remove():void
Removes this node from the node tree, saving its child nodes.
Node
 Inherited
removeChildById(p_nId:Number):Boolean
Removes the child node with the specified id.
Node
 Inherited
removeChildByName(p_sName:String):Boolean
Removes the child node with the specified name.
Node
 Inherited
removeEventListener(p_sEvt:String, p_oL:*):void
Removes a listener for the specified event.
Node
 Inherited
render(p_oScene:Scene3D, p_oCamera:Camera3D):void
Renders all children of this transformgroup.
TransformGroup
 Inherited
rotateAxis(p_nX:Number, p_nY:Number, p_nZ:Number, p_nAngle:Number):void
Rotate this object around the specified axis in the parent frame by the specified angle.
ATransformable
 Inherited
setPosition(p_nX:Number, p_nY:Number, p_nZ:Number):void
Sets the position of this object in coordinates of its parent frame.
ATransformable
 Inherited
swapParent(p_oNewParent:Node):void
Moves this node to another parent node.
Node
 Inherited
toString():String
Returns a string representation of the TransformGroup.
TransformGroup
 Inherited
translate(p_nX:Number, p_nY:Number, p_nZ:Number):void
Translate this object from it's current position with the specified offsets.
ATransformable
 Inherited
update(p_oScene:Scene3D, p_oModelMatrix:Matrix4, p_bChanged:Boolean):void
Updates this node or object.
ATransformable
 Inherited
Updates the transform matrix of the current object/node before it is rendered.
ATransformable
Public Constants
 ConstantDefined by
 Inheritedid : uint
The unique id of this node in the node graph.
Node
Property detail
backproperty
back:Plane3D  [read-only]Implementation
    public function get back():Plane3D
bottomproperty 
bottom:Plane3D  [read-only]Implementation
    public function get bottom():Plane3D
frontproperty 
front:Plane3D  [read-only]Implementation
    public function get front():Plane3D
leftproperty 
left:Plane3D  [read-only]Implementation
    public function get left():Plane3D
rightproperty 
right:Plane3D  [read-only]Implementation
    public function get right():Plane3D
topproperty 
top:Plane3D  [read-only]Implementation
    public function get top():Plane3D
Constructor detail
SkyBox()constructor
public function SkyBox(p_sName:String = "", p_nDim:Number = 100, p_nQualityH:uint = 1, p_nQualityV:uint = 1, p_bDisable:Boolean = true)

Creates a SkyBox objets

The skybox is created as a TransformGroup. This is a special behaviour comparing the other primitives which directly extend Shape3D. A skyBox isn't a graphical object itself, but it is composed of 6 planes (Plane3D objects) that represents the 6 sides of the skybox.

The planes are automatically created, and placed for you. You can access them individually thanks to the getter methods. The planes are created with a default name, which is simply the concatenation of the skybox name and "_left" for the left side, "_top" for the top side etc.

Parameters
p_sName:String (default = "") — The name of the skybox. It is recommended to give a explicit name.
 
p_nDim:Number (default = 100) — The dimension of the skybox
 
p_nQualityH:uint (default = 1) — The horizontal quality of the skybox (WARNING:Some faces are rotated, and so, the quality isn't representative. To fix!)
 
p_nQualityV:uint (default = 1) — The vertical quality of the skybox (WARNING:Some faces are rotated, and so, the quality isn't representative. To fix!)
 
p_bDisable:Boolean (default = true) — - default true - A boolean value if enabled make the SkyBox static.