Hi!
I´m planning to use the Irrlicht Engine in an university project because i like it´s architecture. The only thing that I'm missing is an elaborate triangle-mesh data-structure (correct me if it has one however, I would be happy about that!).
I need an data-structure that is similar to, for example, the half-edge structure of the OpenMesh project http://www.openmesh.org where I´m able to find the adjacent triangles of a given triangle or vertex.
Now I wanted to ask if it is possible to include the openmesh data-structure into the Irrlicht Engine by, for example, implementing a new class of the irr::scene::IMesh interface.
I haven´t used Irrlicht yet and don´t know, if something related is easily possible but I would be happy for any suggestions.
Regards, ph03
Irrlicht and OpenMesh?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
From a first glance I'd say that it's easiest to use OpenMesh as the algorithmic data structure and convert them to Irrlicht structures in a simple linear conversion. You'd probably have to convert it each frame, or at least every time you did some conversion.
If you'd like to add OpenMesh more tightly you might go for a new MeshBuffer implementation. But mesh buffers don't reder themselves so you'd have to add new render methods (or at least new case statements).
If you'd like to add OpenMesh more tightly you might go for a new MeshBuffer implementation. But mesh buffers don't reder themselves so you'd have to add new render methods (or at least new case statements).
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Sight unseen, I'd say: suck it and see. Irrlicht is a dream to modify compared to the other rendering engines that I've tried.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Thanks for the suggestion. Implementation of a new MeshBuffer or the use of a Costum-SceneNode to display the geometry, I think that would work somehow. But another think I need a User to be able to is to "mark" / select a specific face or even vertex by clicking into the mesh. There is the CollsionManager class offering Ray-Casting to get the intersecting triangle of the geometry, but how do I relate this found triangle back to my OpenMesh mesh? Is it possible to find any ID or index belonging to the found triangle?hybrid wrote:From a first glance I'd say that it's easiest to use OpenMesh as the algorithmic data structure and convert them to Irrlicht structures in a simple linear conversion. You'd probably have to convert it each frame, or at least every time you did some conversion.
If you'd like to add OpenMesh more tightly you might go for a new MeshBuffer implementation. But mesh buffers don't reder themselves so you'd have to add new render methods (or at least new case statements).
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Not with the existing methods. I'd suggest adding a new output parameter to ISceneCollisionManager::getCollisionPoint() to return the index of the hit triangle, as well as its vertices. That's on my to-do list, after I get some other collision changes committed.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Any news about this topic yet? I would still like to use irrlicht together with an efficient triangle mesh data structure like openmesh or the CGAL polyhedron class ( http://www.cgal.org/Manual/3.3/doc_html ... _main.html ).
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Sorry, no. Collision is low down the priority list for the SVN devs, and there's a limit to how many patches I can stand to see rotting in the tracker.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
I'm also trying to link OpenMesh and Irrlicht.
The problem is that OpenMesh and Irrlicht can only read / write mesh from a file and never from a buffer (maybe i am wrong).
So maybe i need to write my own Irrlicht class to load mesh, not from a file, but from a buffer.
There is any other solution in C++ ? (for example redirect file writing into a char buffer ?)
Thanks,
The problem is that OpenMesh and Irrlicht can only read / write mesh from a file and never from a buffer (maybe i am wrong).
So maybe i need to write my own Irrlicht class to load mesh, not from a file, but from a buffer.
There is any other solution in C++ ? (for example redirect file writing into a char buffer ?)
Thanks,