Coordinates of the vertices in the world coordinate system
Coordinates of the vertices in the world coordinate system
Good afternoon. I am using addMeshSceneNode(_Mesh) to create a graphic node. _Mesh is SMesh, and I create by specifying the vertices of triangles. Next, I need to get the coordinates of the vertices at the offset, rotation, and scale of the node. In the SMeshBuffer coordinates are not changed. How can I get the current coordinates of the vertices in the world coordinate system? Thank you.
Re: Coordinates of the vertices in the world coordinate syst
First way is to get the transformation matrix of the node (getAbsoluteTransformation) and use that matrix to transform all coordinates (transformVect).
Another solution is to create a triangle-selector which has functions then to get the transformed triangles.
Another solution is to create a triangle-selector which has functions then to get the transformed triangles.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Coordinates of the vertices in the world coordinate syst
Well, thanks for the quick response, I have been working in this direction. I will describe the problem more generally, I imitate the sensor field of view and want use the method RayTest to check the presence of an object in a certain region, for that I generate endpoints with little extensibility in the corners (scan the area vertically and horizontally). Which method should I use to calculate the coordinates of the end points in terms of performance?
Re: Coordinates of the vertices in the world coordinate syst
The fastest way would be to transform the object's bounding box, and then use that, either as a box or as a sphere.
Re: Coordinates of the vertices in the world coordinate syst
Thank you. I understand you offer not do a few RayTest, and instead create a sphere with which to check the intersection of objects? I just have hundreds of such sensors and to me it is very important to quickly calculate their ...
Re: Coordinates of the vertices in the world coordinate syst
We do offer ray-tests with ISceneCollisionManager::getCollisionPoint (see http://irrlicht.sourceforge.net/docu/cl ... nager.html).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Coordinates of the vertices in the world coordinate syst
I wonder ... Tell me, ISceneCollisionManager :: getCollisionPoint faster than g_PhysicalWorld-> GetWorld () -> rayTest (Start, End, RayCallBack)? And whether it is possible to perform ISceneCollisionManager :: getCollisionPoint from multiple threads? Should I use ITriangleSelector * selector or can pass NULL?
Re: Coordinates of the vertices in the world coordinate syst
No idea about that other rayTest function. getCollisionPoint needs a valid pointer to a triangle selector. Can be a metaTriangleSelector to have several selectors in one (as I found out last days that one has some bugs, so I'm rewriting it somewhat at the moment, but returns correct collisions, just wrong scenenode in some cases).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Coordinates of the vertices in the world coordinate syst
Another function is the "btDiscreteDynamicsWorld :: rayTest" ... with help of this method, I want to find the nearest object. On GitHub have forks that allow this method to run in multiple threads ...
Re: Coordinates of the vertices in the world coordinate syst
Really can't tell. I guess bt is bullet physics? Basically - experiment. Create as many nodes as you need for your test-case and then run a few tests with different functions and profile the results.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Coordinates of the vertices in the world coordinate syst
Yes, you're absolutely right, it is a method of BulletPhysics. With nodes Irrlicht I define the position and rotation of the sensor. And uses this information to generate endpoint RayTest.