Read raw data from ManualObject - demo code in wiki now


09-11-2011 16:14:04

It was not easy to find out how to read out the vertex buffer and index buffer of a ManualObject.
I need it to modify the code of Raycasting to the polygon level for usage with ManualObject.

Now I published a demo code which shows how to read out the data.
Look to wiki page Read raw data from ManualObject - MOGRE

Maybe it's useful for anybody.


16-11-2011 22:50:32

Thanks Beauty, this looks interesting! I wanted to implement this way of raycasting anyway, so I will probably give your code a try since I am using ManualObjects a lot...


17-11-2011 11:57:03

Nice to hear that somebody is interested in my code.
In the last days I made a new implementation for raycasting. It detects meshes, ManualObjects and terrain.
The code I will publish after some more tests and cleaning up the code.

On yesterday I also got the idea to write/publish a method, which returns a plain position list for all vertices of a ManualObject (independent of sections and rendering types).
This would be useful for creation of ConvexHulls from ManualObjects for MogreNewt. Because currently it doesn't support ManualObjects.
Also the current MogreNewt implementation only capsules the first attached entity of a SceneNode. Further entities will be ignored. And if the first attached object of a SceneNode is no mesh, then you get a crash.
This could be improved, too.


17-11-2011 12:47:09

Sounds interesting, even if I am not using MogreNewt this will be very useful. I am looking forward to your raycasting code! :D


17-11-2011 13:10:42

For which case you would use the "get vertices only" method?
I have no idea than convex hulls for collision/physics libraries.
Without additional information you can't know which of them creates triangles/lines/points.

The best is to suscribe my topic Raycasting to the polygon level -- questions. There you can follow the development state.
Scroll down to the bottom and click to subscribe topic and you will get a notice.


17-11-2011 15:51:06

It can be used to check for an object which parts are actually visible, so on the screen and not hidden by other objects...