| Package | sandy.primitive |
| Class | public class SkyBox |
| Inheritance | SkyBox TransformGroup ATransformable Node |
var mySkyBox:SkyBox = new SkyBox( "game_sky", 3000, 6, 6 ); // Set the appearance for the front, back, left, and right sides mySkyBox.front.appearance = new Appearance( new BitmapMaterial( myPic.bitmapData ) ); mySkyBox.back.appearance = new Appearance( new BitmapMaterial( myPic.bitmapData ) ); mySkyBox.left.appearance = new Appearance( new BitmapMaterial( myPic.bitmapData ) ); mySkyBox.right.appearance = new Appearance( new BitmapMaterial( myPic.bitmapData ) ); // Remove unneeded sides mySkyBox.top.remove(); mySkyBox.bottom.remove(); // Link the skybox to a group to display it aGroup.addChild( mySkyBox );
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | appearance : Appearance
Set that appearance to all the children of that node
| Node | |
| back : Plane3D
[read-only]
The back plane of the SkyBox.
| SkyBox | ||
| bottom : Plane3D
[read-only]
The bottom plane of the SkyBox.
| SkyBox | ||
![]() | boundingBox : BBox
The bounding box of this node
IMPORTANT: Do not modify it unless you perfectly know what you are doing
| Node | |
![]() | boundingSphere : BSphere
The bounding sphere of this node
IMPORTANT: Do not modify it unless you perfectly know what you are doing
| Node | |
![]() | broadcaster : BubbleEventBroadcaster
The broadcaster
The broadcaster is used to send events to listeners. | Node | |
![]() | changed : Boolean = false
This property set the cache status of the current node.
| Node | |
![]() | culled : CullingState
This property represent the culling state of the current node.
| Node | |
![]() | disable : Boolean = false
Disable the local transformations applied to this Node if set to false.
| ATransformable | |
![]() | enableBackFaceCulling : Boolean
Change the backface culling state to all the shapes objects in the children list
| Node | |
![]() | enableEvents : Boolean
Enable event handling to all the children objects that can broadcast bubbling events
| Node | |
![]() | enableInteractivity : Boolean
Change the interactivity of all the children
| Node | |
| front : Plane3D
[read-only]
The front plane of the SkyBox.
| SkyBox | ||
| left : Plane3D
[read-only]
The left plane of the SkyBox.
| SkyBox | ||
![]() | matrix : Matrix4 | ATransformable | |
![]() | name : String
Name of this node.
| Node | |
![]() | out : Vector
Forward direction ( local z ) in parent coordinates.
| ATransformable | |
![]() | pan : Number
Pans this object around the local y axis.
| ATransformable | |
![]() | parent : Node
The parent node of this node.
| Node | |
| right : Plane3D
[read-only]
The right plane of the SkyBox.
| SkyBox | ||
![]() | roll : Number
Rolls this object around the local z axis.
| ATransformable | |
![]() | rotateX : Number
Rotates this object around an axis parallel to the parents x axis.
| ATransformable | |
![]() | rotateY : Number
Rotates this object around an axis parallel to the parents y axis.
| ATransformable | |
![]() | rotateZ : Number
Rotates this object around an axis paralell to the parents z axis.
| ATransformable | |
![]() | scaleX : Number
x scale of this object.
| ATransformable | |
![]() | scaleY : Number
y scale of this object.
| ATransformable | |
![]() | scaleZ : Number
z scale of this object.
| ATransformable | |
![]() | scene : Scene3D = null
Reference to the scene is it linked to.
| Node | |
![]() | side : Vector
Side direction ( local x ) in parent coordinates.
| ATransformable | |
![]() | target : Vector
The position in the parent frame this object should "look at".
| ATransformable | |
![]() | tilt : Number
Tilts this object around the local x axis.
| ATransformable | |
| top : Plane3D
[read-only]
The top plane of the SkyBox.
| SkyBox | ||
![]() | up : Vector
Up direction ( local y ) in parent coordinates.
| ATransformable | |
![]() | useSingleContainer : Boolean
Make all the Shape3D and descendants children react to this value.
| Node | |
![]() | visible : Boolean = true
Specify the visibility of this node.
| Node | |
![]() | x : Number
x position of this object in its parent frame.
| ATransformable | |
![]() | y : Number
y position of this object in its parent frame.
| ATransformable | |
![]() | z : Number
z position of the node in its parent frame.
| ATransformable | |
| Method | Defined by | ||
|---|---|---|---|
|
SkyBox(p_sName:String = null, p_nDim:Number = 100, p_nQualityH:uint = 1, p_nQualityV:uint = 1)
Creates a SkyBox object.
| SkyBox | ||
![]() |
Adds a new child to this node.
| Node | |
![]() |
addEventListener(p_sEvt:String, p_oL:*):void
Adds a listener for the specified event.
| Node | |
![]() |
clone(p_sName:String):TransformGroup
| TransformGroup | |
![]() |
Tests this node against the camera frustum to get its visibility.
| TransformGroup | |
![]() |
destroy():void
Delete this node and all its child nodes.
| Node | |
![]() |
getChildByName(p_sName:String, p_bRecurs:Boolean = false):Node
Returns the child node with the specified name.
| Node | |
![]() |
getPosition(p_sMode:String = "local"):Vector
Returns the position of this group or object.
| ATransformable | |
![]() |
hasParent():Boolean
Tests if this node has a parent.
| Node | |
![]() |
initFrame():void
Initiates the local coordinate system for this object.
| ATransformable | |
![]() |
Tests if the node passed in the argument is parent of this node.
| Node | |
![]() |
lookAt(p_nX:Number, p_nY:Number, p_nZ:Number):void
Makes this object "look at" the specified position in the parent frame.
| ATransformable | |
![]() |
moveForward(p_nD:Number):void
Translates this object along its forward vector ( local z ) in the parent frame.
| ATransformable | |
![]() |
moveHorizontally(p_nD:Number):void
Translates this object parallel to its parent zx plane and in its forward direction.
| ATransformable | |
![]() |
moveLateraly(p_nD:Number):void
Translates this object laterally in its parent frame.
| ATransformable | |
![]() |
moveSideways(p_nD:Number):void
Translates this object along its side vector ( local x ) in the parent frame.
| ATransformable | |
![]() |
moveUpwards(p_nD:Number):void
Translates this object along its up vector ( local y ) in the parent frame.
| ATransformable | |
![]() |
moveVertically(p_nD:Number):void
Translates this object vertically in ots parent frame.
| ATransformable | |
![]() |
perform(p_iOperation:INodeOperation):void
Performs an operation on this node and all of its children.
| Node | |
![]() |
remove():void
Removes this node from the node tree, saving its child nodes.
| Node | |
![]() |
removeChildByName(p_sName:String):Boolean
Removes the child node with the specified name.
| Node | |
![]() |
removeEventListener(p_sEvt:String, p_oL:*):void
Removes a listener for the specified event.
| Node | |
![]() |
Renders all children of this transformgroup.
| TransformGroup | |
![]() |
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 | |
![]() |
setPosition(p_nX:Number, p_nY:Number, p_nZ:Number):void
Sets the position of this object in coordinates of its parent frame.
| ATransformable | |
![]() |
swapParent(p_oNewParent:Node):void
Moves this node to another parent node.
| Node | |
![]() |
toString():String
Returns a string representation of the TransformGroup.
| TransformGroup | |
![]() |
translate(p_nX:Number, p_nY:Number, p_nZ:Number):void
Translate this object from it's current position with the specified offsets.
| ATransformable | |
![]() |
Updates this node or object.
| ATransformable | |
![]() |
updateTransform():void
Updates the transform matrix of the current object/node before it is rendered.
| ATransformable | |
| back | property |
back:Plane3D [read-only]The back plane of the SkyBox.
Implementation public function get back():Plane3D
| bottom | property |
bottom:Plane3D [read-only]The bottom plane of the SkyBox.
Implementation public function get bottom():Plane3D
| front | property |
front:Plane3D [read-only]The front plane of the SkyBox.
Implementation public function get front():Plane3D
| left | property |
left:Plane3D [read-only]The left plane of the SkyBox.
Implementation public function get left():Plane3D
| right | property |
right:Plane3D [read-only]The right plane of the SkyBox.
Implementation public function get right():Plane3D
| top | property |
top:Plane3D [read-only]The top plane of the SkyBox.
Implementation public function get top():Plane3D
| SkyBox | () | constructor |
public function SkyBox(p_sName:String = null, p_nDim:Number = 100, p_nQualityH:uint = 1, p_nQualityV:uint = 1)Creates a SkyBox object.
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.
Parametersp_sName:String (default = null) — The name of the skybox. It is recommended to give a explicit name.
|
|
p_nDim:Number (default = 100) — The dimension of the skybox. This number is used for the width, height, and depth.
|
|
p_nQualityH:uint (default = 1) — Number of horizontal segments of the planes of the skybox. (WARNING: Some faces are rotated, and so, the quality isn't representative. To fix!)
|
|
p_nQualityV:uint (default = 1) — Number of vertical segments of the planes of the skybox. (WARNING: Some faces are rotated, and so, the quality isn't representative. To fix!)
|