Wireframe debugging plane3df
Wireframe debugging plane3df
As the title suggest. how do I check the bounds or at least visualize this plane3df? Is this some sort of infinite geometry or plane?
Re: Wireframe debugging plane3df
Yeah, planes are infinite. Visualizing itself is tricky - but in many cases you need them for collisions so you can color the parts colliding against it.
Or you could use the getIntersectionWithLine function of plane3d. As line you could use for example the camera-view vector (camera position and camera target). Then draw a line starting from the intersection point (if there is any) and as end point add the plane-normal to the start-point (and some scaling factor for longer debug lines if you want).
Or you could use the getIntersectionWithLine function of plane3d. As line you could use for example the camera-view vector (camera position and camera target). Then draw a line starting from the intersection point (if there is any) and as end point add the plane-normal to the start-point (and some scaling factor for longer debug lines if you want).
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: Wireframe debugging plane3df
Thanks CuteAlien! this explains a lot and I will try your tip there.CuteAlien wrote:Yeah, planes are infinite. Visualizing itself is tricky - but in many cases you need them for collisions so you can color the parts colliding against it.
Or you could use the getIntersectionWithLine function of plane3d. As line you could use for example the camera-view vector (camera position and camera target). Then draw a line starting from the intersection point (if there is any) and as end point add the plane-normal to the start-point (and some scaling factor for longer debug lines if you want).