Blitz3D to Irrlicht

Blitz3D Forums/Blitz3D Programming/Blitz3D to Irrlicht

verfum(Posted 2007) [#1]
Hi I'm sorry this isn't totally Blitz3D related but I'm not sure where else to ask, I'm not getting much help anywhere else. I need to find the relative Irrlicht Functions to convert some Blitz3D code, these are some I've done so far.
CountChildren = getChildren()
EntityName = getName()
MeshWidth = getScale().X
MeshHeight = getScale().Y
MeshDepth = getScale().Z
EntityPitch = getRotation().X
EntityYaw = getRotation().Y
EntityRoll = getRotation().Z
MoveEntity = setPosition()
EntityX = getPosition().X
EntityY = getPosition().Y
EntityZ = getPosition().Z
RotateEntity = setRotation()
CountVertices = getVertexCount()
VertexX = getVertex().X  'I think this is right?'
VertexY = getVertex().Y
VertexZ = getVertex().Z

And here are the functions I need help on.
GetChild = either getLeftChild() or getRightChild(), need help here!
CountSurfaces = getTriangleCount() 'Not sure?!'
CountTriangles = Not Sure? this is why I'm not sure about CountSurface()
GetMatElement = Not sure, maybe something like getMatrix()?
VertexCoords = Don't know.



LAB[au](Posted 2007) [#2]
I don't really know Irrlicht (been toying with it only a couple of days) but Surfaces <> Triangles. Besides this the getTriangleCount in Irrlicht seems related to a "scenenode" and collisions, not exactlty the same as an entity "mesh". You may have to access the "mesh" member of this scenenode and thru it the "meshbuffers", I believe these meshbuffers are like "surfaces" in B3d. You have a "getpolycount" there that could be like "counttriangles".

For getchild, since getchildren is returning a list of scenenodes, you can retrieve the pointers to all childrens.


verfum(Posted 2007) [#3]
Thanks for your reply. Yes getTriangleCount is part of a scenenode, it's a IAnimatedMeshSceneNode eg.

Local smgr:ISceneManager=device.getSceneManager()
Local model:IAnimatedMeshSceneNode = smgr.getMesh("file.b3d")

model=smgr.getTriangleCount()
model=smgr.getPosition().X
etc.


So, what your saying is MeshBuffers in Irrlicht are actually triangles?
virtual IMeshBuffer* irr::scene::SMesh::getMeshBuffer  (  const video::SMaterial &  material   )  const [inline, virtual]