bharling
06-01-2008 16:27:24
Hi all,
have been converting the CaduneTree lib to python, and everything is now done as far as I can tell, only problem is I can't get a tree to appear. CaduneTree uses a ManualObject pointer passed in to generate the tree geometry. Here's the code I use to display it:
I've converted the lib to python, rather than wrapping it ( possibly a bad idea
). Which leads me to believe I have done something wrong in the manual object setup. Does it require uint16's for vertices / indexes? I have just been using standard python ints. If so, how would I go about that?
Trouble is, I get no errors whatsoever, everything seems to work (tree generation, leaf generation etc ), just no tree displayed. The whole code is too long to post here, i will try and sort out somewhere to upload it.
have been converting the CaduneTree lib to python, and everything is now done as far as I can tell, only problem is I can't get a tree to appear. CaduneTree uses a ManualObject pointer passed in to generate the tree geometry. Here's the code I use to display it:
manObj = ogre.ManualObject("myTree")
bbs = ogre.BillboardSet("leaves", 50, False)
params = Parameters()
trunk = Stem( params )
trunk.grow( ogre.Quaternion.IDENTITY, ogre.Vector3.ZERO )
trunk.createGeometry( manObj )
trunk.createLeaves( bbs )
#ent = sceneManager.createEntity( "mrTree", "myTree" )
node = sceneManager.getRootSceneNode().createChildSceneNode()
node.attachObject( manObj )
node.setPosition( 0,0,0)
I've converted the lib to python, rather than wrapping it ( possibly a bad idea

Trouble is, I get no errors whatsoever, everything seems to work (tree generation, leaf generation etc ), just no tree displayed. The whole code is too long to post here, i will try and sort out somewhere to upload it.