Away3D 3.6 and FLARToolkit

Discussion about FLARManager, the ightweight framework that makes it easier to build augmented reality applications for Flash

Moderator: ericsoco

Posts: 3
Joined: Thu Jan 27, 2011 1:30 pm

Away3D 3.6 and FLARToolkit

Postby laurid » Wed Oct 05, 2011 3:03 am

I know this is the FLARManager Forum, but in the GoogleGroup ( I couldn't find any help.

I know that FlarManager supports Away3d 3.6, but FlarToolkit does not. I can't use FlarManager, because it runs much slower than FlarToolkit itself (even with only one Marker/Pattern). But maybe someone can help me out with the 3D Transformations. I have to update the two Classes and in I figured out that Flar Manager is doing the 3D Transformations in these two Classes: ... ...

I did some reverse engineering and rewrote the class FLARBaseNode. But it's not working:

Code: Select all

   import away3d.containers.ObjectContainer3D;
   import flash.geom.Matrix3D;
   import flash.geom.Vector3D;
   import org.libspark.flartoolkit.core.transmat.FLARTransMatResult;
   public class FLARBaseNode extends ObjectContainer3D {
      public function FLARBaseNode(...initarray) {
      private var _tmp:Matrix3D = new Matrix3D;
      public function setTransformMatrix(r:FLARTransMatResult):void {
         var m:Matrix3D=new Matrix3D(Vector.<Number>([
            r.m00,   r.m01,   r.m02,   r.m03,
            r.m10,   r.m11,   r.m12,   r.m13,
            r.m20,   r.m21,   r.m22,   r.m23,
            0,      0,      0,      1
      public static function convertMatrixToAwayMatrix (mat:Matrix3D) :Matrix3D {
         var raw:Vector.<Number> = mat.rawData;
         raw[1] = -raw[1];
         raw[4] = -raw[4];
         raw[6] = -raw[6];
         raw[9] = -raw[9];
         raw[13] = -raw[13];
         return new Matrix3D(raw);

The Function setTransformMatrix is called when my Marker is detected:

Code: Select all

public function onMarkerAdded(e:Event=null):void
         trace("marker added");
         this.container.visible = true;

It wolud be really Great if someone could help me out.
Thanks a lot!

Return to “FLARManager”

Who is online

Users browsing this forum: No registered users and 1 guest