Rowan
14-03-2007 03:37:30
I tried this question in the main forum, but was told I should ask here, even though the 'vertexnormals' option is part of the TSM. Here is the link to that post :: http://www.ogre3d.org/phpBB2/viewtopic.php?t=29711
My question was ::
Sinbad pointed me to a wiki entry here ::
http://www.ogre3d.org/wiki/index.php/RetrieveVertexData, which was useful in some respects, but I am still none the wiser on how to access the normals as opposed to the vertexes & indexes.
Do the PLSM2 terrain entity meshes have an extra public attribute for normals? or am I completely off track?
I was planning on using this to save duplicate normal calculations for pathfinding over terrain, but I'm also thinking it would just be useful for any sort of pathfinding on a mesh.
If anyone knows how to do this I'd be much appreciated if you could give me a few pointers.
Thanks.
My question was ::
if it's possible to access the normal values set by the scene manager when the 'vertexnormals=yes' option is set in the config file.
I'm not an expert programmer so hopefully I'm not misunderstanding what this means, but I'm assuming there are 3 values per vertex stored somewhere representing a Terrain normal at that point ( usually used for lighting I assume ).
I'd like to access them and most likely just copy them to a buffer of my own to then manipulate for pathfinding.
Is this possible, and if so, I was hoping someone could help me with the actual code that would be required as I have little idea about hardware buffers.
Thanks
Sinbad pointed me to a wiki entry here ::
http://www.ogre3d.org/wiki/index.php/RetrieveVertexData, which was useful in some respects, but I am still none the wiser on how to access the normals as opposed to the vertexes & indexes.
Do the PLSM2 terrain entity meshes have an extra public attribute for normals? or am I completely off track?
I was planning on using this to save duplicate normal calculations for pathfinding over terrain, but I'm also thinking it would just be useful for any sort of pathfinding on a mesh.
If anyone knows how to do this I'd be much appreciated if you could give me a few pointers.
Thanks.