Constructor

new(data:MeshData, materials:Vector<MaterialData>)

Variables

@:value(null)data:MeshData = null

@:value(false)read onlydepthRead:Bool = false

@:value(null)force_context:String = null

@:value(true)frustumCulling:Bool = true

@:value(0)materialIndex:Int = 0

@:value(null)morphTarget:MorphTarget = null

@:value(null)particleChildren:Array<MeshObject> = null

@:value(-1)particleIndex:Int = -1

@:value(null)particleOwner:MeshObject = null

@:value(null)particleSystems:Array<ParticleSystem> = null

@:value(0.0)screenSize:Float = 0.0

@:value(null)skip_context:String = null

@:value(null)tilesheet:Tilesheet = null

Methods

inlinecomputeCameraDistance(camX:Float, camY:Float, camZ:Float):Void

render(g:Graphics, context:String, bindParams:Array<String>):Void

setupTilesheet(sceneName:String, tilesheet_ref:String, tilesheet_action_ref:String):Void

Inherited Variables

Defined by Object

@:value(null)animation:Animation = null

@:value([])children:Array<Object> = []

@:value(null)constraints:Array<Constraint> = null

@:value(false)culled:Bool = false

@:value(false)culledMesh:Bool = false

@:value(false)culledShadow:Bool = false

@:value(null)lods:Array<Object> = null

@:value("")name:String = ""

@:value(null)parent:Object = null

@:value(null)properties:Map<String, Dynamic> = null

@:value(null)raw:TObj = null

@:value([])traits:Array<Trait> = []

@:value(true)visible:Bool = true

@:value(true)visibleMesh:Bool = true

@:value(true)visibleShadow:Bool = true

Inherited Methods

Defined by Object

@:value({ parentInverse : false })inlineaddChild(o:Object, parentInverse:Bool = false):Void

Deprecated: "addChild() is deprecated, please use setParent() instead"

Add a game Object as a child of this game Object.

Parameters:

o

The game Object instance to be added as a child.

parentInverse

Optional (default false) change the scale of the child object to be relative to the parents 3D space or use the original scale.

@:access(iron.Trait)addTrait(t:Trait):Void

getChild(name:String):Object

Get a child game Object of this game Object. Using the childs name property as a lookup.

Parameters:

name

A string matching the name property of the game Object to fetch.

Returns:

Object or null

getChildOfType<T>(type:Class<T>):T

@:value({ recursive : false })getChildren(recursive:Bool = false):Array<Object>

Returns the children of the object.

If 'recursive' is set to false, only direct children will be included in the returned array. If recursive is true, children of children and so on will be included too.

Parameters:

recursive

= false Include children of children

Returns:

getTrait<T>(c:Class<T>):T

Get the Trait instance that is attached to this game Object.

Parameters:

c

The class of type Trait to attempt to retrieve.

Returns:

Trait or null

@:value({ keepTransform : false })inlineremoveChild(o:Object, keepTransform:Bool = false):Void

Deprecated: "removeChild() is deprecated, please use setParent(null) instead"

Remove a child game Object from it's parentage. Does not remove the object from the scene.

Parameters:

o

The game Object instance to be removed.

keepTransform

Optional (defaut false) keep the transform given by the parent or revert to the objects default.

@:access(iron.Trait)removeTrait(t:Trait):Void

Remove the Trait from the Object.

Parameters:

t

The Trait to be removed from the game Object.

@:value({ keepTransform : false, parentInverse : false })setParent(parentObject:Object, parentInverse:Bool = false, keepTransform:Bool = false):Void

Set the given parentObject as the parent of this object.

If parentObject is null, the object is parented to the scene's sceneParent, which is the topmost object of the scene tree. If you want to remove it from the scene, use Object.remove() instead.

If parentObject is the object on which this function is called, nothing happens.

Parameters:

parentObject

The new parent object.

parentInverse

(Optional) Change the scale of the child object to be relative to the new parents 3D space or use the original scale.

keepTransform

(Optional) When unparenting from the old parent, keep the transform given by the old parent or revert to the object's default.