Scene graph partitioning problem

45 views
Skip to first unread message

dbow

unread,
Dec 11, 2011, 6:16:41 AM12/11/11
to away3...@googlegroups.com
Hi!

What is the default partitioning for the scene (Scene3D)?

I'm also having problem switching to another scene graph like Octree. I add two planes (Plane) to scene (with octree partition) but only one is displayed (p1) in constrast to the scene with default partition, which displays both planes.

How can I set this up properly?

view.scene.partition = new Octree(5, 10000);
//view.scene.partition.showDebugBounds = true;

var mat1:ColorMaterial = new ColorMaterial(0x0000ff);
mat1.bothSides = true;

// plane 1
var p1:Plane = new Plane(mat1, 100, 100, 1, 1);
p1.position = new Vector3D(-100, -100, -700);
p1.rotationX = 90;

var mat2:ColorMaterial = new ColorMaterial(0xff0000);
mat2.bothSides = true;

// plane 2
var p2:Plane = new Plane(mat2, 100, 100, 1, 1);
p2.position = new Vector3D(100, 100, -500);
p2.rotationX = 90;

view.scene.addChild(p2);
view.scene.addChild(p1);

PS. Why does view.scene.partition.showDebugBounds = true; not work?

BR,
dbow

Jensa

unread,
Dec 12, 2011, 7:56:26 AM12/12/11
to Away3D.dev
Please use http://away3d.com/forum/ for questions. This forum is no
longer actively maintained but exists as an archive for older posts.

J

Reply all
Reply to author
Forward
0 new messages