Packagecom.fileitup.fisixengine.primitives
Classpublic class FisixContainer
ImplementsEngineObject
SubclassesCircleContainer, WheelContainer

A class for creating primitives which serve as the bounds for other objects. This class should never be instanciated and added to the engine. It is only extended by other containers.
It's important to note that, like all other objects in the engine, the objects within the container have global positions not relative to the the container.


Example
The following code creates a CircleContainer and adds a circle within it.
  //create the engine
  var myEngine:FisixEngine = new FisixEngine()
  
  var myContainer:CircleContainer = myEngine.newCircleContainer(200,200,100)
  myContainer.objects.newCircleParticle(100,150,10)
  

See also

com.fileitup.fisixengine.containers


Public Properties
 PropertyDefined by
  collisionObject : CollisionObject
The Primitive used as the container
FisixContainer
  innerDynamics : Boolean = true
A value specifying whether or not the movement of the objects inside the container affect the container's movement.
FisixContainer
  objects : FisixObject
A FisixObject which holds all the objects within the container.
FisixContainer
  parent : FisixObject
The FisixObject to which the Container belongs
FisixContainer
Public Methods
 MethodDefined by
  
FisixContainer(obj:CollisionObject, innerDyn:Boolean = true)
Creates a FisixContainer.
FisixContainer
  
dispose():void
Cleans the object so that it may be picked up by the garbage collector.
FisixContainer
  
integrate(dt:Number = 1):void
Integrates all the objects within the container.
FisixContainer
  
render(g:Graphics):void
Renders all the objects within the container to the given Graphics object
FisixContainer
  
solveContainment(noDynamics:Boolean = false):void
Solves collisions between the inner objects and the container.
FisixContainer
  
unload():void
Removes the container from the FisixObject it belongs to, and disposes of it.
FisixContainer
Property detail
collisionObjectproperty
public var collisionObject:CollisionObject

The Primitive used as the container

innerDynamicsproperty 
public var innerDynamics:Boolean = true

A value specifying whether or not the movement of the objects inside the container affect the container's movement.

objectsproperty 
public var objects:FisixObject

A FisixObject which holds all the objects within the container. To add objects to the container, use this property.

parentproperty 
public var parent:FisixObject

The FisixObject to which the Container belongs

Constructor detail
FisixContainer()constructor
public function FisixContainer(obj:CollisionObject, innerDyn:Boolean = true)

Creates a FisixContainer. This class should never be instanciated and added to the engine. It is only extended by other containers.

Parameters
obj:CollisionObject
 
innerDyn:Boolean (default = true)

See also

Method detail
dispose()method
public function dispose():void

Cleans the object so that it may be picked up by the garbage collector. To avoid errors, do not call this method before removing the object from the engine, or simply use unload()

See also

integrate()method 
public function integrate(dt:Number = 1):void

Integrates all the objects within the container. This method is called by the engine at the appropriate time, and should not be called manually.

Parameters
dt:Number (default = 1)
render()method 
public function render(g:Graphics):void

Renders all the objects within the container to the given Graphics object

Parameters
g:Graphics
solveContainment()method 
public function solveContainment(noDynamics:Boolean = false):void

Solves collisions between the inner objects and the container. This method is called by the engine at the appropriate time, and should not be called manually.

Parameters
noDynamics:Boolean (default = false)
unload()method 
public function unload():void

Removes the container from the FisixObject it belongs to, and disposes of it. This is the method that should be used when you are done with the container.