Packagealternativa.engine3d.core
Classpublic class Sprite3D
InheritanceSprite3D Inheritance Object3D

The class represents a point in 3d-space. A material can be assigned to Sprite3D to draw various images in place where it is located.



Public Properties
 PropertyDefined by
 Inheritedchildren : Set
A set of child objects.
Object3D
 Inheritedcoords : Point3D
Object coordinates.
Object3D
  material : SpriteMaterial
A material to visualize the sprite object.
Sprite3D
 Inheritedmobility : int
Mobility level.
Object3D
 InheritedmouseEnabled : Boolean = true
Specifies whether this object receives mouse messages.
Object3D
 Inheritedname : String
Object name.
Object3D
 Inheritedparent : Object3D
Parent object.
Object3D
 InheritedrotationX : Number
X-axis rotation angle in radians.
Object3D
 InheritedrotationY : Number
Y-axis rotation angle in radians.
Object3D
 InheritedrotationZ : Number
Z-axis rotation angle in radians.
Object3D
 InheritedscaleX : Number
X-axis scale coefficient.
Object3D
 InheritedscaleY : Number
Y-axis scale coefficient.
Object3D
 InheritedscaleZ : Number
Z-axis scale coefficient.
Object3D
 Inheritedscene : Scene3D
Scene containing given object.
Object3D
 Inheritedtransformation : Matrix3D
Full (global) transformation matrix of an object.
Object3D
 Inheritedx : Number
X coordinate.
Object3D
 Inheritedy : Number
Y coordinate.
Object3D
 Inheritedz : Number
Z coordinate.
Object3D
Public Methods
 MethodDefined by
  
Sprite3D(name:String = null)
Creates a new instance.
Sprite3D
 Inherited
Adds a child object.
Object3D
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener.
Object3D
 Inherited
Clones object.
Object3D
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event.
Object3D
 Inherited
forEach(func:Function):void
Calls the specified function for the object an all its children, passing the current object as an argument.
Object3D
 Inherited
getChildByName(name:String, deep:Boolean = false):Object3D
Gets a child object with the given name.
Object3D
 Inherited
globalToLocal(point:Point3D, result:Point3D = null):Point3D
Transforms a point form global coordinate system to an object's coordinate system
Object3D
 Inherited
hasEventListener(type:String):Boolean
Checks if there are registered event listeners for events of the specified type.
Object3D
 Inherited
localToGlobal(point:Point3D, result:Point3D = null):Point3D
Transforms a point from local coordinate system of an object to global coordinate system.
Object3D
 Inherited
Delete child object.
Object3D
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes an event listener.
Object3D
 Inherited
toString():String
Get string representation of object.
Object3D
 Inherited
willTrigger(type:String):Boolean
Object3D
Protected Methods
 MethodDefined by
  
addToScene(scene:Scene3D):void
Method is being called when adding object to scene.
Sprite3D
  
Copy source object properties.
Sprite3D
  
Create empty object without inner structure.
Sprite3D
  
defaultName():String
Default object name.
Sprite3D
  
Method is being called whed deleting object from a scene.
Sprite3D
Events
 EventSummaryDefined by
 Inherited Dispatched when a user presses and releases left mouse button over the same object.Object3D
 Inherited Dispatched when a user presses left mouse button over an object.Object3D
 Inherited Dispatched when a user moves mouse pointer while it is over an object.Object3D
 Inherited Dispatched when a user moves mouse pointer away from an object.Object3D
 Inherited Dispatched when a user moves mouse pointer over an object.Object3D
 Inherited Dispatched when a user releases left mouse button over an object.Object3D
 Inherited Dispatched when a user spins mouse wheel over an object.Object3D
Property detail
materialproperty
material:SpriteMaterial  [read-write]

A material to visualize the sprite object.

Implementation
    public function get material():SpriteMaterial
    public function set material(value:SpriteMaterial):void
Constructor detail
Sprite3D()constructor
public function Sprite3D(name:String = null)

Creates a new instance.

Parameters
name:String (default = null)name of the instance
Method detail
addToScene()method
protected override function addToScene(scene:Scene3D):void

Method is being called when adding object to scene. Descendants may redefine method for making specific actions.

Parameters
scene:Scene3Dscene, which object is being added to
clonePropertiesFrom()method 
protected override function clonePropertiesFrom(source:Object3D):void

Copy source object properties. This method is being used in clone() method and must be redefined in it's descendants to get a right object. Every descendant must copy only properties that were added to base class in this exact method. Inherited properties copying is made by calling super.clonePropertiesFrom(source).

Parameters
source:Object3Dobject, which properties are being copied
createEmptyObject()method 
protected override function createEmptyObject():Object3D

Create empty object without inner structure. For example, if geometrical primitive, when added, forms a bunch of vertices, faces and surfaces, this method don't create them. This method is being used in clone() and has to be redefined in descendants in order to get the right object.

Returns
Object3Da new empty object
defaultName()method 
protected override function defaultName():String

Default object name.

Returns
Stringdefault object name
removeFromScene()method 
protected override function removeFromScene(scene:Scene3D):void

Method is being called whed deleting object from a scene.Descendants may redefine method for making specific actions.

Parameters
scene:Scene3Dscena, from which the object is being deleted from