Class sandy.core.buffer.ZBuffer

Description

Buffer of the z-depths.

This class is not a real Z-buffer as it is in all the real 3D engines. It handles the Z-sorting of MovieClips that's all in fact. The movieClips are drawn is the correct order to create the good depth effect. As this technic is fast but not very accurate, you may have some sorting problems when object faces are too close, or with large faces.

Method Index

dispose(), push(), sort()

Method Detail

push

static public function push(o:Object):Void

Store an Object into the buffer.

Currently, an object must be into this form : {face:aFace, depth:zDepth}.

Parameters

o: An Object

sort

static public function sort(Void):Array

Sort the Array by depth, using Array#NUMERIC and Array#DESCENDING.

Return

The sorted Array

dispose

static public function dispose(Void):Void

Clear the current buffer.