Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.2

Bug #17008 Bad layers detection
Submitted: 2010-01-18 07:24 UTC
From: waterwall Assigned:
Status: Open Package: Image_3D (version 0.4.1)
PHP Version: 5.2.4 OS: Ubuntu
Roadmaps: (Not assigned)    
Subscription  


 [2010-01-18 07:24 UTC] waterwall (Michael Kowalczyk)
Description: ------------ Image_3d renders it in wrong way. I guess the problem is to check which object is in front (or back). Test script: --------------- $world = new Image_3D (); $world -> setColor (new Image_3D_Color (240, 240, 240)); $light1 = $world->createLight('Light', array(0, 0, 300)); $light1->setColor(new Image_3D_Color(255, 255, 255)); $cube = $world -> createObject ('cube', array (210, 70, 30)); $cube -> setColor(new Image_3D_Color (0, 0, 255, 0)); for ($x = 0; $x < 6; $x++){ for ($z = 0; $z < 2; $z++){ $cube = $world -> createObject ('cube', array (210 / 6 - 2, 70 / 17 - 2, 30 / 2 - 2)); $cube -> setColor (new Image_3D_Color (255, 0, 0)); $cube -> transform ($world -> createMatrix ('Move', array (($x + 0.5) * 210 / 6 - 210 / 2, -35 - 70 / 17, $z * 30 / 2 - 30 / 4))); } } $world -> transform ($world->createMatrix ('Rotation', array (45, 0, 0))); $world -> transform ($world->createMatrix ('Scale', array (3, 3, 3))); $world -> setOption (Image_3D::IMAGE_3D_OPTION_BF_CULLING, false); $world -> setOption (Image_3D::IMAGE_3D_OPTION_FILLED, false); $world -> createRenderer('perspectively'); $world -> createDriver ('SVG'); $world -> render (1024, 768, 'phptemp/budynek.svg'); Expected result: ---------------- I try to create 3d image. There should be the big blue cube and some small, red cubes on that big one. Actual result: -------------- Generated graphic (svg): http://mkk.ekk.pl/projects/studio102/um/phptemp/building-error.svg

Comments