Packagesandy.core.scenegraph
Classpublic class Sprite3D
InheritanceSprite3D Inheritance Sprite2D Inheritance ATransformable Inheritance Node

The Sprite3D class is used to create a 3D sprite.

A Sprite3D can be seen as a special Sprite2D.
It has an appearance that is a movie clip containing 360 frames (as maximum!) with texture.

Depending on the camera position, a different frame of the clip is shown, givin a 3D effect.



Public Properties
 PropertyDefined by
 Inheritedappearance : Appearance
Set that appearance to all the children of that node
Node
 InheritedautoCenter : Boolean = true
When enabled, the sprite will be displayed at its graphical center.
Sprite2D
 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
 Inheritedcontainer : Sprite
The container of this sprite ( canvas )
Sprite2D
  content : DisplayObject
[write-only] The MovieClip that will used as content of this Sprite2D.
Sprite3D
 Inheritedculled : CullingState
This property represent the culling state of the current node.
Node
 Inheriteddepth : Number
The depth to draw this sprite at.
Sprite2D
 Inheriteddisable : Boolean = false
Disable the local transformations applied to this Node if set to false.
ATransformable
 InheritedenableBackFaceCulling : Boolean
Change the backface culling state to all the shapes objects in the children list
Node
 InheritedenableEvents : Boolean
Sprite2D
 InheritedenableForcedDepth : Boolean = false
Should forced depth be enable for this object?.
Sprite2D
 InheritedenableInteractivity : Boolean
Change the interactivity of all the children
Node
 InheritedfixedAngle : Boolean = false
Set this to true if you want this sprite to rotate with camera.
Sprite2D
 InheritedfloorCenter : Boolean = false
When enabled, the sprite will be displayed at its bottom line.
Sprite2D
 InheritedforcedDepth : Number = 0
The forced depth for this object.
Sprite2D
 Inheritedmaterial : Material
Material that the sprite will be dressed in.
Sprite2D
 Inheritedmatrix : Matrix4
ATransformable
 Inheritedname : String
Name of this node.
Node
  offset : uint = 0
Sprite3D
 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
 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
 Inheritedscale : Number
The scale of this sprite.
Sprite2D
 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
Tilts this object around the local x axis.
ATransformable
 Inheritedup : Vector
Up direction ( local y ) in parent coordinates.
ATransformable
 InheriteduseSingleContainer : Boolean
Make all the Shape3D and descendants children react to this value.
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_nDepth : Number
Sprite2D
 Inheritedm_nPerspScaleX : Number = 0
Sprite2D
 Inheritedm_nRotation : Number = 0
Sprite2D
 Inheritedm_oContent : DisplayObject
Sprite2D
 Inheritedm_oEB : BubbleEventBroadcaster
Node
 Inheritedm_oMaterial : Material
Sprite2D
 Inheritedm_oPreviousOffsetRotation : Vector
ATransformable
 Inheritedm_tmpMt : Matrix4
ATransformable
 Inherited_nScale : Number
Sprite2D
 Inherited_oScale : Vector
ATransformable
 Inherited_p : Vector
ATransformable
 Inherited_v : Vertex
Sprite2D
 Inherited_vOut : Vector
ATransformable
 Inherited_vSide : Vector
ATransformable
 Inherited_vUp : Vector
ATransformable
Public Methods
 MethodDefined by
  
Sprite3D(p_sName:String = "", p_oContent:MovieClip = null, p_nScale:Number = 1, p_nOffset:Number = 0)
Creates a Sprite3D
Sprite3D
 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
clear():void
Clears the graphics object of this object's container.
Sprite2D
 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.
Sprite2D
 Inherited
destroy():void
Delete this node and all its child nodes.
Node
 Inherited
display(p_oScene:Scene3D, p_oContainer:Sprite = null):void
Displays this sprite.
Sprite2D
 Inherited
getChildByName(p_sName:String, p_bRecurs:Boolean = false):Node
Returns the child node with the specified name.
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
perform(p_iOperation:INodeOperation):void
Performs an operation on this node and all of its children.
Node
 Inherited
remove():void
Provide the classical remove behaviour, plus remove the container to the display list.
Sprite2D
 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
  
render(p_oScene:Scene3D, p_oCamera:Camera3D):void
Renders this 3D sprite
Sprite3D
 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
setBoundingSphereRadius(p_nRadius:Number):void
Sets the radius of bounding sphere for this sprite.
Sprite2D
 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
Sprite2D
 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
Protected Methods
 MethodDefined by
 Inherited
_onInteraction(p_oEvt:Event):void
Sprite2D
Public Constants
 ConstantDefined by
 Inheritedchildren : Array
The children of this node are stored inside this array.
Node
 Inheritedid : uint
The unique id of this node in the node graph.
Node
 InheritedmodelMatrix : Matrix4
Cached matrix corresponding to the transformation to the 0,0,0 frame system
Node
 InheritedviewMatrix : Matrix4
Cached matrix corresponding to the transformation to the camera frame system
Node
Property detail
contentproperty
content:DisplayObject  [write-only]

The MovieClip that will used as content of this Sprite2D. If this MovieClip has already a scree position, it will be reseted to 0,0.

Implementation
    public function set content(value:DisplayObject):void
offsetproperty 
public var offset:uint = 0
Constructor detail
Sprite3D()constructor
public function Sprite3D(p_sName:String = "", p_oContent:MovieClip = null, p_nScale:Number = 1, p_nOffset:Number = 0)

Creates a Sprite3D

Parameters
p_sName:String (default = "") — A string identifier for this object
 
p_oContent:MovieClip (default = null) — The Movieclip containing the pre-rendered textures
 
p_nScale:Number (default = 1) — A number used to change the scale of the displayed object. In case that the object projected dimension isn't adapted to your needs. Default value is 1.0 which means unchanged. A value of 2.0 will double object size. A value of 0 will force original graphics size independent of distance.
 
p_nOffset:Number (default = 0) — A number between [0-360] to give angle offset into the clip.
Method detail
render()method
public override function render(p_oScene:Scene3D, p_oCamera:Camera3D):void

Renders this 3D sprite

Parameters
p_oScene:Scene3D — The current scene
 
p_oCamera:Camera3D — The current camera