[Papervision3D] first test

Patrick Matte | BLITZ PMatte at blitzagency.com
Fri Feb 16 19:00:51 EST 2007


So did you come up with a solution?

-----Original Message-----
From: Papervision3D-bounces at osflash.org
[mailto:Papervision3D-bounces at osflash.org] On Behalf Of Laurence
Sent: Thursday, February 15, 2007 9:17 PM
To: Papervision3D at osflash.org
Subject: Re: [Papervision3D] first test

I've been faffing about, trying to get this thing to work, and I can't 
think of a logical reason why it doesn't. I called up a cube I created 
programmatically and that doesn't work either, although it did 
pre-revision 28. Let me get the process down in pseudo-code:

    public class <class>
{
    // imports etc

    public var scene : Scene3D
    public var camera : Camera3D
   
  public function <constructor> ()
    {
    //create scene and add target
    scene = new Scene3D ( this )
    //create camera
    camera = new camera3D ( )

    // do vertices
    v0 : Vertex3D = new Vertex3D  ( x , y , z )
    /*
    v1....vn ( as many as necessary )
    */

    // do faces
    f 0: Face 3D = new Face3D ( [ <array of Vertex3D.] )
    /*
    f1...fn
    */

    // build mesh
    //  use default material ( null ) object for simplicity

    mesh : Mesh3D = new Mesh3D ( null , [ < array of Vertex3D> ] , [ 
<array of Face3D > ] )

    //add the created Mesh3D to the scene
    scene.addChild ( mesh )

    //   create an event listener to render scene
    addEventListener ( Event.ENTER_FRAME , render )
    }
 
    public function render ( evt : Event ) : void
    {
        // render the scene
        scene.renderCamera ( camera )
    }
}

procedurally, I can't see anything wrong with it, and like I said, 
similar code worked in previous versions. I'll look at it some more.


_______________________________________________
Papervision3D mailing list
Papervision3D at osflash.org
http://osflash.org/mailman/listinfo/papervision3d_osflash.org



More information about the Papervision3D mailing list